Added SNMP exporter to monitor router

This commit is contained in:
CarlosEDP 2018-03-27 16:54:26 -05:00
parent 45010d32dc
commit 9c77443a89
3 changed files with 59 additions and 0 deletions

View File

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

View File

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

View File

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