Page 2 of 3

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 2:33 pm
by fraguillen
Keep the same, see this exit:

[nagios@prod libexec]$ sh -x check_val_process_bash LDM_Worker_check.sh

+ ECHO=/bin/echo
+ STATE_OK=0
+ STATE_CRITICAL=2
+ process=LDM_Worker_check.sh
++ hostname
++ hostname
+ '[' sclc-omc01-prod = sclc-omc01-prod -o sclc-omc01-prod = sclc-omc02-prod ']'
++ ps -fu oracle
++ grep -v grep
++ grep -v check_val_process_bash
++ grep -c LDM_Worker_check.sh
+ CANT=0
+ '[' 0 -gt 0 ']'
+ /bin/echo 'ERROR! Se encuentra caido el proceso, favor revisar para levantar: LDM_Worker_check.sh'
ERROR! Se encuentra caido el proceso, favor revisar para levantar: LDM_Worker_check.sh
+ exit 2
[nagios@prod libexec]$

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 2:42 pm
by scottwilkerson
In the GUI did you force a recheck by clicking "Force an immediate check"?

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 2:52 pm
by fraguillen
Yes,

See you attachemnt

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 2:59 pm
by scottwilkerson
I'm confused, now you are getting output that is not consistent with the plugin, you are missing text.

Are you sure this service is using the same plugin?

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 3:12 pm
by fraguillen
Regardless of the message, the icon does not change from OK (green color) to CRITICAL (red color). The error always comes out OK (green color)

This case is on another server with the same result.

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 3:20 pm
by scottwilkerson
But the icon color changes because of the exit code that the script sends when executing, NOT based on the fact you have ERROR in the output.

The scripts coding definitely matters.

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 3:36 pm
by fraguillen
I understand, but the script does throw the error code, but the Nagios does not interpret it as an error.

echo $?
Returns 2

If Nagios does not interpret that this is a CRITICAL, I will not receive any notification.

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 4:09 pm
by scottwilkerson
Please go to Admin -> System Profile, click Download Profile and PM the profile.zip to me.

Thanks

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 4:17 pm
by fraguillen
Attached as requested

Re: Instead of marking error as critical in red, put it as O

Posted: Wed Feb 13, 2019 4:42 pm
by scottwilkerson
Ok, the command on the one that works is the following

Code: Select all

    check_command            check_nrpe_HPUX!check_pip_err_rel_ECE!!!!!!!
The command on the one that doesn't is

Code: Select all

    check_command            check_nrpe_sclc!check_pip_err_DWH!|tee /var/www/html/infoBRM/check_pip_err_DWH!!!!!!
In order for this to error, the tee command would need to error

You are running completely different commands.

Beyond this, I would need to know what nrpe commands these correspond to on the remote system