Outils pour utilisateurs

Outils du site


gestion_configuration:monitoring

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
gestion_configuration:monitoring [2021/09/09 02:30] – [Grafana] sgariepygestion_configuration:monitoring [2022/02/02 00:42] (Version actuelle) – modification externe 127.0.0.1
Ligne 149: Ligne 149:
   * [[https://prometheus.io/docs/instrumenting/exporters/|Prometheus List]]   * [[https://prometheus.io/docs/instrumenting/exporters/|Prometheus List]]
   * [[https://github.com/dockersamples/aspnet-monitoring|ASP.NET]]   * [[https://github.com/dockersamples/aspnet-monitoring|ASP.NET]]
 +  * [[https://github.com/prometheus/blackbox_exporter|Blackbox Exporter]] (HTTP, SSL, DNS, etc)
  
 +Applications .NET Framework:
 +
 +  * [[https://github.com/prometheus-net/prometheus-net|prometheus-net]]
 +
 +NodeJS
 +
 +  * [[https://github.com/siimon/prom-client|prom-client]]
 ===== Exposer des métriques de Docker ===== ===== Exposer des métriques de Docker =====
  
Ligne 157: Ligne 165:
   * Builds: Triggered count, Cancelled count, Failure count (Syntax error, Empty dockerfile, Command Error)   * Builds: Triggered count, Cancelled count, Failure count (Syntax error, Empty dockerfile, Command Error)
   * Containers: Container count (by state), Action duration (Create and start), Healthchecks (Fired and failed)   * Containers: Container count (by state), Action duration (Create and start), Healthchecks (Fired and failed)
- 
- 
- 
  
 Activer les metrics dans Docker: Activer les metrics dans Docker:
Ligne 180: Ligne 185:
  
   $ sudo systemctl restart docker   $ sudo systemctl restart docker
 +
 +Vérifier que le endpoint fonctionne:
 +
 +  $ sudo lsof -Pi TCP -a -c dockerd
 +  
 +et / ou
 +  
 +  $ wget localhost:9323/metrics
 +
 +
  
 Faire en sorte que le host accepte les connections du container: Faire en sorte que le host accepte les connections du container:
Ligne 202: Ligne 217:
   $ docker build -t prometheus-vps:0.4.2 .   $ docker build -t prometheus-vps:0.4.2 .
   $ docker container run --detach --publish published=49155,target=9090,protocol=tcp --add-host=host.docker.internal:host-gateway --name prometheus-vps prometheus-vps:0.4.2   $ docker container run --detach --publish published=49155,target=9090,protocol=tcp --add-host=host.docker.internal:host-gateway --name prometheus-vps prometheus-vps:0.4.2
 +
 +Version non publiée:
 +
 +  $ docker container run -d --add-host=host.docker.internal:host-gateway --name prometheus-vps prometheus-vps:0.5.1
 +
 +
 +  $ docker container run -d -p 49155:9090 --add-host=host.docker.internal:host-gateway --name prometheus prometheus-vps:0.5.2
 +
  
 Commandes de gestion du container prometheus: Commandes de gestion du container prometheus:
Ligne 214: Ligne 237:
 Utiliser [[https://quay.io/repository/prometheus/node-exporter|Node Explorer]] Utiliser [[https://quay.io/repository/prometheus/node-exporter|Node Explorer]]
  
-  $ docker run -d -p 9100:9100 --net="host" prom/node-exporter+  $ docker container run -d -p 9100:9100 --net="host" --name node-exporter prom/node-exporter 
 +  $ docker container run -d --net="host" --name node-exporter prom/node-exporter
  
 Config: Config:
Ligne 223: Ligne 247:
       - targets: ['172.17.0.1:9100']       - targets: ['172.17.0.1:9100']
 </code> </code>
 +
 +===== Autres =====
 +
 +  * [[https://github.com/Lusitaniae/apache_exporter|Apache Exporter]]
 +  * [[https://github.com/pjhampton/kibana-prometheus-exporter|Kibana]]
 +
  
 ====== Prometheus Config Examples ====== ====== Prometheus Config Examples ======
Ligne 245: Ligne 275:
 Construire des dashboards avec Grafana. Construire des dashboards avec Grafana.
  
-Image officielle sur Docker Hub: [[https://hub.docker.com/r/grafana/grafana|grafana/grafana]]+Image officielle sur Docker Hub: [[https://hub.docker.com/r/grafana/grafana|grafana/grafana]] et [[https://grafana.com/grafana/dashboards|Grafana Dashboards]]. 
 + 
 +  $ docker container run -d -p 13000:3000 --network bridge grafana/grafana:8.1.3 
 + 
 +Default image config for user:pass : admin:admin
  
 +Dashboards:
  
 +  * Prometheus 2.0 Stats (suggéré à même Grafana dans l'onglet Dashboards)
 +  * [[https://grafana.com/grafana/dashboards/1860|Node Exporter]] ID: 1860
 +  * [[https://grafana.com/grafana/dashboards/7587|Blackbox]] ID: 7587
  
  
 +Commit:
  
 +  $ docker container commit 11sha vps/grafana:0.0.1
  
gestion_configuration/monitoring.1631147432.txt.gz · Dernière modification : 2022/02/02 00:43 (modification externe)