k3s-cluster/cluster/apps/monitoring/external-monitors/air-quality.yaml

60 lines
1.0 KiB
YAML

kind: Service
apiVersion: v1
metadata:
name: air-quality-external
namespace: monitoring
labels:
app: air-quality-external
spec:
type: ClusterIP
ports:
- name: metrics
port: 80
targetPort: 80
---
kind: Endpoints
apiVersion: v1
metadata:
name: air-quality-external
namespace: monitoring
subsets:
- addresses:
- ip: 192.168.2.10
ports:
- name: metrics
port: 80
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: air-quality-external
namespace: monitoring
labels:
release: kube-prometheus-stack
spec:
selector:
matchLabels:
app: air-quality-external
endpoints:
- port: metrics
interval: 60s
scrapeTimeout: 15s
path: /metrics
#kind: Probe
#apiVersion: monitoring.coreos.com/v1
#metadata:
# name: air-quality-prober
# namespace: monitoring
# labels:
# release: kube-prometheus-stack
#spec:
# jobName: air-quality
# interval: 60s
# prober:
# url: 192.168.2.1:80/metrics
# targets:
# staticConfig:
# static:
# - https://www.google.com