Giter Club home page Giter Club logo

docker-arm_exporter's Introduction

docker-arm_exporter

Build Status

ARM CPU temperature exporter for Prometheus. Exporter code by Lukas Malkmus

Usage:

Docker Run

Run the container in the same network as your Prometheus

docker run -d \
  --name=arm_exporter \
  --restart always \
  --net=monitoring \
  -p 9243:9243 \
  -v /etc/hostname:/etc/nodename:ro \
  -v /etc/localtime:/etc/localtime:ro \
  -v /etc/timezone:/etc/TZ:ro \
  carlosedp/arm_exporter

Docker Compose File (yml)

rpi-exporter:
    image: carlosedp/arm_exporter
    environment:
      - NODE_ID={{.Node.ID}}
    volumes:
      - /etc/hostname:/etc/nodename:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/TZ:ro
    command:
      - '--collector.textfile.directory=/etc/rpi_exporter/'
    ports:
      - 9243:9243
    networks:
      - monitoring
    deploy:
      mode: global

networks:
  monitoring:
    driver: overlay

Docker Stack

docker stack deploy monitoring --compose-file docker-compose-monitoring.yml

Add target to Prometheus:

- job_name: 'node'
  scrape_interval: 10s
  dns_sd_configs:
  - names:
    - 'arm_exporter'
    type: 'A'
    port: 9243

Get images on DockerHub

docker-arm_exporter's People

Contributors

carlosedp avatar geekdave avatar mhansen avatar raymondmouthaan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-arm_exporter's Issues

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

So I think CMD needs to be empty, since entrypoint is already calling /bin/rpi_exporter

/usr/bin/docker run --rm -p 9243:9243 -v /etc/hostname:/etc/nodename:ro -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/TZ:ro --name=arm-exporter.service carlosedp/arm_exporter
rpi_exporter: error: unexpected /bin/rpi_exporter, try --help
 /usr/bin/docker run --rm -p 9243:9243 -v /etc/hostname:/etc/nodename:ro -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/TZ:ro --entrypoint "/bin/sh" --name=arm-exporter.service carlosedp/arm_exporter -x /etc/rpi_exporter/docker-entrypoint.sh /bin/rpi_exporter

+ '[' -f /etc/nodename ]
+ cat /etc/nodename
+ NODE_NAME=raspberrypi
+ echo 'node_meta{node_id="none", container_label_com_docker_swarm_node_id="none", node_name="raspberrypi"} 1'
+ set -- /bin/rpi_exporter /bin/rpi_exporter
+ exec /bin/rpi_exporter /bin/rpi_exporter
rpi_exporter: error: unexpected /bin/rpi_exporter, try --help

Error on GPU collector

Hi,

 k logs -n monitoring arm-exporter-rpi-exporter-c5wjq
 level=error msg="gpu collector failed after 0.053595s: exit status 255" source="collector.go:142"

this has been fixed on the upstream project via lukasmalkmus/rpi_exporter#18.
Could you please update the docker image?
That would be awesome!

# for arm64 based installations
command:
        - /bin/rpi_exporter
        args:
          - --vcgencmd=/usr/bin/vcgencmd

Can't start on armv6 (Raspberry Pi Zero W)

Hey there, looks like 52d0771 removed support for arm32v6, replacing it with linux/arm,linux/arm64.

I've been using this container for a while on Raspberry Pi Zero W and it's started crashlooping with Restarting (139) 7 seconds ago, probably because of an unrecognized ARMv7 instruction.

I don't suppose this would be as simple to fix as adding linux/arm32v6 like this?

    - ARCHS="linux/arm,linux/arm64"
    - ARCHS="linux/arm,linux/arm64,linux/arm/v6"

Looks like linux/arm/v6 is the format according to https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/

Btw, thanks for maintaining this, and no worries if you're not interested in supporting ARMv6, I can do a fork - I've gotten a lot of value already out of your image :-)

Can't start on armv6 (Raspberry Pi Zero W)

Hi there, looks like #9 is back. I'm now seeing this on my Raspberry Pi Zero W:

pi@zerow ~> docker ps
CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                            PORTS                    NAMES
34e224458e48        carlosedp/arm_exporter               "/etc/rpi_exporter/dā€¦"   22 minutes ago      Restarting (139) 34 seconds ago                            dc_arm_exporter_1

Continual restarting.

I suspect it's only being built for ARMv7:

https://hub.docker.com/r/carlosedp/arm_exporter/tags?page=1&ordering=last_updated lists only linux/arm/v7 and linux/arm64.

I'm guessing this broke with the recent move from Travis to GitHub actions, here: f07e1ce#diff-5b21991be47c2922383bdc0b6bf00b65af7db51b82d049dd8d6ad03e3d37ac98L66, where

          platforms: linux/arm/v6,linux/arm/v7,linux/arm64

became:

          platforms: linux/arm,linux/arm64

Maybe we could revert that line? But I'm not sure, maybe was a reason that line had to be changed.

I made a pull request in the past: #10, maybe we could apply the same tricks in there to the new CI?

Grafana Agent scape Issues

I installed the cluster monitoring on my k3s cluster that is in another one of your repos and it's awesome. The only issue was that prometheus was consuming a lot of memory on the cluster, by far more than another other pod. I really love the monitoring but not willing to give up all of that memory for metrics. I found that grafana now has a new agent, paired with a free account I can now collect metrics along with kube-state-metrics. It's collector runs at 25% of prometheus and seems to work really well. Yet I'm just missing the arm exporter so I can monitor and be alerted on temp issues.

https://grafana.com/products/cloud/

I have attempted the follow scrape configs with no avail, I simply cannot get it to scape my arm-exporter pods...

Any help would be appreciated.

scrape_configs:
        - job_name: 'rpi-nodes'
          scrape_interval: 10s
          dns_sd_configs:
          - names:
            - 'arm_exporter'
            type: 'A'
            port: 9243
        - job_name: kubernetes-pods
          kubernetes_sd_configs:
            - role: pod
          relabel_configs:
            - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
              action: keep
              regex: true
            - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
              action: replace
              target_label: __metrics_path__
              regex: (.+)
            - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
              action: replace
              regex: ([^:]+)(?::\d+)?;(\d+)
              replacement: $1:$2
              target_label: __address__
            - action: labelmap
              regex: __meta_kubernetes_pod_label_(.+)
            - source_labels: [__meta_kubernetes_namespace]
              action: replace
              target_label: namespace
            - source_labels: [__meta_kubernetes_pod_name]
              action: replace
              target_label: pod

While also updating my daemonset:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    k8s-app: arm-exporter
  name: arm-exporter
  namespace: grafana
spec:
  selector:
    matchLabels:
      k8s-app: arm-exporter
  template:
    metadata:
      labels:
        k8s-app: arm-exporter
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9243"
        prometheus.io/path: "/metrics"
...

/opt/vc/bin/vcgencmd: no such file or directory

The exporter running in a container produces the following errors:

time="2019-11-26T20:54:20-08:00" level=error msg="gpu collector failed after 0.007025s: fork/exec /opt/vc/bin/vcgencmd: no such file or directory" source="collector.go:142"

The process tries to execute the binary (lukasmalkmus/rpi_exporter#7) which is available on the host but not in the container. Is there a way to mount this binary and probably its dependencies into the container or it would require some changes in the exporter itself?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.