Skip to main content
Solved

Monitor docker container

  • November 2, 2022
  • 4 replies
  • 1451 views

Forum|alt.badge.img+3

Hello, I would like your help, I have 2 docker containers that I would like to monitor with Centreon, the truth is that I have no idea how to start or carry out this work, if it is possible for the console to be seen in case the container is down or up

Best answer by gespada

Hello,

Have you check the differents tips here (first to apply best security practice ) : https://thewatch.centreon.com/product-how-to-21/best-practices-how-to-secure-the-monitoring-of-your-docker-container-266

And here (a deployment in French) : https://www.sugarbug.fr/framboise/clusterhat_pi/monitoring/

According your Docker version, API is : https://docs.docker.com/engine/api/#api-version-matrix

Enable the Rest API is mandatory, in order to monitor Docker with centreon-plugins :  ://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-docker-restapi/#prerequisites

If you have activated Docker Rest API and you have an retour, please post a detail of your command and error message.

To troubleshoot, you could add --debug option at the command.

Regards,

4 replies

Forum|alt.badge.img+14
  • Builder ***
  • November 2, 2022

Forum|alt.badge.img+3

hi and thanks @gespada clone the git repository but I'm stuck in tests I'm doing the perl command centreon_plugins.pl --plugin=cloud::docker::restapi::plugin --mode=node-status --help why I think it's the one I need to see the status of the container but I don't know how to complement it
this is the docker I want to test:

CONTAINER ID   IMAGE                                   COMMAND                  CREATED         STATUS          PORTS                                            NAMES
e39fe4f9a030 docker.elastic.co/kibana/kibana:7.3.1 "/usr/local/bin/dumb…" 3 months ago Up 3 months 0.0.0.0:5601->5601/tcp kibana


I appreciate any guide


Forum|alt.badge.img+14
  • Builder ***
  • Answer
  • November 11, 2022

Hello,

Have you check the differents tips here (first to apply best security practice ) : https://thewatch.centreon.com/product-how-to-21/best-practices-how-to-secure-the-monitoring-of-your-docker-container-266

And here (a deployment in French) : https://www.sugarbug.fr/framboise/clusterhat_pi/monitoring/

According your Docker version, API is : https://docs.docker.com/engine/api/#api-version-matrix

Enable the Rest API is mandatory, in order to monitor Docker with centreon-plugins :  ://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-docker-restapi/#prerequisites

If you have activated Docker Rest API and you have an retour, please post a detail of your command and error message.

To troubleshoot, you could add --debug option at the command.

Regards,


Forum|alt.badge.img+3

Hello, @gespada Thanks for the guide, it worked correctly for me.