draganm / missing-container-metrics

Prometheus exporter for container metrics cAdvisor won't give you
MIT License
171 stars 31 forks source link

openshift compatability #14

Open tomer1983 opened 3 years ago

tomer1983 commented 3 years ago

the package was installed on openshift 4 DOCKER & CONTAINERD set to false pods are running but no metrics are shown beside the exporter health metrics

tomer1983 commented 3 years ago

my deployment definition file :

apiVersion: apps/v1 kind: DaemonSet metadata: name: missing-container-metrics namespace: monitor annotations: deprecated.daemonset.template.generation: '1' kubectl.kubernetes.io/last-applied-configuration: > {"apiVersion":"apps/v1","kind":"DaemonSet","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"missing-container-metrics-cluster01","app.kubernetes.io/name":"missing-container-metrics","app.kubernetes.io/version":"0.21.0"},"name":"missing-container-metrics","namespace":"monitor"},"spec":{"selector":{"matchLabels":{"app.kubernetes.io/instance":"missing-container-metrics","app.kubernetes.io/name":"missing-container-metrics"}},"template":{"metadata":{"annotations":{"prometheus.io/port":"3001","prometheus.io/scrape":"true"},"labels":{"app.kubernetes.io/instance":"missing-container-metrics","app.kubernetes.io/name":"missing-container-metrics"}},"spec":{"containers":[{"env":[{"name":"DOCKER","value":"false"},{"name":"CONTAINERD","value":"true"}],"image":"myrepo/dmilhdef/missing-container-metrics:v0.21.0","imagePullPolicy":"IfNotPresent","livenessProbe":{"httpGet":{"path":"/metrics","port":"http"}},"name":"missing-container-metrics","ports":[{"containerPort":3001,"name":"http","protocol":"TCP"}],"readinessProbe":{"httpGet":{"path":"/metrics","port":"http"}},"resources":{},"securityContext":{},"volumeMounts":[{"mountPath":"/run/containerd/containerd.sock","name":"containerdsock"}]}],"securityContext":{},"volumes":[{"hostPath":{"path":"/run/containerd/containerd.sock"},"name":"containerdsock"}]}}}} labels: app: missing-container-metrics app.kubernetes.io/instance: missing-container-metrics-cluster01 app.kubernetes.io/name: missing-container-metrics app.kubernetes.io/version: 0.21.0

spec: selector: matchLabels: app.kubernetes.io/instance: missing-container-metrics app.kubernetes.io/name: missing-container-metrics app: missing-container-metrics template: metadata: annotations: prometheus.io/port: '3001' prometheus.io/scrape: 'true' creationTimestamp: null labels: app.kubernetes.io/instance: missing-container-metrics app.kubernetes.io/name: missing-container-metrics app: missing-container-metrics spec: serviceAccountName: missing-container-metrics containers: