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

60 lines
1 KiB
YAML
Raw Normal View History

2023-07-24 01:50:51 +00:00
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:
2023-07-24 02:00:40 +00:00
- ip: 192.168.2.10
2023-07-24 01:50:51 +00:00
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:
2023-07-24 01:56:11 +00:00
- port: metrics
interval: 60s
scrapeTimeout: 15s
path: /metrics
2023-07-24 01:50:51 +00:00
#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