diff --git a/README.md b/README.md index 65484ae..3951903 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Docker Pulls](https://img.shields.io/docker/pulls/nshttpd/mikrotik-exporter.svg)](https://hub.docker.com/r/nshttpd/mikrotik-exporter/) + ## prometheus-mikrotik tl;dr - prometheus exporter for mikrotik devices diff --git a/examples/kubernetes/single-device/configmap.json b/examples/kubernetes/single-device/configmap.json new file mode 100644 index 0000000..253775d --- /dev/null +++ b/examples/kubernetes/single-device/configmap.json @@ -0,0 +1,13 @@ +{ + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "name": "mikrotik-exporter", + "namespace": "prometheus" + }, + "data": { + "device": "router", + "address": "192.168.11.1", + "user": "prometheus" + } +} \ No newline at end of file diff --git a/examples/kubernetes/single-device/deployment.json b/examples/kubernetes/single-device/deployment.json new file mode 100644 index 0000000..5e3746a --- /dev/null +++ b/examples/kubernetes/single-device/deployment.json @@ -0,0 +1,74 @@ +{ + "apiVersion": "apps/v1beta1", + "kind": "Deployment", + "metadata": { + "name": "mikrotik-exporter", + "namespace": "prometheus" + }, + "spec": { + "replicas": 1, + "revisionHistoryLimit": 5, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app": "mikrotik-exporter" + }, + "annotations": { + "prometheus.io/scrape": "true", + "prometheus.io/port": "9090" + } + }, + "spec": { + "containers": [ + { + "name": "mikrotik-exporter", + "image": "nshttpd/mikrotik-exporter:044419a", + "env": [ + { + "name": "DEVICE", + "valueFrom": { + "configMapKeyRef": { + "name": "mikrotik-exporter", + "key": "device" + } + } + }, + { + "name": "ADDRESS", + "valueFrom": { + "configMapKeyRef": { + "name": "mikrotik-exporter", + "key": "address" + } + } + }, + { + "name": "USER", + "valueFrom": { + "configMapKeyRef": { + "name": "mikrotik-exporter", + "key": "user" + } + } + }, + { + "name": "PASSWORD", + "valueFrom": { + "secretKeyRef": { + "name" : "mikrotik-exporter", + "key" : "pasword" + } + } + } + ] + } + ] + } + } + } + + +} diff --git a/examples/kubernetes/single-device/secret.json b/examples/kubernetes/single-device/secret.json new file mode 100644 index 0000000..c54a885 --- /dev/null +++ b/examples/kubernetes/single-device/secret.json @@ -0,0 +1,11 @@ +{ + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "mikrotik-exporter", + "namespace": "prometheus" + }, + "data": { + "password": "Y2hhbmdlbWUK" + } +} \ No newline at end of file