Jabber notification

Fred Jordan fjordan at hcssun01.hcs.net
Thu Jul 10 01:13:17 CEST 2003


Try this:

# 'notify-by-jabber' command definition
define command{
        command_name    notify-by-jabber
        command_line    /usr/bin/printf "Service: $SERVICEDESC$, Host:
$HOSTNAME$, State: $SERVICESTATE$, Date: $DATETIME$" |
/usr/local/nagios/notify-by-
jabber.pl
        }

Do NOT try this:
# 'notify-by-jabber' command definition
define command{
       command_name    notify-by-jabber
       command_line    /usr/bin/printf "Service: $SERVICEDESC$, Host:
$HOSTNAME$, State: $SERVICESTATE$, Info: $OUTPUT$, Date: $DATETIME$" |
/usr/local/nagios/notify-by-jabber.pl
       }

I had the same problem a few months ago. Rebuilding everything in site;
hacking everything that could log output to a file. Note the difference;
the first command definition has removed the "Info: $OUTPUT$" being passed
to the notify-by-jabber.pl script. Turned out there is a "%", ":",";",
or some character that was screwing up the notify-by-jabber.pl script.
Sorry, but am at home right now and don't which character was the problem
but I just about "lost it" trying to find this problem( I don't sound
like I am on a rant or anything do I?).

At any rate, would be glad to converse with anyone/everyone about the
possiblities of integrating jabber with nagios; and for that matter
with swatch and other tools we run here. We have a nagios server that
sends notifications to everyone logged in to the jabber server. People
in the NOC seem to think its great, and want the jabber server tied to
everything we run. To be honest; I kind of like the idea too.

Would be glad to swap scripts; nagios, jabbber or otherwise; with anyone
interested. A word or warning though; what I write ain't pretty but it
usually gets the job done. Never been a good programmer and would starve
to death if I had to make a living cranking out lines of code.

				Hope this helps,
					Fred

On Wed, 9 Jul 2003, Edwards, Thomas wrote:

> I was wondering if anyone had gotten the jaber notification to work and
> could provide me a little insite into configureing this.
>
> I got the jabber script here
> http://www.nagios.org/faqs/viewfaq.php?faq_id=50
> <http://www.nagios.org/faqs/viewfaq.php?faq_id=50>   and configured it.
>
> Installed the appropriate jabber perl mods to allow sending via the script
> alone etc:
>
> [nagios at nagios etc]# ./jabber
> Usage...
>  notify [jabberid] [message]
>
> Then modified miscommands.cfg as follows according to the jabber script
>
>
> # 'notify-by-jabber' command definition
> define command{
>         command_name    notify-by-jabber
>         command_line    /usr/local/nagios/etc/jabber user at localhost
> "**$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$
> **" $CONT
> ACTEMAIL$"
>         }
>
> Added a line to contacts.cfg for notify-by-jabber to see if it would send,
> so far nothing.  No errors as far as I can see.
>
> Any suggestions or clarifications would be greatly appreciated.
>
> Tom
>
>
>
> ************************************************************
> The information in this email is confidential and may be
> legally privileged. It is intended solely for the addressee,
> and access by anyone else is unauthorized.
>
> If you are not the intended recipient, any disclosure,
> copying, distribution or any action taken or omitted to be
> taken in reliance on it, is prohibited and may be unlawful.
>
> If you believe that you have received this email in error,
> please advise us by calling (901) 385 3688, or emailing
> mailgateway at accredohealth.net, and then delete this message
> and all copies and backups thereof. Thank you.
> ************************************************************
>
>



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
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