Surveillance
Plateforme d'analyse et de surveillance dotée de tableaux de bord intuitifs pour la visualisation des indicateurs.
Interrogez Prometheus, InfluxDB, Elasticsearch, MySQL, PostgreSQL, CloudWatch et plus de 100 autres sources
Bibliothèque de visualisations riche, avec graphiques, jauges, cartes de chaleur, tableaux et panneaux personnalisés
Alertes flexibles avec Slack, PagerDuty, e-mail, webhooks et plus encore
Requêtes ad hoc et exploration des journaux avec des créateurs de requêtes intuitifs
Tableaux de bord dynamiques qui s'adaptent à différents environnements et filtres
Vaste écosystème de plugins pour les sources de données, les panneaux et les applications
# Add APT repository
sudo apt-get install -y apt-transport-https software-properties-common
sudo wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
# Install
sudo apt-get update
sudo apt-get install grafana
# Start service
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
# Access at http://localhost:3000
# Default login: admin/adminInstallation avec Docker :docker run -d --name=grafana -p 3000:3000 \
-v grafana-storage:/var/lib/grafana \
grafana/grafana-oss:latestDocker Compose (avec Prometheus) :version: '3'
services:
grafana:
image: grafana/grafana-oss:latest
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_INSTALL_PLUGINS=grafana-clock-panel
volumes:
- grafana-data:/var/lib/grafana
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
volumes:
grafana-data:
prometheus-data:
[server]
http_port = 3000
domain = grafana.yourdomain.com
root_url = https://grafana.yourdomain.com
[database]
type = postgres
host = localhost:5432
name = grafana
user = grafana
password = password
[security]
admin_user = admin
admin_password = secure_password
[smtp]
enabled = true
host = smtp.gmail.com:587
user = your-email@gmail.com
password = your-app-password
from_address = grafana@yourdomain.comAjoutez la source de données Prometheus (API) :curl -X POST http://admin:password@localhost:3000/api/datasources \
-H "Content-Type: application/json" \
-d '{
"name": "Prometheus",
"type": "prometheus",
"url": "http://localhost:9090",
"access": "proxy",
"isDefault": true
}'JSON du tableau de bord (tableau de bord CPU simple) :{
"dashboard": {
"title": "CPU Monitoring",
"panels": [{
"title": "CPU Usage",
"type": "graph",
"targets": [{
"expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)"
}]
}]
}
}Bonnes pratiques :Commencez en quelques minutes avec notre simple processus de déploiement VPS
Déployez en environ 2 minutes • Accès root complet • Support par ticket et email