Re: [Nagios-users] any solution which will allow me to forward Nagios alerts to Netcool?

2009-09-03 Thread Marc Powell

On Sep 3, 2009, at 1:54 PM, Scott Xiao wrote:

>
> 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.

> # '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$
>}

/optnagios/ - is that an actual paste or a typo on your part?

If your hostname, servicedesc, servicestateid or serviceoutput contain  
spaces or special characters, you'll want to quote them above.

> [r...@nagios libexec]# /usr/bin/snmptrap -v 2c -c public  
> 192.168.32.1 '' [strangely line wrapped stuff removed]

Nagios doesn't run this as root, you shouldn't either. Permission  
problems not seen when testing as root are a common issue when  
integrating something new. Also note that the way you are testing is  
different than the command_line you specify above in many ways.

--
Marc


--
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
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] any solution which will allow me to forward Nagios alerts to Netcool?

2009-09-03 Thread Scott Xiao
 
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_enabled1
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$
}



[r...@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"
[r...@nagios libexec]#


[r...@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"
[r...@nagios libexec]# tail /var/tmp/debug
192.168.32.1
public
localhost
nagios.localdomain$
$
$
$
[r...@nagios libexec]#

-Original Message-
From: max.schub...@gmail.com [mailto:max.schub...@gmail.com] On Behalf
Of Max
Sent: Wednesday, August 26, 2009 12:31 PM
To: Scott Xiao
Cc: nagios-users@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
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


nagiosforwarding1.pcap
Description: nagiosforwarding1.pcap
--
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___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] any solution which will allow me to forward Nagios alerts to Netcool?

2009-08-26 Thread Kyle O'Donnell
I wrote something for two way connection to netcool...

For alerts themselves i use the tivoli command postemsg, if you have
the license for that EIF probe, and wrote a shell script wrapper which
gets executed by nagios as a notification command.

I wrote something that reads the nagios log for problem ack/remove
problem ack, sched downtime, add comments, del comments then sends
postemsg commands to omnibus to let it know something is ack/down.

I then created a fakehost/fakeservice which omnibus uses to send me
external commands, so if someone is using netcool UI instead of nagios
and want to sched downtime they do by formatting the appropriate
command and sending to nagios via nsca (all this is behind the scenes
in a web interface)

printf fakehost\tfakservice\t3\tACK_SVC_PROB:host:arg:arg:arg...\n" |send_nsca

The downtime deletion is a bit harder...

I use host ifservice start/end time in epoch as identifiers and when
omnibus sends me a del downtime i read in the status.log (or
downtime.log for nagios2) and find the downtime id to delete.

On 8/26/09, Scott Xiao  wrote:
> Max
> Thanks!
> I believe netcool has receiver. If not, I will inform netcool engineer
> to configure one. So how to configure nagios to to send alert using
> NAGIOS-NOTIFY-MIB service and host events ? Could you please provide
> some more info/doc/url I can refer to ?
> Thanks !
> Best regards
> Scott
>
>
> -Original Message-
> From: max.schub...@gmail.com [mailto:max.schub...@gmail.com] On Behalf
> Of Max
> Sent: Wednesday, August 26, 2009 12:31 PM
> To: Scott Xiao
> Cc: nagios-users@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
> 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
>
> --
> 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
> ___
> Nagios-users mailing list
> Nagios-users@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
>

--
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
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] any solution which will allow me to forward Nagios alerts to Netcool?

2009-08-25 Thread Scott Xiao
Max
Thanks!
I believe netcool has receiver. If not, I will inform netcool engineer
to configure one. So how to configure nagios to to send alert using
NAGIOS-NOTIFY-MIB service and host events ? Could you please provide
some more info/doc/url I can refer to ?
Thanks !
Best regards
Scott


-Original Message-
From: max.schub...@gmail.com [mailto:max.schub...@gmail.com] On Behalf
Of Max
Sent: Wednesday, August 26, 2009 12:31 PM
To: Scott Xiao
Cc: nagios-users@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
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

--
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
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] any solution which will allow me to forward Nagios alerts to Netcool?

2009-08-25 Thread Max
Scott,

On Wed, Aug 26, 2009 at 12:02 AM, Scott Xiao 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

--
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
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] any solution which will allow me to forward Nagios alerts to Netcool?

2009-08-25 Thread Scott Xiao

 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

--
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
___
Nagios-users mailing list
Nagios-users@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