feat(fail2ban-exporter): add service monitor for geoip services
All checks were successful
ci/woodpecker/push/yamllint Pipeline was successful
All checks were successful
ci/woodpecker/push/yamllint Pipeline was successful
This commit is contained in:
parent
2e36b0e191
commit
d0b37937ee
3 changed files with 54 additions and 0 deletions
|
@ -36,6 +36,10 @@ spec:
|
|||
- env:
|
||||
- name: GEOIP_LISTEN_ADDRESS
|
||||
value: :8080
|
||||
- name: GEOIP_EXPORTER_ADDRESS
|
||||
value: :9191
|
||||
- name: GEOIP_ENABLE_EXPORTER
|
||||
value: true
|
||||
- name: GEOIP_DATA_URL
|
||||
value: https://data.neuber.io/data.csv
|
||||
image: git.ar21.de/yolokube/country-geo-locations:latest
|
||||
|
@ -45,6 +49,9 @@ spec:
|
|||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 9191
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
httpHeaders:
|
||||
|
|
|
@ -19,6 +19,25 @@ spec:
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: fail2ban-geoip
|
||||
app.kubernetes.io/instance: fail2ban-prometheus
|
||||
app.kubernetes.io/name: fail2ban-geoip
|
||||
name: fail2ban-geoip
|
||||
namespace: fail2ban-prometheus
|
||||
spec:
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 9191
|
||||
protocol: TCP
|
||||
targetPort: 9191
|
||||
selector:
|
||||
app: fail2ban-geoip
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: fail2ban-prometheus-exporter
|
||||
|
|
|
@ -26,3 +26,31 @@ spec:
|
|||
matchLabels:
|
||||
app.kubernetes.io/instance: fail2ban-prometheus
|
||||
app.kubernetes.io/name: fail2ban-prometheus-exporter
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
app: fail2ban-geoip
|
||||
app.kubernetes.io/instance: fail2ban-prometheus
|
||||
app.kubernetes.io/name: fail2ban-geoip
|
||||
name: fail2ban-geoip-servicemonitor
|
||||
namespace: fail2ban-prometheus
|
||||
spec:
|
||||
attachMetadata:
|
||||
node: false
|
||||
endpoints:
|
||||
- interval: 10s
|
||||
path: /metrics
|
||||
port: http-metrics
|
||||
relabelings:
|
||||
- action: replace
|
||||
sourceLabels:
|
||||
- __meta_kubernetes_endpoint_node_name
|
||||
targetLabel: node
|
||||
scheme: http
|
||||
jobLabel: jobLabel
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: fail2ban-prometheus
|
||||
app.kubernetes.io/name: fail2ban-geoip
|
||||
|
|
Loading…
Reference in a new issue