carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 200 forks source link

Adding arm_exporter to a current installation of Prometheus and Grafana Micro K8s #106

Closed nzkller closed 3 years ago

nzkller commented 3 years ago

Thank you very much for this project.

I would like to ask a quick question. I already have prometheus and grafana running and it's working just fine. I even imported your dashboard and looks great, but of course the only issue I have now it's the temperature of the CPU, which is not being displayed.

Is there any way to just install the arm_exporter pods into the monitoring deployment to get the CPU temp and the add the target to prometheus?

I try deploying it not the monitoring namespace like this

apiVersion: apps/v1
kind: Deployment
metadata:
  name: arm-exporter
  labels:
    app: arm-exporter
spec:
  strategy:
    type: Recreate
  replicas: 1
  selector:
    matchLabels:
      app: arm-exporter
  template:
    metadata:
      labels:
        app: arm-exporter
    spec:
      containers:
      - name: arm-exporter
        image: carlosedp/arm_exporter
        imagePullPolicy: Always
        ports:
        - containerPort: 9243
        volumeMounts:
          - mountPath: "/etc/nodename"
            name: nodename
          - mountPath: "/etc/localtime"
            name: localtime
          - mountPath: "/etc/TZ"
            name: timezone
        env:
          - name: NODE_ID
            value: "{{.Node.ID}}"
      volumes:
        - name: nodename
          hostPath:
            path: /etc/hostname
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: timezone
          hostPath:
            path: /etc/timezone
      command:
        - ["--collector.textfile.directory=/etc/rpi_exporter/"]

But of course it failed miserably.

The error I got was the following:

rpi_exporter: error: unexpected /bin/rpi_exporter, try --help

Is ti possible what I'm trying to do?

Thank you in advance and best regards,

CD

carlosedp commented 3 years ago

It would be better to use a DaemonSet so all nodes have arm_exporter.

It should run fine as long as you have an ARM or ARM64 board.

carlosedp commented 3 years ago

Can this be closed?