any solution which will allow me to forward Nagios alerts to Netcool?
Scott Xiao
Scott_Xiao at nec.com.sg
Thu Sep 3 20:54:26 CEST 2009
Hi Max
Thanks for your help!
I am now ok to use the snmptrap to send out alert. But it seems the
nagios doesn't involk the send_trap script to do the job.
I setup same on a vm with nagios and use my laptop with wireshark to
monitor incoming snmp traffic.
In localhost.cfg, I changed to 1 and 2 for current users to create
warning.
I can see warning on nagios UI but still nothing to capture on sniffer
with
port 162. unless I manual to send trap..anything I mssing? I also
attached
the result that sniffer recieved, and my cfg as below. please advise,
Thanks!
define service{
use local-service ; Name of
service
template to use
host_name localhost
service_description Current Users
event_handler send_trap
event_handler_enabled 1
check_command check_local_users!1!2
}
commands.cfg
# 'send_trap' command definition
define command{
command_name send_trap
command_line /optnagios/libexec/send_trap 192.168.32.1 public
$HOSTNAME$
$SERVICEDESC$ $SERVICESTATEID$ $SERVICEOUTPUT$
}
[root at nagios libexec]# more send_trap
#!/bin/sh
# Arguments:
# $1 = Management Station
# $2 = Community String
# $3 = host_name
# $4 = service_description (Description of the service)
# $5 = return_code (An integer that determines the state
# of the service check, 0=OK, 1=WARNING, 2=CRITICAL,
# 3=UNKNOWN).
# $6 = plugin_output (A text string that should be used
# as the plugin output for the service check)
#
#
echo $1 >> /var/tmp/debug
echo $2 >> /var/tmp/debug
echo $3 >> /var/tmp/debug
echo $HOSTNAME$ >> /var/tmp/debug
echo $SERVICEDESC$ >> /var/tmp/debug
echo $SERVICESTATEID$ >> /var/tmp/debug
echo $SERVICEOUTPUT$ >> /var/tmp/debug
/usr/bin/snmptrap -v 2c -c $2 $1 '' NAGIOS-NOTIFY-MIB::nSvcEvent
nSvcHostname s $3 nSvcDesc s "$
4" nSvcStateID i $5 nSvcOutput s "$6"
#/usr/bin/snmptrap -v 2c -c $2 192.168.32.1 ''
NAGIOS-NOTIFY-MIB::nSvcEvent
nSvcHostname s "$3"
nSvcDesc s "$4" nSvcStateID i $5 nSvcOutput s "$6"
[root at nagios libexec]#
[root at nagios libexec]# /usr/bin/snmptrap -v 2c -c public 192.168.32.1 ''
NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s localhost nSvcDesc s "some
service desc supposed to come from nagios" nSvcStateID i 0 nSvcOutput s
"some service may down testing"
[root at nagios libexec]# tail /var/tmp/debug
192.168.32.1
public
localhost
nagios.localdomain$
$
$
$
[root at nagios libexec]#
-----Original Message-----
From: max.schubert at gmail.com [mailto:max.schubert at gmail.com] On Behalf
Of Max
Sent: Wednesday, August 26, 2009 12:31 PM
To: Scott Xiao
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] any solution which will allow me to forward
Nagios alerts to Netcool?
Scott,
On Wed, Aug 26, 2009 at 12:02 AM, Scott Xiao<Scott_Xiao at nec.com.sg>
wrote:
>
> Hi friends
> Is there any solution which will allow me to forward
> Nagios alerts to Netcool? I read looperng but not many details on how
to
> forward the alert to netcool, any advice (url /docs)?
> Thanks
> Scott
Does Netcool have a trap receiver? If so, you can forward alerts with
SNMP. We forward Nagios notifications to Spectrum by sending them as
traps using the NAGIOS-NOTIFY-MIB service and host events .. works
quite well.
- max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagiosforwarding1.pcap
Type: application/octet-stream
Size: 314 bytes
Desc: nagiosforwarding1.pcap
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090904/fb5c15ba/attachment.obj>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
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