lwlcom / cisco_exporter

Exporter for metrics from devices running Cisco (NX-OS/IOS XE/IOS) to use with https://prometheus.io/
MIT License
71 stars 23 forks source link

Added Dockerfile #10

Closed matt-empson closed 3 years ago

matt-empson commented 4 years ago

Hi, I created this very simple Dockerfile so I could run the exporter as part of a docker-compose stack for testing and it seems to work well. Below is an example from my docker-compose after building the image locally ("docker build -t cisco_exporter . "):

cisco_exporter:
    image: cisco_exporter:latest
    container_name: cisco_exporter
    networks:
    - prom-net
    volumes:
    - ~/.ssh/id_rsa:/ssh/id_rsa
    command:
    - "cisco_exporter"
    - "-ssh.targets=192.168.20.16"
    - "-ssh.keyfile=/ssh/id_rsa"
    - "-ssh.user=user"
    - "-legacy.ciphers=true"
    - "-debug=true"
    ports:
    - 9362:9362
l3akage commented 3 years ago

Thanks for the contribution, i added a Dockerfile to the repo