Hello, my name is Sebastian
i trying to create a command which obtained information about the status of a docked container that is working on a remote server, through check_by_ssh (NAGIOS CORE)
the command is:
$USER1$/check_by_ssh -H $HOSTADDRESS$ -C "$ARG1" -t "$ARG2"
ARG1=docker ps -a | grep Up | wc -l
ARG2=50
The question I have is because the command delivers a numerical value, which I would like to be interpreted by NAGIOS (CORE) as a state, either, OK, Critical or Unknown, according to the amount of active or inactive containers.
Hello, my name is Sebastian
i trying to create a command which obtained information about the status of a docked container that is working on a remote server, through check_by_ssh (NAGIOS CORE)
the command is:
$USER1$/check_by_ssh -H $HOSTADDRESS$ -C "$ARG1" -t "$ARG2"
ARG1=docker ps -a | grep Up | wc -l
ARG2=50
The question I have is because the command delivers a numerical value, which I would like to be interpreted by NAGIOS (CORE) as a state, either, OK, Critical or Unknown, according to the amount of active or inactive containers.
How could I achieve this?
thanks.
I do not support the Nagios Core itself - please ask your question in the core support forum:
https://support.nagios.com/forum/
Personally, I dont think that it will work that way - but you can write your own check script:
https://www.howtoforge.com/tutorial/write-a-custom-nagios-check-plugin/