> We used an other solution: > Creatded a "SMS Notification Methods" redirecting the messages to noma. > > Service: > /usr/local/nagios/noma/notifier/alert_via_noma.pl -c s -s > "$NAGIOS_SERVICESTATE" -H "$NAGIOS_HOSTNAME" -S "$NAGIOS_SERVICEDES > C" -o "$NAGIOS_SERVICEOUTPUT" -n "$NAGIOS_NOTIFICATIONTYPE" -a > "$NAGIOS_HOSTALIAS" -i "$NAGIOS_HOSTADDRESS" -t "$NAGIOS_SHORT > DATETIME" > > Host: > > /usr/local/nagios/noma/notifier/alert_via_noma.pl -c h -s > "$NAGIOS_HOSTSTATE" -H "$NAGIOS_HOSTNAME" -n "$NAGIOS_NOTIFICATIONT > YPE" -i "$NAGIOS_HOSTADDRESS" -o "$NAGIOS_HOSTOUTPUT" -t > "$NAGIOS_SHORTDATETIME"
I was never able to integrate noma into opsview in the way suggested by Urban. I eventually was able to get noma working however by: - installing and configuring noma (/usr/local/nagios/noma): - creating a simple perl script to convert the environment variables sent by opsview/nagios on service notifications into command line arguments that are expected by noma's alert_via_noma.pl script (see below) - adding the service as described here: http://docs.opsview.org/doku.php?id=opsview-community:notificationmethods The example of using the test_notifications script as described here (http://docs.opsview.org/doku.php?id=servicedesk-connector-latest:configuration) was really useful for debugging the issues I was having while enabling this solution. Sincerely, Dennison Williams #!/usr/bin/perl -w use warnings; use strict; use Date::Manip; my $noma = '/usr/local/nagios/noma/notifier/alert_via_noma.pl'; my $cmdLine; # Split on host vs service notification if ($ENV{NAGIOS_SERVICEDESC}) { $cmdLine = '-c s -S '. $ENV{NAGIOS_SERVICEDESC} .' -s '. $ENV{NAGIOS_SERVICESTATE} .' -o "'. $ENV{NAGIOS_SERVICEOUTPUT} .'"'; } else { $cmdLine = '-c h -s '. $ENV{NAGIOS_HOSTSTATE} .' -o "'. $ENV{NAGIOS_HOSTOUTPUT} .'"'; } $cmdLine .= ' -H '. $ENV{NAGIOS_HOSTNAME} .' -a '. $ENV{NAGIOS_HOSTALIAS} .' -i '. $ENV{NAGIOS_HOSTADDRESS} .' -n '. $ENV{NAGIOS_NOTIFICATIONTYPE} .' -t '. UnixDate($ENV{NAGIOS_LONGDATETIME}, "%s"); `$noma $cmdLine`; _______________________________________________ Opsview-users mailing list [email protected] http://lists.opsview.org/lists/listinfo/opsview-users
