From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- data/prometheus-server/defaults | 1 + data/prometheus-server/prometheus.yml | 168 ++++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+) create mode 100644 data/prometheus-server/defaults create mode 100644 data/prometheus-server/prometheus.yml (limited to 'data/prometheus-server') diff --git a/data/prometheus-server/defaults b/data/prometheus-server/defaults new file mode 100644 index 0000000..f6b095a --- /dev/null +++ b/data/prometheus-server/defaults @@ -0,0 +1 @@ +ARGS="--web.external-url=http://monitoring.chudnick.com/prometheus --web.route-prefix=prometheus" diff --git a/data/prometheus-server/prometheus.yml b/data/prometheus-server/prometheus.yml new file mode 100644 index 0000000..31c2a53 --- /dev/null +++ b/data/prometheus-server/prometheus.yml @@ -0,0 +1,168 @@ +# Sample config for Prometheus. + +global: + scrape_interval: 15s + evaluation_interval: 15s + external_labels: + monitor: 'homelab-monitoring' + +# Alertmanager configuration +alerting: + alertmanagers: + - static_configs: + - targets: ['localhost:9093'] + +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. +rule_files: + # - "first_rules.yml" + # - "second_rules.yml" + +# A scrape configuration containing exactly one endpoint to scrape: +# Here it's Prometheus itself. +scrape_configs: + + - job_name: servers + static_configs: + - targets: [ + 'monitoring.home.local:9100', + 'ipasrv.home.local:9100', + 'pihole.home.local:9100', + 'proxmox.home.local:9100', + 'docker.home.local:9100', + 'jump.home.local:9100', + 'jenkins.home.local:9100', + 'games.home.local:9100', + ] + + - job_name: nginx + static_configs: + - targets: [ + 'docker.home.local:9113', + 'monitoring.home.local:9113', + 'jenkins.home.local:9113' + ] + metrics_path: "/metrics" + + - job_name: blackbox + metrics_path: /probe + static_configs: + - targets: [ + 'https://chudnick.com', + 'https://git.chudnick.com', + 'https://jellyfin.chudnick.com', + 'https://monitoring.chudnick.com/grafana', + 'https://monitoring.chudnick.com/prometheus', + 'https://searxng.chudnick.com/searxng/healthz', + 'https://ipasrv.home.local/ipa/ui', + 'https://pihole.chudnick.com/admin', + 'https://auth.chudnick.com', + 'https://drawio.chudnick.com', + 'https://music.chudnick.com', + 'https://rss.chudnick.com/', + 'https://dashboard.chudnick.com', + 'https://gitea.chudnick.com', + 'https://jenkins.chudnick.com/login', + 'https://cadvisor.chudnick.com', + 'https://invidious.chudnick.com', + 'https://qbittorrent.chudnick.com', + 'https://sonarr.chudnick.com', + 'https://radarr.chudnick.com', + 'https://lidarr.chudnick.com', + 'https://readarr.chudnick.com', + 'https://prowlarr.chudnick.com', + 'https://nextcloud.chudnick.com', + 'https://photos.chudnick.com', + 'https://logs.chudnick.com/metrics', + 'https://dashboard.chudnick.com', + 'https://wiki.chudnick.com', + 'https://weather.chudnick.com', + 'https://gpt.chudnick.com', + 'https://tasks.chudnick.com', + 'https://finances.chudnick.com', + 'https://finimporter.chudnick.com', + 'https://homeassistant.chudnick.com', + ] + labels: + module: 'http_2xx' + - targets: [ + 'https://router.chudnick.com', + 'https://ap.chudnick.com', + ] + labels: + module: 'http_2xx_noverify' + - targets: [ + 'https://games.home.local:47990', + ] + labels: + module: 'http_401_noverify' + - targets: ['mail.chudnick.com:25'] + labels: + module: smtp + - targets: ['mail.chudnick.com:993'] + labels: + module: imaps + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - source_labels: [module] + target_label: __param_module + - target_label: __address__ + replacement: 127.0.0.1:9115 + + + - job_name: applications + relabel_configs: + - source_labels: [path] + target_label: __metrics_path__ + regex: (.+) + replacement: $1 + - source_labels: [scheme] + target_label: __scheme__ + regex: (.+) + replacement: $1 + static_configs: + - targets: ['jellyfin.chudnick.com:443'] + labels: + path: "/metrics" + scheme: "https" + application: jellyfin + - targets: ['monitoring.chudnick.com:443'] + labels: + path: "/grafana/metrics" + group: grafana + scheme: https + application: grafana + - targets: ['localhost:9090'] + labels: + application: prometheus + path: "/prometheus/metrics" + - targets: ['localhost:9115'] + labels: + application: blackbox-exporter + path: "/metrics" + - targets: ['auth.chudnick.com'] + labels: + application: authelia + path: "/metrics" + - targets: ['piholemetrics.chudnick.com'] + labels: + application: pihole + path: "/metrics" + - targets: ['music.chudnick.com'] + labels: + application: navidrome + path: "/metrics" + - targets: ['cadvisor.chudnick.com'] + labels: + application: cadvisor + path: "/metrics" + - targets: ['gitea.chudnick.com'] + labels: + application: gitea + path: "/metrics" + - targets: ['jenkins.chudnick.com'] + labels: + application: jenkins + path: "/prometheus" -- cgit v1.2.3