mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
244 stars 94 forks source link

Check_nrpe fails in ncsp.exe service mode but ok in nscp.exe test #490

Open kordoch opened 7 years ago

kordoch commented 7 years ago

Issue and Steps to Reproduce

The problem comes with the check_odbc (https://exchange.nagios.org/directory/Plugins/Databases/check_odbc/details) script, when running it with the nsclient ++ service started it always gives error, but if I stop it and start with nscp test, it works correctly.

PLEASE PROVIDE COMMAND HERE

Expected Behavior

[root@centreon plugins]# ./check_nrpe -H 192.168.100.3 -c check_odbc -a Sislog_Alb_Etiq_Jboss SQL OK - query = 0 |'query'=0;7;10;0;0

Actual Behavior

[root@centreon plugins]# ./check_nrpe -H 192.168.100.3 -c check_odbc -a Sislog_Alb_Etiq_Jboss SQL CRITICAL - can't open db sislog!

Details

Additional Details

NSClient++ log:

PLEASE PASTE LOG HERE
mickem commented 7 years ago

My guess would be that your are using a ODBC datasource which is configured on a given user and once you run NSClient++ you are in fact no longer that user and thus it can no longer be found.

If this is the case you can either add the connection to the user which is running NSClient++ or change the user running NSClient++.