Created
June 30, 2020 09:07
-
-
Save kunthar/e7aa391719f93722f7bc73c23175d745 to your computer and use it in GitHub Desktop.
Prometheus global config example Mariadb Galera, Redis, Haproxy, Gluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my global config | |
global: | |
scrape_interval: 60s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | |
evaluation_interval: 60s # Evaluate rules every 15 seconds. The default is every 1 minute. | |
# scrape_timeout is set to the global default (10s). | |
# Alertmanager configuration | |
alerting: | |
alertmanagers: | |
- static_configs: | |
- targets: | |
- alertmanager: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: | |
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. | |
- job_name: 'prometheus' | |
# metrics_path defaults to '/metrics' | |
# scheme defaults to 'http'. | |
static_configs: | |
- targets: ['localhost:9090', 'localhost:9100'] | |
#Galera servers | |
- job_name: dl-galera-system | |
static_configs: | |
- targets: ['10.10.0.201:9100', '10.10.0.202:9100', '10.10.0.203:9100'] | |
labels: | |
alias: dl-galera-system | |
- job_name: dl-galera-cluster | |
static_configs: | |
- targets: ['10.10.0.201:9104', '10.10.0.202:9104', '10.10.0.203:9104'] | |
labels: | |
alias: dl-galera-cluster | |
# Redis Servers | |
- job_name: dl-redis-master | |
static_configs: | |
- targets: ['10.10.0.214:9121'] | |
labels: | |
alias: dl-redis-master | |
- job_name: dl-redis-system | |
static_configs: | |
- targets: ['10.10.0.214:9100', '10.10.0.215:9100', '10.10.0.216:9100'] | |
labels: | |
alias: dl-redis-system | |
# Glusterfs Servers | |
- job_name: dl-gluster-system | |
static_configs: | |
- targets: ['10.10.0.204:9100', '10.10.0.205:9100', '10.10.0.206:9100'] | |
labels: | |
alias: dl-gluster-system | |
- job_name: dl-gluster-cluster | |
static_configs: | |
- targets: ['10.10.0.204:9713', '10.10.0.205:9713', '10.10.0.206:9713'] | |
labels: | |
alias: dl-gluster-cluster | |
# Haproxy Servers | |
- job_name: dl-haproxy-system | |
static_configs: | |
- targets: ['10.10.0.207:9100', '10.10.0.208:9100'] | |
labels: | |
alias: dl-haproxy-system | |
- job_name: dl-haproxy-cluster | |
static_configs: | |
- targets: ['10.10.0.207:9101', '10.10.0.208:9101'] | |
labels: | |
alias: dl-haproxy-cluster | |
# Keepalived cluster | |
- job_name: dl-keepalived-cluster | |
static_configs: | |
- targets: ['10.10.0.207:9102', '10.10.0.208:9102'] | |
labels: | |
alias: dl-keepalived-cluster | |
# dlmanager system | |
- job_name: dladmin-system | |
static_configs: | |
- targets: ['10.10.0.209:9100'] | |
labels: | |
alias: dladmin-system | |
#Used exporters list: | |
#Check here first: https://prometheus.io/docs/instrumenting/exporters/ | |
# For all systems, use node exporter to collect general metrics | |
https://prometheus.io/docs/guides/node-exporter/ | |
# Use specific exporter as needed. | |
https://github.com/oliver006/redis_exporter | |
https://github.com/ofesseler/gluster_exporter | |
https://github.com/prometheus/haproxy_exporter | |
https://github.com/prometheus/mysqld_exporter | |
https://github.com/cafebazaar/keepalived-exporter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment