mirror of
https://github.com/0rph3us/monitoring.git
synced 2025-08-16 16:42:31 +02:00
add prometheus, cadvisor and node-exporter
This commit is contained in:
31
configs/prometheus.yml
Normal file
31
configs/prometheus.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
# my global config
|
||||
global:
|
||||
scrape_interval: 60s # By default, scrape targets every 15 seconds.
|
||||
evaluation_interval: 60s # By default, scrape targets every 15 seconds.
|
||||
# scrape_timeout is set to the global default (10s).
|
||||
|
||||
# Attach these labels to any time series or alerts when communicating with
|
||||
# external systems (federation, remote storage, Alertmanager).
|
||||
external_labels:
|
||||
monitor: 'my-project'
|
||||
|
||||
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||
rule_files:
|
||||
- "alert.rules"
|
||||
# - "first.rules"
|
||||
# - "second.rules"
|
||||
|
||||
# A scrape configuration containing exactly one endpoint to scrape:
|
||||
# Here it's Prometheus itself.
|
||||
scrape_configs:
|
||||
# The job name is added as a label `job=<job_name>` 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: 20s
|
||||
|
||||
# metrics_path defaults to '/metrics'
|
||||
# scheme defaults to 'http'.
|
||||
|
||||
static_configs:
|
||||
- targets: ['localhost:9090','cadvisor:8080','node-exporter-loki:9100']
|
@@ -4,7 +4,7 @@
|
||||
# Carbon metrics are kept for 30 days in resolution of 10 seconds.
|
||||
[carbon]
|
||||
pattern = ^carbon\.
|
||||
retentions = 10s:30d
|
||||
retentions = 1m:30d
|
||||
|
||||
# User metrics are kept for:
|
||||
# 24 hours in resolution of 5 seconds
|
||||
@@ -12,5 +12,5 @@ retentions = 10s:30d
|
||||
# 1 year in resolution of 5 minutes
|
||||
[user]
|
||||
pattern = .*
|
||||
retentions = 5s:24h,1m:30d,5m:1y
|
||||
retentions = 30s:48h,2m:30d,20m:1y,2h:5y
|
||||
|
||||
|
Reference in New Issue
Block a user