From 9c77443a89854f7771d14b5b0a9d3165f105fa5a Mon Sep 17 00:00:00 2001 From: CarlosEDP Date: Tue, 27 Mar 2018 16:54:26 -0500 Subject: [PATCH] Added SNMP exporter to monitor router --- .../snmp-exporter-deployment.yaml | 20 ++++++++++++++++ .../snmp-exporter/snmp-exporter-service.yaml | 15 ++++++++++++ .../snmp-exporter-servicemonitor-router.yaml | 24 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 manifests/snmp-exporter/snmp-exporter-deployment.yaml create mode 100644 manifests/snmp-exporter/snmp-exporter-service.yaml create mode 100644 manifests/snmp-exporter/snmp-exporter-servicemonitor-router.yaml diff --git a/manifests/snmp-exporter/snmp-exporter-deployment.yaml b/manifests/snmp-exporter/snmp-exporter-deployment.yaml new file mode 100644 index 0000000..3e117bb --- /dev/null +++ b/manifests/snmp-exporter/snmp-exporter-deployment.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: snmp-exporter +spec: + replicas: 1 + selector: + matchLabels: + app: snmp-exporter + template: + metadata: + labels: + app: snmp-exporter + spec: + containers: + - image: carlosedp/snmp_exporter:v0.9.0 + name: snmp-exporter + ports: + - containerPort: 9116 + name: metrics diff --git a/manifests/snmp-exporter/snmp-exporter-service.yaml b/manifests/snmp-exporter/snmp-exporter-service.yaml new file mode 100644 index 0000000..91ebec1 --- /dev/null +++ b/manifests/snmp-exporter/snmp-exporter-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: snmp-exporter + name: snmp-exporter +spec: + ports: + - name: http-metrics + port: 9116 + protocol: TCP + targetPort: metrics + selector: + app: snmp-exporter + diff --git a/manifests/snmp-exporter/snmp-exporter-servicemonitor-router.yaml b/manifests/snmp-exporter/snmp-exporter-servicemonitor-router.yaml new file mode 100644 index 0000000..a90f5d7 --- /dev/null +++ b/manifests/snmp-exporter/snmp-exporter-servicemonitor-router.yaml @@ -0,0 +1,24 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + k8s-app: snmp-exporter + name: snmp-exporter +spec: + jobLabel: k8s-app + selector: + app: snmp-exporter + namespaceSelector: + matchNames: + - monitoring + + endpoints: + - interval: 60s + port: http-metrics + params: + module: + - ddwrt + target: + - 192.168.1.1 + path: "/snmp" + targetPort: 9116