diff --git a/cluster/apps/monitoring/external-monitors/air-quality.yaml b/cluster/apps/monitoring/external-monitors/air-quality.yaml new file mode 100644 index 0000000..f617431 --- /dev/null +++ b/cluster/apps/monitoring/external-monitors/air-quality.yaml @@ -0,0 +1,57 @@ +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.1 + 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: + - interval: 60s + port: 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 diff --git a/cluster/apps/monitoring/external-monitors/kustomization.yaml b/cluster/apps/monitoring/external-monitors/kustomization.yaml new file mode 100644 index 0000000..12d327f --- /dev/null +++ b/cluster/apps/monitoring/external-monitors/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./air-quality.yaml \ No newline at end of file diff --git a/cluster/apps/monitoring/kustomization.yaml b/cluster/apps/monitoring/kustomization.yaml index a987d52..119d034 100644 --- a/cluster/apps/monitoring/kustomization.yaml +++ b/cluster/apps/monitoring/kustomization.yaml @@ -8,4 +8,5 @@ resources: - ./alertmanager-gotify-bridge - ./victoria-metrics - ./varken -- ./proxmoxve-exporter \ No newline at end of file +- ./proxmoxve-exporter +- ./external-monitors \ No newline at end of file