Hi, I'm trying to create a monitor for a centos server where I can validate the status of my docker containers, but it only has the execution available via ssh through port 22. Any help to do it would be appreciated.
Â
Â
https://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-docker-restapi/
https://github.com/centreon/centreon-plugins
If you want a fast setup you can take advantage of the templates in the plugin packs
https://docs.centreon.com/docs/monitoring/pluginpacks/
📯
Hello, thank you for your time, the answer you give me does not help me since in those examples a port 2375 is used but as I said I need to make the query for an available ssh port 22 but I cannot perform a correct execution
I am testing with check_by_ssh where I program it like this
Create in Configuration > Commands > Checks a check called Docker_Check_SSH:
$USER1$/check_by_ssh -l $ARG3$ -i $ARG1$ -H $HOSTADDRESS$ -C $ARG2$ -E
ARG3 : user
ARG1 : rsa key path
ARG2 : command
where i use the check_docker.sh plugin downloaded from nagios
The final command would be something like this:
/bin/sh -c '/usr/lib64/nagios/plugins/check_by_ssh -l user -i /var/spool/useer/.ssh/id_rsa -H [remote-host-ip] -C "/home/user/ check_docker.sh -n python -s" -E'
and it gives me an answer:
UNKNOWN - check_by_ssh: Remote command '/home/ansible/user/check_docker.sh -n python -s' returned status 255
Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.