Instead of marking error as critical in red, put it as Ok an

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
fraguillen
Posts: 47
Joined: Fri May 18, 2018 11:40 am

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

Post 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]$
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

In the GUI did you force a recheck by clicking "Force an immediate check"?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
fraguillen
Posts: 47
Joined: Fri May 18, 2018 11:40 am

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

Post by fraguillen »

Yes,

See you attachemnt
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
fraguillen
Posts: 47
Joined: Fri May 18, 2018 11:40 am

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

Post 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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
fraguillen
Posts: 47
Joined: Fri May 18, 2018 11:40 am

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

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

Please go to Admin -> System Profile, click Download Profile and PM the profile.zip to me.

Thanks
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
fraguillen
Posts: 47
Joined: Fri May 18, 2018 11:40 am

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

Post by fraguillen »

Attached as requested
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked