Page 1 of 2

No output returned from plugin

Posted: Tue Feb 20, 2018 10:20 am
by morabanc
Hi guys,

We have a service that gives an unknown state with this message:

- No output returned from plugin

It's strange because when we execute a "Force an immediate check" goes to ok state, but many minutes ago turns to unknown state once again.

This is the command configured in service (when we execute in shell goes fine).

- php $USER1$/script_salva_config_sql.php $ARG1$ 2> /dev/null ( where ARG1 is: router_one)

I attach you the configuration of template attach in service.

We are in 5.4.12 version.


Thanks

Re: No output returned from plugin

Posted: Tue Feb 20, 2018 5:38 pm
by kyang
I'm sure this is your custom plugin right? We will do our best to troubleshoot this issue, but we can only give limited information since we don't exactly know if your plugin is following our plugins-guidelines.
http://nagios-plugins.org/doc/guidelines.html

What template are you using for this service template?

Can you run your plugin from the command line and show us the output?

Re: No output returned from plugin

Posted: Wed Feb 21, 2018 3:08 am
by morabanc
Hi kyang,

This is the output from command line:

bash-4.1# php script_salva_config_sql.php router1 2> /dev/null
OK: Fet la salva del host router1 amb data 2018-02-20 04:16:02. Caracters: 14335 | estat=1
bash-4.1#


Regards

Re: No output returned from plugin

Posted: Wed Feb 21, 2018 12:57 pm
by kyang
Can you also provide the service check_command you are using for this?

And the command definition you have for using this php script?

All of this can be found in your Core Config Manager (CCM).

Re: No output returned from plugin

Posted: Thu Feb 22, 2018 11:22 am
by morabanc
Hi kyang,

Here you are.


Thanks

Re: No output returned from plugin

Posted: Thu Feb 22, 2018 11:25 am
by morabanc
Also I attach you 2 pics, before do the force check and after do it

Re: No output returned from plugin

Posted: Fri Feb 23, 2018 1:38 pm
by scottwilkerson
Are active checks enabled for this service? You can see on the Advanced tab

If so what frequency is the service being checked?

Re: No output returned from plugin

Posted: Fri Feb 23, 2018 1:42 pm
by lmiltchev
I have seen similar issue in the past, when mod gearman is used. The plugin is present on the server, and the check runs fine, when executed locally. However the plugin is missing on the mod gearman worker machine, so when it's run by the worker, it fails. Are you using mod gearman by chance? If you do, make sure that you have the plugin on the worker, and that you actually CAN execute this particular plugin remotely.

Re: No output returned from plugin

Posted: Mon Feb 26, 2018 4:51 am
by morabanc
Hi guys,

Thank you very much for your comments.

@lmiltchev, we don't have mod_gearman.

@scottwilkerson, I attach some more config files.


Thanks

Re: No output returned from plugin

Posted: Mon Feb 26, 2018 4:52 am
by morabanc
And one more :)