more dev work (#1)

* of course we need badges

* kubernetes single device config example

* fixed deployment json
This commit is contained in:
Steve Brunton 2017-09-16 22:38:01 -04:00 committed by GitHub
parent 044419a16b
commit 129e34290f
4 changed files with 100 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,13 @@
{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "mikrotik-exporter",
"namespace": "prometheus"
},
"data": {
"device": "router",
"address": "192.168.11.1",
"user": "prometheus"
}
}

View File

@ -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"
}
}
}
]
}
]
}
}
}
}

View File

@ -0,0 +1,11 @@
{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "mikrotik-exporter",
"namespace": "prometheus"
},
"data": {
"password": "Y2hhbmdlbWUK"
}
}