Grafana
Em nó đóng vai trò monitor TOÀN BỘ các thiết bị trong Network.
Tất nhiên em nó chỉ là Dashboard, phía sau em nó là
Prometheus
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # 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"
- "/etc/prometheus/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" ]
- job_name: "alertmanager"
static_configs:
- targets: [ "localhost:9093" ]
- job_name: "physical"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
# node_exporter
- targets: [ '192.168.1.4:9100' ]
labels:
instance: 'gatekeeper'
service: 'node_exporter'
# process_exporter
- targets: [ '192.168.1.4:9256' ]
labels:
instance: 'gatekeeper'
service: 'process_exporter'
# node_exporter
- targets: [ '192.168.1.11:9100' ]
labels:
instance: 'develop'
service: 'node_exporter'
- job_name: "workstation"
static_configs:
# node_exporter
- targets: [ '192.168.1.30:9100' ]
labels:
instance: 'smb'
service: 'node_exporter'
- targets: [ '192.168.1.39:9100' ]
labels:
instance: 'hosting'
service: 'node_exporter'
# process_exporter
- targets: [ '192.168.1.30:9256' ]
labels:
instance: 'smb'
service: 'process_exporter'
Node exporter
- Prometheus
- AlertManager
- Physical
- gatekeeper – 192.168.1.4
- workstation – 192.168.1.11
- ESXi
- smb – 192.168.1.30
- hosting – 192.168.1.39
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/mnt/data/prometheus \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries \
--web.listen-address=0.0.0.0:9090 \
--web.enable-lifecycle \
--web.enable-admin-api
Node exporter store data trên 1 em HDD khác để giảm “write” cho SSD :p
Tất nhiên trên chính Gateway cũng sẽ có các exporters
- Node Exporter
- Process Exporter