mickem / nscp

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

Check_process wrong value returned #684

Open Xepra opened 4 years ago

Xepra commented 4 years ago

Check_process problem

Hello Guys,

Since i've upgraded all my windows servers with the latest version of centreon-nsclient 0.5.3 available, i got some issues with few probes and the one who make me struggle is a check_process on a specific software that was already added on the server.

For this software we have 2 servers and it's suppose to run on only one of our server, the server of production. The problem is that the command give us back the wrong value indeed our "basic command" should return "OK" on our server 1 if the "process.exe" run correctly and "critical" if the process is Stopped but the problem is that the prob keept sending us that this process is currently down but is in reality "UP" when we check his state on the server in the task manager.

To be honest i don't know where this problem come from, i did few test to be sure it comes from the nsclient++ and not from our server/software, like doing a backup of the nsclient version and yes we have no problem with any probes with the old version of nsclient 0.43

The check-process command is suppose to return the current state of the process

/usr/lib/nagios/plugins/check_centreon_nrpe -H *.*.*.* -p 5666 -t 30 -u -m 8192 -c check_process -a 'process=log_base.exe' "warning=none"  "critical=stopped" 'top-syntax=${status}: ${problem_list}' 'detail-syntax=${exe}=${state}' "filter=none" show-all

Expected Behavior

Normally this should happen :

/usr/lib/nagios/plugins/check_centreon_nrpe -H *.*.*.* -p 5666 -t 30 -u -m 8192 -c check_process -a 'process=BASE.exe' "warning=none"  "critical=stopped" 'top-syntax=${status}: ${problem_list}' 'detail-syntax=${exe}=${state}' "filter=none" show-all
OK: log_base.exe=started

Actual Behavior

This happen instead.

 /usr/lib/nagios/plugins/check_centreon_nrpe -H *.*.*.* -p 5666 -t 30 -u -m 8192 -c check_process -a 'process=log_base.exe' "warning=none"  "critical=stopped" 'top-syntax=${status}: ${problem_list}' 'detail-syntax=${exe}=${state}' "filter=none" show-all
CRITICAL: critical(log_base.exe=stopped)

Details

Additional Details

NSClient++ log:

PLEASE PASTE LOG HERE

Thanks by advance to anyone who can help me with this issue

Xepra.

tferic commented 4 years ago

Hello Xepra Could this be related to case-sensitivity in the process name? check_process is case-sensitive, and it should not be. This issue is logged here: https://github.com/mickem/nscp/issues/587