Prometheus, Grafana, Node Exporter
Устанавливаем Prometheus, Grafana и Node Exporter
Install Prometheus, Grafana and Node Exporter
# pkg ins -y prometheus node_exporter grafana9
Включаем сервисы.
Enable services.
# sysrc prometheus_enable="YES"
# sysrc node_exporter_enable="YES"
# sysrc grafana_enable="YES"
Создаем конфиг Prometheus.
Create Prometheus config.
# vi /usr/local/etc/prometheus
global:
scrape_interval: 15s
evaluation_interval: 15s
#alerting:
# alertmanagers:
# - static_configs:
- targets: ['localhost:9093']
#rule_files:
#- alert_rules.yml
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9100']
Стартуем сервисы.
Start services.
# service prometheus start
# service node_exporter start
# service grafana start