Page 1 of 1

Make NCPA plugins return status

Posted: Mon Nov 09, 2020 4:45 am
by taxidis
Hi there,

I am trying to migrate nrpe plugins to ncpa plugins but having some basic issues so far.

I call the remote plugin which executes successfully and return the wanted message but it does not return status code (WARNING, CRITICAL etc.) .

The remote script returns those codes upon execution but nagios can not get as it seems. I found in the knowledge base that custom plugins do not support builtin critical and warning flags but I cannot find a way to make this work.

note: It does not help that all google search results are about nrpe.

Thanks in advance.

Re: Make NCPA plugins return status

Posted: Mon Nov 09, 2020 3:18 pm
by benjaminsmith
Hi @taxidis,

As long as it's returning a valid exit code it should work, can you run the full check command from the Nagios Server terminal, and post the output or a screenshot of the error to the thread?

Follow the steps in the knowledgebase article below to get the check command and test it from the CLI.

Nagios XI - How To Test Check Commands From The Command-line

Also, check_ncpa.py has a verbose output option -v, please add that to the command string for additional data.

Thanks, Benjamin