Skip to content

Commit 196f8ae

Browse files
authored
feat: add Prometheus SNMP exporter for F5 SNMP alert (#841)
feat: add Prometheus SNMP exporter for F5 SNMP alert (#841)
1 parent f14eeaf commit 196f8ae

File tree

3 files changed

+281
-0
lines changed

3 files changed

+281
-0
lines changed
Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
restartPolicy: Always
2+
3+
kind: Deployment
4+
5+
image:
6+
repository: quay.io/prometheus/snmp-exporter
7+
# if not set appVersion field from Chart.yaml is used
8+
tag: ""
9+
pullPolicy: IfNotPresent
10+
11+
imagePullSecrets: []
12+
nodeSelector: {}
13+
tolerations: []
14+
affinity: {}
15+
topologySpreadConstraints: []
16+
17+
## Assign a PriorityClassName to pods if set
18+
# priorityClassName: ""
19+
20+
## Provide a namespace to substitude for the namespace on resources
21+
namespaceOverride: ""
22+
23+
## Security context to be added to snmp-exporter pods
24+
securityContext: {}
25+
# fsGroup: 1000
26+
# runAsUser: 1000
27+
# runAsNonRoot: true
28+
29+
## Security context to be added to snmp-exporter containers
30+
containerSecurityContext:
31+
runAsNonRoot: true
32+
runAsUser: 1000
33+
readOnlyRootFilesystem: true
34+
35+
## Additional labels to add to all resources
36+
customLabels: {}
37+
# app: snmp-exporter
38+
39+
# config:
40+
41+
extraConfigmapMounts: []
42+
# - name: snmp-exporter-configmap
43+
# mountPath: /run/secrets/snmp-exporter
44+
# subPath: snmp.yaml # (optional)
45+
# configMap: snmp-exporter-configmap-configmap
46+
# readOnly: true
47+
# defaultMode: 420
48+
49+
## Additional init containers
50+
# These will be added to the prometheus-snmp-exporter pod.
51+
extraInitContainers: []
52+
# - name: init-myservice
53+
# image: busybox:1.28
54+
# command: [ 'sh', '-c', "sleep 10; done" ]
55+
56+
## Additional secret mounts
57+
# Defines additional mounts with secrets. Secrets must be manually created in the namespace.
58+
extraSecretMounts: []
59+
# - name: secret-files
60+
# mountPath: /run/secrets/snmp-exporter
61+
# secretName: snmp-exporter-secret-files
62+
# readOnly: true
63+
# defaultMode: 420
64+
65+
# Additional volumes, e.g. for secrets used in an extraContainer
66+
extraVolumes: []
67+
68+
# Additional volume mounts for snmp-exporter container
69+
extraVolumeMounts: []
70+
71+
## For RBAC support:
72+
rbac:
73+
# Specifies whether RBAC resources should be created
74+
create: true
75+
76+
serviceAccount:
77+
# Specifies whether a ServiceAccount should be created
78+
create: true
79+
80+
# The name of the ServiceAccount to use.
81+
# If not set and create is true, a name is generated using the fullname template
82+
name:
83+
84+
resources: {}
85+
# limits:
86+
# memory: 300Mi
87+
# requests:
88+
# memory: 50Mi
89+
90+
livenessProbe:
91+
httpGet:
92+
path: /
93+
port: http
94+
readinessProbe:
95+
httpGet:
96+
path: /
97+
port: http
98+
99+
service:
100+
annotations: {}
101+
type: ClusterIP
102+
port: 9116
103+
ipDualStack:
104+
enabled: false
105+
ipFamilies: ["IPv6", "IPv4"]
106+
ipFamilyPolicy: "PreferDualStack"
107+
108+
## An Ingress resource can provide name-based virtual hosting and TLS
109+
## termination among other things for CouchDB deployments which are accessed
110+
## from outside the Kubernetes cluster.
111+
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
112+
ingress:
113+
enabled: false
114+
## Class name can be set since version 1.18.
115+
className: ""
116+
## Path type is required since version 1.18. Default: ImplementationSpecific.
117+
pathType: ""
118+
hosts: []
119+
# - chart-example.local
120+
annotations: {}
121+
# kubernetes.io/ingress.class: nginx
122+
# kubernetes.io/tls-acme: "true"
123+
tls: []
124+
# Secrets must be manually created in the namespace.
125+
# - secretName: chart-example-tls
126+
# hosts:
127+
# - chart-example.local
128+
129+
podAnnotations: {}
130+
131+
extraArgs: []
132+
# --history.limit=1000
133+
134+
envFrom: []
135+
# - secretRef:
136+
# name: name-of-secret
137+
138+
replicas: 1
139+
140+
# Uncomment to set a specific revisionHistoryLimit. Defaults to 10 as per Kubernetes API if not set.
141+
# revisionHistoryLimit: 3
142+
143+
## Monitors ConfigMap changes and POSTs to a URL
144+
## Ref: https://github.com/jimmidyson/configmap-reload
145+
##
146+
configmapReload:
147+
## configmap-reload container name
148+
##
149+
name: configmap-reload
150+
151+
## configmap-reload container image
152+
##
153+
image:
154+
repository: quay.io/prometheus-operator/prometheus-config-reloader
155+
tag: v0.79.2
156+
pullPolicy: IfNotPresent
157+
158+
## configmap-reload resource requests and limits
159+
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
160+
##
161+
resources: {}
162+
163+
# Enable this if you're using https://github.com/prometheus-operator/prometheus-operator
164+
# A service monitor will be created per each item in serviceMonitor.params[]
165+
serviceMonitor:
166+
enabled: false
167+
# Default value is the namespace the release is deployed to
168+
# namespace: monitoring
169+
170+
path: /snmp
171+
172+
# Fall back to the prometheus default unless specified
173+
# interval: 10s
174+
scrapeTimeout: 10s
175+
module:
176+
- if_mib
177+
# Auth used for scraping.
178+
auth:
179+
- public_v2
180+
181+
# Relabelings dynamically rewrite the label set of a target before it gets scraped.
182+
# Set if defined unless overriden by params.relabelings.
183+
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig
184+
relabelings: []
185+
# - sourceLabels: [__address__]
186+
# targetLabel: __param_target
187+
# - sourceLabels: [__param_target]
188+
# targetLabel: instance
189+
190+
# Metric relabeling is applied to samples as the last step before ingestion.
191+
# Set if defined unless overriden by params.additionalMetricsRelabels.
192+
# This sets fixed relabel configs with action 'replace'.
193+
additionalMetricsRelabels: {}
194+
# targetLabel1: replacementValue1
195+
# targetLabel2: replacementValue2
196+
197+
# Metric relabeling is applied to samples as the last step before ingestion.
198+
# Set if defined unless overridden by params.additionalMetricsRelabelConfigs.
199+
# This allows setting arbitrary relabel configs.
200+
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig
201+
additionalMetricsRelabelConfigs: []
202+
# - sourceLabels: [__name__]
203+
# targetLabel: __name__
204+
# action: replace
205+
# regex: (.*)
206+
# replacement: prefix_$1
207+
208+
# Label for selecting service monitors as set in Prometheus CRD.
209+
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.PrometheusSpec
210+
selector:
211+
prometheus: kube-prometheus
212+
213+
# Retain the job and instance labels of the metrics retrieved by the snmp-exporter
214+
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.Endpoint
215+
honorLabels: true
216+
217+
params: []
218+
# Human readable URL that will appear in Prometheus / AlertManager
219+
# - name: localhost
220+
# The target that snmp will scrape
221+
# target: 127.0.0.1
222+
# Module used for scraping. Overrides value set in serviceMonitor.module
223+
# module:
224+
# - if_mib
225+
# Map of labels for ServiceMonitor. Overrides value set in serviceMonitor.selector
226+
# labels: {}
227+
# release: kube-prometheus-stack
228+
# Scraping interval. Overrides value set in serviceMonitor.interval
229+
# interval: 30s
230+
# Scrape timeout. Overrides value set in serviceMonitor.scrapeTimeout
231+
# scrapeTimeout: 30s
232+
# Relabelings. Overrides value set in serviceMonitor.relabelings
233+
# relabelings: []
234+
# Map of metric labels and values to add. Overrides value set in serviceMonitor.additionalMetricsRelabels
235+
# This sets fixed relabel configs with action 'replace'.
236+
# additionalMetricsRelabels: {}
237+
# Metrics relabelings. Overrides value set in serviceMonitor.additionalMetricsRelabelConfigs
238+
# additionalMetricsRelabelConfigs: []
239+
240+
## If true, a ServiceMonitor CRD is created for snmp-exporter itself
241+
##
242+
selfMonitor:
243+
enabled: true
244+
additionalMetricsRelabels: {}
245+
additionalRelabeling: []
246+
labels: {}
247+
path: /metrics
248+
scheme: http
249+
tlsConfig: {}
250+
interval: 30s
251+
scrapeTimeout: 30s
252+
253+
# Extra manifests to deploy as an array
254+
extraManifests: []
255+
# - |
256+
# apiVersion: v1
257+
# kind: ConfigMap
258+
# metadata:
259+
# labels:
260+
# name: prometheus-extra
261+
# data:
262+
# extra-data: "value"
263+
264+
strategy:
265+
rollingUpdate:
266+
maxSurge: 1
267+
maxUnavailable: 0
268+
type: RollingUpdate
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sortOptions:
2+
order: fifo
3+
resources:
4+
- all.yaml

bin/chart-install-meta.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,12 @@ prometheus-postgres-exporter:
135135
version: 6.0.0
136136
valuesFiles:
137137
- values.yaml
138+
139+
prometheus-snmp-exporter:
140+
name: prometheus-snmp-exporter
141+
repoName: prometheus-community
142+
repo: https://prometheus-community.github.io/helm-charts
143+
releaseName: prometheus-snmp-exporter
144+
namespace: prometheus
145+
valuesFiles:
146+
- values.yaml

0 commit comments

Comments
 (0)