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