submit_check_result always critical

Robert Gil rgil at liquidnet.com
Thu Nov 15 18:07:09 CET 2007


I enabled logging for the initial service state and it appears to show
critical every time. So it doesn't look like an issue with nsca or any
of the passive configuration.

Currently freshness checking is not being used.

Rob

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Robert
Gil
Sent: Thursday, November 15, 2007 11:46 AM
To: Valdinger, Stephen (DOV, MSX); Thomas Guyot-Sionnest
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] submit_check_result always critical

Yes, permissions are correct and nagios can execute the scripts. Results
come back as OK.

Rob

-----Original Message-----
From: Valdinger, Stephen (DOV, MSX) [mailto:svalding at doverchem.com] 
Sent: Thursday, November 15, 2007 11:36 AM
To: Robert Gil; Thomas Guyot-Sionnest
Cc: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] submit_check_result always critical

You can set debugging options inside of Nagios.cfg. I think by default
it spits everything it can at you though. I may have to reread that part
of the documentation. Are you running the check in the command line on
Nagios(02) as root or the Nagios user? Test the plugin in terminal as
Nagios user and see if you get results.

-----Original Message-----
From: Robert Gil [mailto:rgil at liquidnet.com] 
Sent: Thursday, November 15, 2007 11:21 AM
To: Robert Gil; Thomas Guyot-Sionnest
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] submit_check_result always critical

I still get the same results from the nagios checks. Is there some kind
of debug mode that I can see the actual results from the nagios checks
to see whether nagios is legitimately reporting those services as
critical?

Rob


-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Robert
Gil
Sent: Wednesday, November 14, 2007 10:00 AM
To: Thomas Guyot-Sionnest
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] submit_check_result always critical

The setup is as follows:

1 nagios server in each datacenter would send passive check results to a
central server in the NOC. Right now I am testing on two servers
initially. Both servers are in the same datacenter. Both are running the
same versions of nagios and plugins. 

Nagios01: Central Monitoring Server. Mainly just catching passive
results, displaying the dashboard, and sending notifications.

Nagios02: Distributed nagios server

Configuration:

Nagios02 has the check command defined as follows.

define command{
        command_name    submit_check_result
        command_line
/usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$
'$SERVICEDESC$' $SERVICESTATE$ '$SERVICEOUTPUT$'
        }

In nagios.cfg

obsess_over_services=1
ocsp_command=submit_check_result

In the submit_check_result script, the print line is as follows.

/usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$4" |
/usr/local/nagios/bin/send_nsca 10.0.254.248 -c
/usr/local/nagios/etc/send_nsca.cfg

In Nagios01 it is set up to accept passive checks. And they do come in,
but are always critical and with the previous error of "No Output!"




The checks from the distributed server (02) do work when they are run
from the command line.

Im not sure if im missing something or the implementation is being
confused in some way.

Thanks,

Rob

-----Original Message-----
From: Thomas Guyot-Sionnest [mailto:dermoth at aei.ca] 
Sent: Wednesday, November 14, 2007 7:55 AM
To: Robert Gil
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] submit_check_result always critical

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/11/07 10:26 PM, Robert Gil wrote:
> Getting a similar error. Still critical every time.
> 
> 
> Nov 13 22:16:53 SERVER nagios: EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;rem5;NTP;2;(No output!)
> Nov 13 22:17:02 SERVER nsca[10294]: Handling the connection...
> Nov 13 22:17:03 SERVER nsca[10294]: SERVICE CHECK -> Host Name:
'rem5',
> Service Description: 'Time', Return Code: '2', Output: '(No output!)'
> Nov 13 22:17:03 SERVER nsca[10294]: End of connection...
> Nov 13 22:17:03 SERVER nagios: EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;rem5;Time;2;(No output!)
> 
> 
> define command{
>         command_name    submit_check_result
>         command_line
> /usr/local/nagios/libexec/eventhandlers/submit_check_result $HOSTNAME$
> '$SERVICEDESC$' $SERVICESTATE$ '$SERVICEOUTPUT$'
>         }

I'm not sure if you got it right. As I understand it your nagios sends
the current check result back to itself, so it's obvious the state never
change.

If you want to do active monitoring you should use an active check, and
if you want to do passive monitoring the command should run on the
remote host (ex. from crontab) and use send_nsca to report back to
nagios (in that case you should have active checks disabled on the
service, and eventually freshness checking)

If you're trying to do something else then please explain.

Thanks,

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOvAa6dZ+Kt5BchYRAtPwAJ4s7/758uxUjEiYkjsSnRhF0rMgJQCfUqob
38LblcL52iOPeqrJtRRbhoE=
=oCBq
-----END PGP SIGNATURE-----



------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null



------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null




------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list