{"id":19866,"date":"2021-03-11T09:32:39","date_gmt":"2021-03-11T09:32:39","guid":{"rendered":"https:\/\/www.centreon.com\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/"},"modified":"2021-03-11T09:07:21","modified_gmt":"2021-03-11T09:07:21","slug":"interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte","status":"publish","type":"post","link":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/","title":{"rendered":"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Connecter Centreon \u00e0 Prometheus gr\u00e2ce \u00e0 l\u2019installation du Plugin Pack centreon-pack-cloud-prometheus-api vous permet d\u2019exploiter les m\u00e9triques collect\u00e9es par Prometheus directement dans Centreon et de centraliser les r\u00e9sultats de votre collecte de m\u00e9triques et de l\u2019envoi d\u2019alertes au sein de Centreon.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Via ses m\u00e9canismes de collecte et son int\u00e9gration dans de nombreuses stacks de containerisation et d\u2019orchestration, Prometheus permet une grande agilit\u00e9 dans la collecte d&rsquo;informations \u00e9ph\u00e9m\u00e8res et\/ou dynamiques. Son langage PromQL permet d\u2019interroger de mani\u00e8re optimis\u00e9e les donn\u00e9es collect\u00e9es et c\u2019est sur ce concept que repose l\u2019int\u00e9gration avec Centreon. Cet article vous explique comment en tirer pleinement parti !<\/span><\/p>\n<h2><span style=\"font-weight: 400; color: #82bd00;\">Connecter Prometheus avec Centreon pour disposer d\u2019une vision Cloud-to-Edge \u00e0 360 degr\u00e9s\u00a0\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Vous avez surement pris connaissance du <\/span><a href=\"https:\/\/www.centreon.com\/barometre-de-la-supervision-it-etats-des-lieux-tendances-et-enjeux-blog\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Barom\u00e8tre de la supervision IT<\/span><\/a><span style=\"font-weight: 400;\"> r\u00e9alis\u00e9 par Centreon avec le cabinet Vanson Bourne.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Cette \u00e9tude, r\u00e9alis\u00e9e aupr\u00e8s de 600 professionnels IT dans le monde, r\u00e9v\u00e8le que 14 outils de supervision IT en moyenne sont utilis\u00e9s par les DSI et que la premi\u00e8re attente en mati\u00e8re d\u2019outils de supervision est son interop\u00e9rabilit\u00e9 et sa capacit\u00e9 \u00e0 s\u2019int\u00e9grer dans son \u00e9cosyst\u00e8me IT.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Henri Ford disait : \u00ab Se r\u00e9unir est un d\u00e9but, rester ensemble est un progr\u00e8s, travailler ensemble est une r\u00e9ussite \u00bb. Aujourd&rsquo;hui nous vous proposons de faire travailler ensemble Centreon avec Prometheus, une solution particuli\u00e8rement performante en mati\u00e8re de stockage de m\u00e9triques issues du cloud native et de conteneurs.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">En interfa\u00e7ant Centreon avec cet outil, et en int\u00e9grant les m\u00e9triques issues de Prometheus dans la plateforme de supervision Centreon, vous pourrez disposer d\u2019une meilleure visibilit\u00e9. Vous exploitez ainsi les qualit\u00e9s de ces deux outils, consolidez les donn\u00e9es collect\u00e9es dans une console unique et \u00e9mettez les alertes de mani\u00e8re centralis\u00e9e. Elle n\u2019est pas belle la vie ?<\/span><\/p>\n<table style=\"width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 49.9476%;\"><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-65497\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-550x120-1-300x65.png\" alt=\"\" width=\"209\" height=\"46\" \/><\/td>\n<td style=\"width: 49.4241%;\"><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61049 \" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2020\/10\/Centreon_Logo_RVB_HD_Cut-1-300x67.png\" alt=\"\" width=\"206\" height=\"46\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 49.9476%;\"><span style=\"font-weight: 400;\">Orient\u00e9 m\u00e9triques<\/span><\/td>\n<td style=\"width: 49.4241%;\"><span style=\"font-weight: 400;\">Orient\u00e9 statut, alertes et supervision<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 49.9476%;\"><span style=\"font-weight: 400;\">Faible fr\u00e9quence de collecte via HTTP et une approche \u00e0 court terme du stockage et de la visualisation des donn\u00e9es<\/span><\/td>\n<td style=\"width: 49.4241%;\"><span style=\"font-weight: 400;\">Historisation et capacit\u00e9 d\u2019agr\u00e9gation des donn\u00e9es<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 49.9476%;\"><span style=\"font-weight: 400;\">Container native, large biblioth\u00e8que d&rsquo;<\/span><i><span style=\"font-weight: 400;\">exporters<\/span><\/i><span style=\"font-weight: 400;\"> de n\u0153uds, facilit\u00e9 de d\u00e9ploiement dans les clusters K8<\/span><\/td>\n<td style=\"width: 49.4241%;\"><span style=\"font-weight: 400;\">Visibilit\u00e9 Cloud-to-edge, acc\u00e8s aux<\/span> <span style=\"font-weight: 400;\">m\u00e9triques et aux alertes dans une console unique\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Connecter Prometheus avec Centreon vous permet de disposer d\u2019une vision \u00e0 360 degr\u00e9s de vos infrastructures Cloud-to-Edge et de vos applications quelle que soit la mani\u00e8re dont elles sont d\u00e9ploy\u00e9es ou orchestr\u00e9es.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La centralisation de la collecte et de l\u2019alerting dans Centreon offre :\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Une meilleure visibilit\u00e9, toutes les personnes exploitant la solution ont acc\u00e8s \u00e0 l\u2019ensemble des indicateurs collect\u00e9s au travers de vos diff\u00e9rents outils,<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Une meilleure exploitation des informations IT et m\u00e9tiers en corr\u00e9lant et partageant l\u2019ensemble de vos donn\u00e9es collect\u00e9es gr\u00e2ce aux modules de la solution Business de Centreon.<\/span><\/li>\n<\/ul>\n<h2><span style=\"color: #82bd00;\"><span style=\"font-weight: 400;\">Etape 1 : Installation et d\u00e9ploiement du Plugin Pack <\/span><i><span style=\"font-weight: 400;\">Prometheus Server<\/span><\/i><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Pour exploiter les m\u00e9triques Prometheus dans la console Centreon, vous devez r\u00e9aliser l\u2019installation des briques n\u00e9cessaires au fonctionnement du Plugin Pack <\/span><i><span style=\"font-weight: 400;\">Prometheus Server <\/span><\/i><span style=\"font-weight: 400;\">en deux \u00e9tapes.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sur le serveur Central, installez le package RPM permettant l\u2019ajout des Mod\u00e8les de supervision :\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">yum install centreon-pack-cloud-prometheus-api<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Dans le menu \u201cConfiguration &gt; Packs de plugins\u201d, recherchez \u201cPrometheus\u201d et cliquez sur le signe <\/span><b>\u2018+\u2019<\/b><span style=\"font-weight: 400;\"> pour finaliser l\u2019installation.<\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-65504 size-full\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-01-install-plugin-pack.png\" alt=\"\" width=\"746\" height=\"398\" \/><\/p>\n<p><b><i>Remarque :<\/i><\/b><i><span style=\"font-weight: 400;\"> Si vous utilisez la solution IT-100 ou un mode de souscription en ligne, vous pouvez directement installer le Pack depuis le menu \u201cConfiguration &gt; Packs de plugins\u201d comme le montre la capture pr\u00e9c\u00e9dente.\u00a0<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">Une fois le Pack install\u00e9, la description de son contenu ainsi qu\u2019un renvoi vers sa documentation sont accessibles.<\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65511\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-02-plugin-pack-content.png\" alt=\"\" width=\"488\" height=\"237\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Sur les Collecteurs allant r\u00e9aliser une supervision via des requ\u00eates PromQL, installez le Plugin :<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">yum install centreon-plugin-Cloud-Prometheus-Api\n\n<\/span><\/pre>\n<h2><span style=\"font-weight: 400; color: #82bd00;\">Etape 2 : Configuration de votre Serveur Prometheus dans Centreon<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">La configuration d\u2019un serveur Prometheus se fait de mani\u00e8re classique via la page \u201cConfiguration\u00a0 &gt; H\u00f4tes\u201d et l\u2019utilisation du bouton <\/span><b>Ajouter<\/b><span style=\"font-weight: 400;\">. Cela vous permet de d\u00e9finir les propri\u00e9t\u00e9s de votre serveur et de lui appliquer le Mod\u00e8le ad\u00e9quat (Cloud-Prometheus-Api-Custom).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ici, nous allons nous interfacer avec le serveur \u201camzprometheus.int.centreon.com\u201d d\u00e9ploy\u00e9 via Kubernetes en \u00e9coutant sur le port 80 en HTTP. L\u2019API v1 de Prometheus sera utilis\u00e9e. Ces param\u00e8tres sont \u00e0 adapter en fonction de votre environnement.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Voici la d\u00e9finition de l\u2019H\u00f4te associ\u00e9 :<\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-65517\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-03A-host-configuration-1024x597.png\" alt=\"\" width=\"1024\" height=\"597\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Activez la cr\u00e9ation des Services li\u00e9s au Mod\u00e8le et sauvegardez votre configuration.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Vous pouvez d\u00e9ployer votre configuration afin d\u2019obtenir la supervision par d\u00e9faut. Celle-ci inclut un Ping et le statut des Targets d\u00e9clar\u00e9s dans Prometheus.<\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-65523\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-03B-standard-monitoring-deployment-1024x176.png\" alt=\"\" width=\"1024\" height=\"176\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Le connecteur fonctionne correctement et il d\u00e9tecte ci-dessus un d\u00e9faut sur le statut d\u2019une ou plusieurs <\/span><i><span style=\"font-weight: 400;\">Targets<\/span><\/i><span style=\"font-weight: 400;\"> d\u00e9finies au niveau de Prometheus qui ne sont pas vues comme \u201cup\u201d.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u2019est un indicateur int\u00e9ressant mais nous allons voir que ce connecteur permet \u00e9galement de faire des choses beaucoup plus puissantes en interrogeant les donn\u00e9es collect\u00e9es au travers de ces <\/span><i><span style=\"font-weight: 400;\">Targets<\/span><\/i><span style=\"font-weight: 400;\">. <\/span><\/p>\n<h2><span style=\"font-weight: 400; color: #82bd00;\">Etape 3 : Supervision du CPU de vos conteneurs en agr\u00e9geant des requ\u00eates PromQL en un service Centreon<\/span><\/h2>\n<h3><span style=\"color: #42b02a;\">Contexte et m\u00e9triques<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">cAdvisor est g\u00e9n\u00e9ralement d\u00e9ploy\u00e9 afin d\u2019obtenir des m\u00e9triques d\u2019usage et de performances des conteneurs. Les m\u00e9triques expos\u00e9es sont brutes et n\u00e9cessitent souvent des op\u00e9rations suppl\u00e9mentaires pour \u00eatre exploit\u00e9es de mani\u00e8re optimale.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Dans le cas de l\u2019utilisation CPU, celle-ci est particuli\u00e8rement critique car elle peut \u00eatre le d\u00e9clencheur d\u2019une instanciation d\u2019un nouveau conteneur lorsqu\u2019un seuil est d\u00e9pass\u00e9. C\u2019est souvent le cas lors de l\u2019utilisation de Kubernetes par exemple et nous allons voir comment vous pouvez tracer l\u2019\u00e9volution de la consommation du processeur selon l\u2019axe de votre choix !<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Les m\u00e9triques expos\u00e9es par cAdvisor et <\/span><i><span style=\"font-weight: 400;\">scrapp\u00e9es <\/span><\/i><span style=\"font-weight: 400;\">par Prometheus que nous allons exploiter sont les suivantes :\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\">\n<pre><span style=\"font-weight: 400;\">container_cpu_usage_seconds_total :<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">compteur indiquant le temps en secondes o\u00f9 le CPU est utilis\u00e9 par un conteneur.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">\n<pre><span style=\"font-weight: 400;\">container_cpu_cfs_throttled_seconds_total :<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">\u00a0compteur indiquant le temps en seconde o\u00f9 l\u2019utilisation CPU du conteneur a \u00e9t\u00e9 limit\u00e9e.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Ces m\u00e9triques sont des compteurs, cela signifie qu\u2019elles seront plus facilement interpr\u00e9tables apr\u00e8s application d\u2019une transformation. Ici nous allons comparer l\u2019\u00e9volution entre chaque point (fonction rate()), sur une p\u00e9riode de 5 minutes ([5m]) et en multipliant le nombre obtenu par 100 pour obtenir un pourcentage (*100).\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nous introduisons aussi le concept de dimensions au sens Prometheus, nous allons exclure tous les conteneurs avec le nom \u2018POD\u2019 et n\u2019ayant aucun namespace associ\u00e9.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Cela donne par exemple la requ\u00eate suivante pour la m\u00e9trique <\/span><em><span style=\"font-weight: 400;\">container_cpu_usage_seconds_total<\/span><\/em><span style=\"font-weight: 400;\"> :\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">rate(container_cpu_usage_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Vous pouvez valider la disponibilit\u00e9 de ces m\u00e9triques directement via l\u2019interface de requ\u00eate Prometheus.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-65536\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-03C-standard-monitoring-deployment-1024x363.jpg\" alt=\"\" width=\"1024\" height=\"363\" \/><\/span><\/p>\n<h3><span style=\"color: #42b02a;\">Construire et tester la ligne de commande<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Comme pr\u00e9cis\u00e9 dans la description du Plugin Pack, le mode Expression que nous allons d\u00e9sormais utiliser est un mode g\u00e9n\u00e9rique. Il permet donc de faire \u00e0 peu pr\u00e8s tout ce que vous voulez mais n\u00e9cessite une configuration un peu plus cons\u00e9quente.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Dans ce cas, il est recommand\u00e9 de d\u2019abord tester la construction de votre commande via le terminal, toujours en utilisant le compte centreon-engine. Cela est g\u00e9n\u00e9ralement indispensable si c\u2019est la premi\u00e8re fois que vous utilisez ce Plugin.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Comme pour toutes les sondes, il est utile d&rsquo;ex\u00e9cuter le script avec l\u2019option <\/span><em><span style=\"font-weight: 400;\">&#8211;help<\/span><\/em><span style=\"font-weight: 400;\"> pour prendre connaissances des diff\u00e9rents param\u00e8tres disponibles :\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\/usr\/lib\/centreon\/plugins\/centreon_prometheus_api.pl --plugin=cloud::prometheus::restapi::plugin --mode=expression --help<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Voyons maintenant comment personnaliser la commande avec vos propres param\u00e8tres, ci-dessous, remplacez les valeurs des options <\/span><em><span style=\"font-weight: 400;\">&#8211;hostname<\/span><\/em><span style=\"font-weight: 400;\"> et <\/span><em><span style=\"font-weight: 400;\">&#8211;port<\/span><\/em><span style=\"font-weight: 400;\"> par celles correspondant \u00e0 la configuration de votre serveur Prometheus :<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\/usr\/lib\/centreon\/plugins\/centreon_prometheus_api.pl --plugin=cloud::prometheus::restapi::plugin --mode=expression --hostname=\u2019<\/span><b>amzprometheus.int.centreon.com\u2019<\/b><span style=\"font-weight: 400;\"> --port<\/span><b>=\u201980\u2019 -<\/b><span style=\"font-weight: 400;\">-url-path=<\/span><b>'\/api\/v1' <\/b><span style=\"font-weight: 400;\">--proto=\u2019<\/span><b>http\u2019<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Maintenant, nous allons entrer dans le vif du sujet et sp\u00e9cifier les requ\u00eates permettant d\u2019obtenir les m\u00e9triques d\u00e9crites pr\u00e9c\u00e9demment :<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\/usr\/lib\/centreon\/plugins\/centreon_prometheus_api.pl --plugin=cloud::prometheus::restapi::plugin --mode=expression --hostname=my.<\/span><a href=\"http:\/\/prometheus.swarm.macif.fr\/\"><span style=\"font-weight: 400;\">prometheus.instance.<\/span><\/a><span style=\"font-weight: 400;\">int --port=80 --url-path='\/api\/v1' --proto=\u2019http\u2019<\/span> <b>--query='utilization,rate(container_cpu_usage_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100' --query='throttled,rate(container_cpu_cfs_throttled_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100'<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">La syntaxe de l\u2019option pour sp\u00e9cifier sa requ\u00eate se d\u00e9compose de la mani\u00e8re suivante : &#8211;query=centreon_name,promql_expression. La partie centreon_name transforme le nom de la m\u00e9trique pour rendre son utilisation plus facile par la suite via la fonction label_replace de Prometheus. La partie promql_expression est un simple copier\/coller de la requ\u00eate que vous utilisez dans l\u2019interface Prometheus, simple non ?\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Une m\u00e9trique est li\u00e9e \u00e0 de multiples dimensions, la puissance du connecteur r\u00e9side dans le fait que vous choisissez celle qui est la plus pertinente pour votre supervision, dans notre cas nous souhaitons avoir des valeurs agr\u00e9g\u00e9es au niveau des n\u0153uds.<\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-65542\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-04-prom-node-dimension-readable-1024x193.png\" alt=\"\" width=\"1024\" height=\"193\" \/><\/p>\n<pre><span style=\"font-weight: 400;\">\/usr\/lib\/centreon\/plugins\/centreon_prometheus_api.pl --plugin=cloud::prometheus::restapi::plugin --mode=expression --mode=expression --hostname=my.<\/span><a href=\"http:\/\/prometheus.swarm.macif.fr\/\"><span style=\"font-weight: 400;\">prometheus.instance.<\/span><\/a><span style=\"font-weight: 400;\">int --port=80 --url-path='\/api\/v1' --proto=\u2019http\u2019<\/span> <span style=\"font-weight: 400;\">--query='utilization,rate(container_cpu_usage_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100' --query='throttled,rate(container_cpu_cfs_throttled_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100' <\/span><b>--instance=\u2019node\u2019<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Afin de faciliter le travail des op\u00e9rateurs ou du consommateur du contr\u00f4le, des options sont disponibles pour pr\u00e9ciser un formatage afin qu\u2019il s\u2019adapte en fonction de la ou des m\u00e9trique(s) r\u00e9cup\u00e9r\u00e9es. C\u2019est ici que le renommage de la m\u00e9trique Prometheus prend tout son sens, nous allons les utiliser pour afficher leur valeur dans le message de sortie.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\/usr\/lib\/centreon\/plugins\/centreon_prometheus_api.pl --plugin=cloud::prometheus::restapi::plugin --mode=expression --mode=expression --hostname=my.<\/span><a href=\"http:\/\/prometheus.swarm.macif.fr\/\"><span style=\"font-weight: 400;\">prometheus.instance.<\/span><\/a><span style=\"font-weight: 400;\">int --port=80 --url-path='\/api\/v1' --proto=\u2019http\u2019<\/span> <span style=\"font-weight: 400;\">--query='utilization,rate(container_cpu_usage_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100' --query='throttled,rate(container_cpu_cfs_throttled_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100'<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">--instance=\u2019node\u2019\u00a0 <\/span><b>--output='Node %{instance} Average: %{utilization}%, Throttled: %{throttled}%' --multiple-output='All nodes CPU metrics are OK'<\/b><\/pre>\n<p><span style=\"font-weight: 400;\">Avec les options ci-dessus, si aucun d\u00e9passement n\u2019est d\u00e9tect\u00e9 et que tous les nodes ont des mesures CPU satisfaisantes, le message affich\u00e9 dans Centreon sera : <\/span><b><em>OK: All nodes CPU metrics are ok<\/em>.<\/b><span style=\"font-weight: 400;\">\u00a0 Si le r\u00e9sultat de notre filtre est un conteneur unique, nous obtiendrons un message d\u00e9taill\u00e9 comme celui-ci : <\/span><em><b>OK: nodes \u2018my_node_name\u2019 Average: 4.3413%, Throttled: 0.1214%<\/b><span style=\"font-weight: 400;\">.<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400;\">Et voil\u00e0 ! Voici la commande que nous venons de cr\u00e9er :<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">\/usr\/lib\/centreon\/plugins\/\/centreon_prometheus_api.pl  --plugin=cloud::prometheus::restapi::plugin --mode=expression --proto='http'  --hostname=amzprometheus.int.centreon.com --url-path='\/api\/v1' --port='80'  --query='utilization,rate(container_cpu_usage_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100'  --query='throttled,rate(container_cpu_cfs_throttled_seconds_total{container!~\"POD\",namespace!=\"\"}[5m])*100' <\/span>\n<span style=\"font-weight: 400;\">--instance='node' <\/span>\n<span style=\"font-weight: 400;\">--output='Node %{instance} Average (Last 5min): %{utilization}%, Throttled(Last 5min): %{throttled}%' --multiple-output='All CPU metrics are OK' --verbose --use-new-perfdata<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Et son retour :<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">OK: All CPU metrics are OK | '<\/span><a href=\"http:\/\/amzkubemaster.int.centreon.com#utilization'=0.4481031485383696;;\"><span style=\"font-weight: 400;\">amzkubemaster.int.centreon.com#utilization'=0.4481031485383696;;<\/span><\/a><span style=\"font-weight: 400;\">;; '<\/span><a href=\"http:\/\/amzkubemaster.int.centreon.com#throttled'=2.4699414529294077;;\"><span style=\"font-weight: 400;\">amzkubemaster.int.centreon.com#throttled'=2.4699414529294077;;<\/span><\/a><span style=\"font-weight: 400;\">;; '<\/span><a href=\"http:\/\/amzkubenode1.int.centreon.com#utilization'=0;;\"><span style=\"font-weight: 400;\">amzkubenode1.int.centreon.com#utilization'=0;;<\/span><\/a><span style=\"font-weight: 400;\">;; '<\/span><a href=\"http:\/\/amzkubenode1.int.centreon.com#throttled'=0;;\"><span style=\"font-weight: 400;\">amzkubenode1.int.centreon.com#throttled'=0;;<\/span><\/a><span style=\"font-weight: 400;\">;; '<\/span><a href=\"http:\/\/amzkubenode2.int.centreon.com#utilization'=0;;\"><span style=\"font-weight: 400;\">amzkubenode2.int.centreon.com#utilization'=0;;<\/span><\/a><span style=\"font-weight: 400;\">;; '<\/span><a href=\"http:\/\/amzkubenode2.int.centreon.com#throttled'=0;;\"><span style=\"font-weight: 400;\">amzkubenode2.int.centreon.com#throttled'=0;;<\/span><\/a><span style=\"font-weight: 400;\">;;<\/span>\n<span style=\"font-weight: 400;\">Node <\/span><a href=\"http:\/\/amzkubemaster.int.centreon.com\"><span style=\"font-weight: 400;\">amzkubemaster.int.centreon.com<\/span><\/a><span style=\"font-weight: 400;\"> Average (Last 5min): 0.4481031485383696%, Throttled(Last 5min): 2.4699414529294077%<\/span>\n<span style=\"font-weight: 400;\">Node <\/span><a href=\"http:\/\/amzkubenode1.int.centreon.com\"><span style=\"font-weight: 400;\">amzkubenode1.int.centreon.com<\/span><\/a><span style=\"font-weight: 400;\"> Average (Last 5min): 0%, Throttled(Last 5min): 0%<\/span>\n<span style=\"font-weight: 400;\">Node <\/span><a href=\"http:\/\/amzkubenode2.int.centreon.com\"><span style=\"font-weight: 400;\">amzkubenode2.int.centreon.com<\/span><\/a><span style=\"font-weight: 400;\"> Average (Last 5min): 0%, Throttled(Last 5min): 0%<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Passons maintenant au param\u00e9trage dans Centreon.<\/span><\/p>\n<h2><span style=\"font-weight: 400; color: #82bd00;\">Etape 4 : Impl\u00e9mentation dans Centreon et g\u00e9n\u00e9ration d\u2019alertes<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">L\u2019impl\u00e9mentation dans Centreon se fait de la mani\u00e8re suivante :\u00a0\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ajoutez un nouveau Service au travers de la page \u201cConfiguration &gt; Services\u201d\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Renseignez la description du Service<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Attachez le Service \u00e0 l\u2019h\u00f4te de votre choix<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">S\u00e9lectionnez le mod\u00e8le \u201cCloud-Prometheus-Expression-Api-custom\u201d<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Remplissez les macros ad\u00e9quates, si l\u2019on se base sur la commande pr\u00e9c\u00e9dente, voici un tableau r\u00e9capitulatif :<\/span><\/li>\n<\/ul>\n<table style=\"width: 105.11%;\">\n<tbody>\n<tr>\n<td style=\"width: 13.8172%;\"><b>Ligne de commande<\/b><\/td>\n<td style=\"width: 10.3979%;\"><b>Macro (nom)\u00a0<\/b><\/td>\n<td style=\"width: 38.8624%;\"><b>Macro (valeur)<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 13.8172%;\"><span style=\"font-weight: 400;\">&#8211;query=&rsquo;utilization,rate(container_cpu_usage_seconds_total<br \/>\n{container!~\u00a0\u00bbPOD\u00a0\u00bb,namespace!=\u00a0\u00bb\u00a0\u00bb}[5m])*100&prime; &#8211;query=&rsquo;throttled,rate(container_cpu_cfs_throttled_seconds_total<br \/>\n{container!~\u00a0\u00bbPOD\u00a0\u00bb,namespace!=\u00a0\u00bb\u00a0\u00bb}[5m])*100&prime;<\/span><\/td>\n<td style=\"width: 10.3979%;\"><b>QUERIES<\/b><\/td>\n<td style=\"width: 38.8624%;\"><span style=\"font-weight: 400;\">&#8211;query=&rsquo;utilization,rate(container_cpu_usage_seconds_total<br \/>\n{container!~\u00a0\u00bbPOD\u00a0\u00bb,namespace!=\u00a0\u00bb\u00a0\u00bb}[5m])*100&prime;<br \/>\n&#8211;query=&rsquo;throttled,rate(container_cpu_cfs_throttled_seconds_total<br \/>\n{container!~\u00a0\u00bbPOD\u00a0\u00bb,namespace!=\u00a0\u00bb\u00a0\u00bb}[5m])*100&prime;<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 13.8172%;\"><span style=\"font-weight: 400;\">&#8211;instance=&rsquo;node&rsquo;<\/span><\/td>\n<td style=\"width: 10.3979%;\"><b>INSTANCE<\/b><\/td>\n<td style=\"width: 38.8624%;\"><span style=\"font-weight: 400;\">node<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 13.8172%;\"><span style=\"font-weight: 400;\"> &#8211;output=&rsquo;Node %{instance} Average (Last 5min): %{utilization}%, Throttled(Last 5min): %{throttled}%&rsquo;<\/span><\/td>\n<td style=\"width: 10.3979%;\"><b>OUTPUT<\/b><\/td>\n<td style=\"width: 38.8624%;\"><span style=\"font-weight: 400;\">Node %{instance} Average (Last 5min): %{utilization}%, Throttled(Last 5min): %{throttled}%<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 13.8172%;\"><span style=\"font-weight: 400;\"> &#8211;multiple-output=&rsquo;All CPU metrics are OK&rsquo;<\/span><\/td>\n<td style=\"width: 10.3979%;\"><b>MULTIPLEOUTPUT<\/b><\/td>\n<td style=\"width: 38.8624%;\"><span style=\"font-weight: 400;\">All Nodes CPU metrics are OK<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 13.8172%;\"><span style=\"font-weight: 400;\">&#8211;critical-status=&rsquo;%{throttled} &gt; 1&prime;<\/span><\/td>\n<td style=\"width: 10.3979%;\"><b>CRITICALSTATUS<\/b><\/td>\n<td style=\"width: 38.8624%;\"><span style=\"font-weight: 400;\">%{throttled} &gt; 1<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Dans la configuration du Service, nous avons ajouter une valeur \u00e0 la Macro CRITICALSTATUS qui se traduit par une alerte CRITICAL si la valeur r\u00e9cup\u00e9r\u00e9e pour Throttled (m\u00e9trique ) est sup\u00e9rieure \u00e0 1.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">La capture d\u2019\u00e9cran ci-dessous montre le r\u00e9sultat au niveau de Centreon.<\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-65550\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-05-service-configuration-1024x625.png\" alt=\"\" width=\"1024\" height=\"625\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Une particularit\u00e9 de ce Service est qu\u2019il va pouvoir \u00eatre attach\u00e9 \u00e0 votre H\u00f4te Prometheus comme \u00e0 un autre H\u00f4te selon l\u2019exploitation faite de la mesure. Quelle que soit la solution retenue, il faut que l\u2019H\u00f4te en question :<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Utilise le Mod\u00e8le \u2018Cloud-Prometheus-Api-Custom\u2019<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Poss\u00e8de une Macro PROMETHEUSAPIHOSTNAME dont la valeur est l\u2019adresse IP ou le FQDN du Serveur Prometheus.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Une fois ces conditions r\u00e9unies, vous pouvez d\u00e9ployer votre configuration et le tour est jou\u00e9. <\/span><\/p>\n<p><img fetchpriority=\"low\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-65556\" src=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2021\/03\/prometheus-06-service-monitoring-result-1024x457.png\" alt=\"\" width=\"1024\" height=\"457\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connecter Centreon \u00e0 Prometheus gr\u00e2ce \u00e0 l\u2019installation du Plugin Pack centreon-pack-cloud-prometheus-api vous permet d\u2019exploiter les m\u00e9triques collect\u00e9es par Prometheus directement dans Centreon et de centraliser les r\u00e9sultats de votre collecte de m\u00e9triques et de l\u2019envoi&nbsp;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5634,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"post-type":[100],"theme":[1015],"class_list":["post-19866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","post-type-tutoriels","theme-plugin-packs-fr"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9 - Centreon<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9 - Centreon\" \/>\n<meta property=\"og:description\" content=\"Connecter Centreon \u00e0 Prometheus gr\u00e2ce \u00e0 l\u2019installation du Plugin Pack centreon-pack-cloud-prometheus-api vous permet d\u2019exploiter les m\u00e9triques collect\u00e9es par Prometheus directement dans Centreon et de centraliser les r\u00e9sultats de votre collecte de m\u00e9triques et de l\u2019envoi&nbsp;...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\" \/>\n<meta property=\"og:site_name\" content=\"Centreon\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CentreonMonitoring\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-11T09:32:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.centreon.com\/wp-content\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png\" \/>\n\t<meta property=\"og:image:width\" content=\"746\" \/>\n\t<meta property=\"og:image:height\" content=\"398\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Thomas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CentreonFR\" \/>\n<meta name=\"twitter:site\" content=\"@CentreonFR\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thomas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\"},\"author\":{\"name\":\"Thomas\",\"@id\":\"https:\/\/www.centreon.com\/fr\/#\/schema\/person\/c5bd0f4e75adbd1ee75f5d1f8a7ff419\"},\"headline\":\"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9\",\"datePublished\":\"2021-03-11T09:32:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\"},\"wordCount\":1927,\"publisher\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png\",\"inLanguage\":\"fr-FR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\",\"url\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\",\"name\":\"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9 - Centreon\",\"isPartOf\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png\",\"datePublished\":\"2021-03-11T09:32:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage\",\"url\":\"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png\",\"contentUrl\":\"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png\",\"width\":746,\"height\":398},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.centreon.com\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.centreon.com\/fr\/#website\",\"url\":\"https:\/\/www.centreon.com\/fr\/\",\"name\":\"Centreon\",\"description\":\"Just another WordPress site\",\"publisher\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.centreon.com\/fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.centreon.com\/fr\/#organization\",\"name\":\"Centreon\",\"url\":\"https:\/\/www.centreon.com\/fr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.centreon.com\/fr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.centreon.com\/wp-content\/uploads\/2023\/07\/Logo_Centreon_Email_Signature_light_02.png\",\"contentUrl\":\"https:\/\/www.centreon.com\/wp-content\/uploads\/2023\/07\/Logo_Centreon_Email_Signature_light_02.png\",\"width\":180,\"height\":42,\"caption\":\"Centreon\"},\"image\":{\"@id\":\"https:\/\/www.centreon.com\/fr\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/CentreonMonitoring\/\",\"https:\/\/x.com\/CentreonFR\",\"https:\/\/www.linkedin.com\/company\/centreonsoftware\/\",\"https:\/\/www.youtube.com\/channel\/UCIKJKvZ8acLmEg2fCdDzsvA\",\"https:\/\/fr.wikipedia.org\/wiki\/Centreon\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.centreon.com\/fr\/#\/schema\/person\/c5bd0f4e75adbd1ee75f5d1f8a7ff419\",\"name\":\"Thomas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.centreon.com\/fr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1d4c181e1a496d3d6d25441adb6830a23883e0f93ed97a30e4616fea3c950268?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1d4c181e1a496d3d6d25441adb6830a23883e0f93ed97a30e4616fea3c950268?s=96&d=mm&r=g\",\"caption\":\"Thomas\"},\"sameAs\":[\"http:\/\/centreon.stagewink.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9 - Centreon","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/","og_locale":"fr_FR","og_type":"article","og_title":"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9 - Centreon","og_description":"Connecter Centreon \u00e0 Prometheus gr\u00e2ce \u00e0 l\u2019installation du Plugin Pack centreon-pack-cloud-prometheus-api vous permet d\u2019exploiter les m\u00e9triques collect\u00e9es par Prometheus directement dans Centreon et de centraliser les r\u00e9sultats de votre collecte de m\u00e9triques et de l\u2019envoi&nbsp;...","og_url":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/","og_site_name":"Centreon","article_publisher":"https:\/\/www.facebook.com\/CentreonMonitoring\/","article_published_time":"2021-03-11T09:32:39+00:00","og_image":[{"width":746,"height":398,"url":"https:\/\/www.centreon.com\/wp-content\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png","type":"image\/png"}],"author":"Thomas","twitter_card":"summary_large_image","twitter_creator":"@CentreonFR","twitter_site":"@CentreonFR","twitter_misc":{"\u00c9crit par":"Thomas","Dur\u00e9e de lecture estim\u00e9e":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#article","isPartOf":{"@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/"},"author":{"name":"Thomas","@id":"https:\/\/www.centreon.com\/fr\/#\/schema\/person\/c5bd0f4e75adbd1ee75f5d1f8a7ff419"},"headline":"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9","datePublished":"2021-03-11T09:32:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/"},"wordCount":1927,"publisher":{"@id":"https:\/\/www.centreon.com\/fr\/#organization"},"image":{"@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage"},"thumbnailUrl":"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png","inLanguage":"fr-FR"},{"@type":"WebPage","@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/","url":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/","name":"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9 - Centreon","isPartOf":{"@id":"https:\/\/www.centreon.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage"},"image":{"@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage"},"thumbnailUrl":"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png","datePublished":"2021-03-11T09:32:39+00:00","breadcrumb":{"@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#primaryimage","url":"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png","contentUrl":"https:\/\/www.centreon.com\/uploads\/2022\/10\/prometheus-01-install-plugin-pack.png","width":746,"height":398},{"@type":"BreadcrumbList","@id":"https:\/\/www.centreon.com\/fr\/interfacer-centreon-avec-prometheus-ou-comment-beneficier-du-meilleur-du-monitoring-connecte\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.centreon.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Interfacer Centreon avec Prometheus ou comment b\u00e9n\u00e9ficier du meilleur du monitoring connect\u00e9"}]},{"@type":"WebSite","@id":"https:\/\/www.centreon.com\/fr\/#website","url":"https:\/\/www.centreon.com\/fr\/","name":"Centreon","description":"Just another WordPress site","publisher":{"@id":"https:\/\/www.centreon.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.centreon.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.centreon.com\/fr\/#organization","name":"Centreon","url":"https:\/\/www.centreon.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.centreon.com\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.centreon.com\/wp-content\/uploads\/2023\/07\/Logo_Centreon_Email_Signature_light_02.png","contentUrl":"https:\/\/www.centreon.com\/wp-content\/uploads\/2023\/07\/Logo_Centreon_Email_Signature_light_02.png","width":180,"height":42,"caption":"Centreon"},"image":{"@id":"https:\/\/www.centreon.com\/fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/CentreonMonitoring\/","https:\/\/x.com\/CentreonFR","https:\/\/www.linkedin.com\/company\/centreonsoftware\/","https:\/\/www.youtube.com\/channel\/UCIKJKvZ8acLmEg2fCdDzsvA","https:\/\/fr.wikipedia.org\/wiki\/Centreon"]},{"@type":"Person","@id":"https:\/\/www.centreon.com\/fr\/#\/schema\/person\/c5bd0f4e75adbd1ee75f5d1f8a7ff419","name":"Thomas","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.centreon.com\/fr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1d4c181e1a496d3d6d25441adb6830a23883e0f93ed97a30e4616fea3c950268?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1d4c181e1a496d3d6d25441adb6830a23883e0f93ed97a30e4616fea3c950268?s=96&d=mm&r=g","caption":"Thomas"},"sameAs":["http:\/\/centreon.stagewink.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/posts\/19866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/comments?post=19866"}],"version-history":[{"count":0,"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/posts\/19866\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/media\/5634"}],"wp:attachment":[{"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/media?parent=19866"}],"wp:term":[{"taxonomy":"post-type","embeddable":true,"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/post-type?post=19866"},{"taxonomy":"theme","embeddable":true,"href":"https:\/\/www.centreon.com\/fr\/wp-json\/wp\/v2\/theme?post=19866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}