AW: Distributed monitoring problem.

Evgeni Vachkov evgeni.vachkov at investis.com
Mon Jun 14 17:20:20 CEST 2004


from commands.cfg:
-----------------------------------------------------------------
#'submit-check-result' required for the Nagios clustering and
notifications
define command{
        command_name submit-check-result
        command_line
/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca  $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
        }
-----------------------------------------------------------------


/usr/lib/nagios/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca:
---------------------------------------------------
#!/bin/sh
# Arguments:
#  $1 = host_name (Short name of host that the service is
#       associated with)
#  $2 = svc_description (Description of the service)
#  $3 = return_code (An integer that determines the state
#       of the service check, 0=OK, 1=WARNING, 2=CRITICAL,
#       3=UNKNOWN).
#  $4 = plugin_output (A text string that should be used
#       as the plugin output for the service check)s
                                                                                                                                                   echocmd="/bin/echo -e"
NscaBin="/usr/bin/send_nsca"
NscaCfg="/etc/nagios/send_nsca.cfg"
NagiosHost="192.168.21.12"
cmdline="$1;$2;$3;$4"
                                                                                                                                                   
$echocmd "$1\t$2\t$3\t$4\n" | $NscaBin $NagiosHost -c $NscaCfg
$echocmd "$1\t$2\t$3\t$4\n" >> /etc/nagios/test
---------------------------------------------------


I have added the last line to see the output. 
/etc/nagios/test:
---------------------------------------------------
st-scm2 sometimes-rpc5-tcp-32771        OK      TCP OK -   0.003 second
response time on port 32771
 
192-168-30-56   discard-tcp-9   CRITICAL        Connection refused by
host
 
192-168-30-56   shell-tcp-514   CRITICAL        Connection refused by
host
 
192-168-30-56   time-tcp-37     OK      TCP OK -   0.004 second response
time on port 37
 
192-168-30-58   finger-tcp-79   CRITICAL        Connection refused by
host
 
192-168-30-58   sometimes-rpc7-tcp-32772        OK      TCP OK -   0.014
second response time on port 32772
 
192-168-30-85   discard-tcp-9   CRITICAL        Connection refused by
host
 
192-168-30-85   shell-tcp-514   CRITICAL        Connection refused by
host
 
192-168-30-85   time-tcp-37     OK      TCP OK -   0.004 second response
time on port 37
 
192-168-30-87   finger-tcp-79   CRITICAL        Connection refused by
host
 
192-168-30-87   sometimes-rpc7-tcp-32772        OK      TCP OK -   0.001
second response time on port 32772
---------------------------------------------------


Your help is appreciated. 

Regards,



On Mon, 2004-06-14 at 14:42, Helmut Januschka wrote:
> how does your send_nsca commandline look like?
> looks like the exit code is missing
> 
> 
> cu
> 
> -----Ursprüngliche Nachricht-----
> Von: Evgeni Vachkov [mailto:evgeni.vachkov at investis.com] 
> Gesendet: Montag, 14. Juni 2004 13:40
> An: nagios-users at lists.sourceforge.net
> Betreff: [Nagios-users] Distributed monitoring problem.
> 
> 
> Hi all,
> I have a problem with nagios distributed monitoring. 
> Nagios 1.2
> Apache/2.0.40
> 
> 
> There is a central/master server passively collecting data from 2 distributed/slave servers. The central server is configured to do some monitoring aswell. The distributed servers monitor separate subnets and send all data to the central server via NSCA. There is no active polling of data from the central server.
> 
> All critical allerts for the hosts monitored ny the central server are emailed ok. 
> 
> All allerts from the distributed servers are received ok by the central server. If there is a critical service  allert, the central server notes the description of the problem on the `service detail` page, but still stays with green (ok) clolour and no email is set out. 
> 
> Anyone had a similar problem? Is there something I am doing wrong. 
> 
> Your help is appreciated. 
> 
> Regards,
>  
> 
-- 
Evgeni Vachkov MEng LPIC MCP
Systems Engineer
Investis 
www.investis.com

85 Clerkenwell Road
London EC1R 5AR
T. +44 (0)20 7071 8506
F. +44 (0)20 7071 8501

Investis clients won five out of eight awards at the IR Best Practice
Website Awards 2004, including Best FTSE 100, Best FTSE 250 and Best
Smaller Quoted Company, and the Grand Prix Best Overall Website.

The contents of this email including its attachments (if any) are
confidential and may be privileged. If you are not the intended
recipient you should not copy it or use it for any purpose nor disclose
its contents to any other person. Please notify the person named above
if this email has been sent to you in error. Registered office: address
as above; registered in England and Wales: number 3930926.




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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