OT: SEC forwarding of Nagios hard events to a jabber conference (logical multicast of the Nag log)

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Sat Jul 9 13:07:43 CEST 2005


Dear Folks,


<off topic>

My employer uses SEC to forward Nagios events to a jabber/instant message
conference.

Without SEC watching the tail of the Nagios log, it would have been necessary
to write another daemon.

Here is the extremely simple minded SEC rule 


# 10 Hard Nag events to jabber

# [1120877089] SERVICE ALERT: aphrodite;SysTst B2B OLP;OK;HARD;3;OK OLP Worst: Test Time => 0.10 Statii: OLP User Manager => OK, OLP Payment Notification Provider => OK ..
#                             host      service        state
#                                                         type 

type=Single
ptype=RegExp
pattern=\[\d+\] SERVICE ALERT: .+?;.+?;.+?;HARD;.*
desc=Hard events from Nagios to Jabber conference
action=eval %o (                                                                        \
                        $nag_event = '$0';                                              \
                        $nag_event =~ s/^\[\d+\] //;                                    \
                        $nag_event;                                                     \
                );                                                                      \ 
       pipe '%o' /usr/local/bin/sendxmpp -c -r nagios nagios at conference.xena
       

Since SEC runs as user root, the root account must contain the .sendxmpp file
in which are the credentials of the jabber user writing t othe conference.

Yours sincerely.

<!-- no HTM mail from me -->
</off topic >

-- 
Stanley Hopcroft

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disclaimer.txt
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050709/5db8f4de/attachment.txt>


More information about the Users mailing list