diff --git a/prometheus/compose.yaml b/prometheus/compose.yaml index 32a8d36..b2a9cd9 100755 --- a/prometheus/compose.yaml +++ b/prometheus/compose.yaml @@ -15,7 +15,16 @@ services: - '--storage.tsdb.path=/prometheus' - '--storage.tsdb.retention.time=7200d' - '--storage.tsdb.retention.size=0' - image: prom/prometheus restart: unless-stopped + + pve-exporter: + image: prompve/prometheus-pve-exporter:latest + container_name: pve-exporter + ports: + - "9221:9221" + volumes: + - /opt/prometheus/pve.yml:/etc/prometheus/pve.yml:ro + restart: unless-stopped + networks: {} diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml old mode 100644 new mode 100755 index 325873c..65b0b65 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -10,6 +10,15 @@ global: external_labels: monitor: 'example' +#Storage-Optionen +storage: + tsdb: + retention: + time: 7200d # Deine gewünschte Zeit + size: 0 # Optional: Max Size (0 = deaktiviert) + + + # Alertmanager configuration alerting: alertmanagers: @@ -25,17 +34,11 @@ rule_files: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. - - job_name: 'prometheus' - - # Override the global default and scrape targets from this job every 5 seconds. - scrape_interval: 10s - scrape_timeout: 5s - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: ['localhost:9090'] +# - job_name: 'prometheus' +# scrape_interval: 10s +# scrape_timeout: 5s +# static_configs: +# - targets: ['localhost:9090'] # - job_name: node # # If prometheus-node-exporter is installed, grab stats about the local @@ -54,9 +57,7 @@ scrape_configs: # Long-Lived Access Token authorization: - credentials: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI2YjNjNjZkZjJjMDA0ZjMzYjllNmF -hMWY1NmFlMmU0ZSIsImlhdCI6MTc0MTk1ODk3OCwiZXhwIjoyMDU3MzE4OTc4fQ.jm7jrzMG6tt4Qnr46ZxMWZK6xKDkulKY -vLxvm0IFfBw" + credentials: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3ZGI4OTBkMTQ0NzI0NWJlOTk2N2VlZjFlMTM3MTJlNiIsImlhdCI6MTc2NjQ3NjQ2MiwiZXhwIjoyMDgxODM2NDYyfQ.1sx_LA3f1sEXlBe0-ONVCacNNIEe2KcsWu6MmZBmzTc" scheme: http static_configs: @@ -113,20 +114,20 @@ vLxvm0IFfBw" # - target_label: __address__ # replacement: 192.168.178.183:9619 # PVE exporter. -# - job_name: 'pve03' -# static_configs: -# - targets: -# - 192.168.178.204 -# metrics_path: /pve -## params: -## module: [default] -# relabel_configs: -# - source_labels: [__address__] -# target_label: __param_target -# - source_labels: [__param_target] -# target_label: instance -# - target_label: __address__ -# replacement: 192.168.178.183:9619 # PVE exporter. + - job_name: 'pve03' + static_configs: + - targets: + - 192.168.178.204 + metrics_path: /pve +# params: +# module: [pve03] + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: 192.168.178.183:9221 # PVE exporter. # - job_name: 'jellyfin' # scheme: http diff --git a/prometheus/pve.yml b/prometheus/pve.yml new file mode 100644 index 0000000..c422239 --- /dev/null +++ b/prometheus/pve.yml @@ -0,0 +1,6 @@ +default: + user: prometheus@pam + password: prometheus +# token_name: prometheus +# token_value: "e7e8bfd2-1a4a-405e-a48b-6ad3b51e7770" + verify_ssl: false