Instead of marking error as critical in red, put it as Ok an
-
fraguillen
- Posts: 47
- Joined: Fri May 18, 2018 11:40 am
Re: Instead of marking error as critical in red, put it as O
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]$
[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
In the GUI did you force a recheck by clicking "Force an immediate check"?
-
fraguillen
- Posts: 47
- Joined: Fri May 18, 2018 11:40 am
Re: Instead of marking error as critical in red, put it as O
Yes,
See you attachemnt
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
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?
Are you sure this service is using the same plugin?
-
fraguillen
- Posts: 47
- Joined: Fri May 18, 2018 11:40 am
Re: Instead of marking error as critical in red, put it as O
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.
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
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.
The scripts coding definitely matters.
-
fraguillen
- Posts: 47
- Joined: Fri May 18, 2018 11:40 am
Re: Instead of marking error as critical in red, put it as O
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.
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
Please go to Admin -> System Profile, click Download Profile and PM the profile.zip to me.
Thanks
Thanks
-
fraguillen
- Posts: 47
- Joined: Fri May 18, 2018 11:40 am
Re: Instead of marking error as critical in red, put it as O
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
Ok, the command on the one that works is the following
The command on the one that doesn't is
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
Code: Select all
check_command check_nrpe_HPUX!check_pip_err_rel_ECE!!!!!!!Code: Select all
check_command check_nrpe_sclc!check_pip_err_DWH!|tee /var/www/html/infoBRM/check_pip_err_DWH!!!!!!You are running completely different commands.
Beyond this, I would need to know what nrpe commands these correspond to on the remote system