Skip to content

Workload Monitoring

Enable TechPreview workload monitoring: Enabling monitoring of your own services

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
oc create -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    techPreviewUserWorkload:
      enabled: true
EOF

Deploy sample app: https://docs.openshift.com/container-platform/4.4/monitoring/monitoring-your-own-services.html#deploying-a-sample-service_monitoring-your-own-services

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
oc create -f - <<EOF
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: monitor-crd-edit
rules:
- apiGroups: ["monitoring.coreos.com"]
  resources: ["prometheusrules", "servicemonitors", "podmonitors"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
EOF

Last update: July 30, 2020