[icinga-users] icinga wont start my perl notification script

Lorenzo Santi | Jobrapido lorenzo.santi at jobrapido.net
Mon Aug 1 17:46:07 CEST 2011


Hi everybody in the list,

 

Im new to monitoring system and actually I'm trying to write a custom
notification email script

 

define command {

        command_name    new-monitorcsp-notify

        command_line
/usr/local/icinga/jobrapido/scripts/icinga_sendmail_monitorcsp.pl
"$NOTIFICATIONTYPE$" "$SERVICEDESC$" "$HOSTADDRESS$" "$SERVICESTATE$"
"$LONGDATETIME$" "$CONTACTEMAIL$"

        register                        1

}

 

Here is the command:

 

Here is the debug:

[1312211613.855026] [032.0] [pid=22154] Notification viability test passed.

[1312211613.855044] [032.1] [pid=22154] Current notification number: 0
(unchanged)

[1312211613.855064] [032.2] [pid=22154] Creating list of contacts to be
notified.

[1312211613.855084] [032.1] [pid=22154] Service notification will NOT be
escalated.

[1312211613.855104] [032.1] [pid=22154] Adding normal contacts for service
to notification list.

[1312211613.855115] [032.2] [pid=22154] Adding contact 'xxx-csp' to
notification list.

[1312211613.855129] [032.2] [pid=22154] Adding contact 'xxx-monitorcsp' to
notification list.

[1312211613.855217] [032.2] [pid=22154] ** Attempting to notifying contact
'xxx-monitorcsp'...

[1312211613.855235] [032.2] [pid=22154] ** Checking service notification
viability for contact 'xxx-monitorcsp'...

[1312211613.855256] [032.2] [pid=22154] ** Notifying contact
'xxx-monitorcsp'

[1312211613.855336] [032.2] [pid=22154] Raw notification command:
/usr/local/icinga/etc/scripts/icinga_sendmail_monitorcsp.pl
"$NOTIFICATIONTYPE$" "$SERVICEDESC$" "$HOSTADDRESS$" "$SERVICESTATE$"
"$LONGDATETIME$" "$CONTACTEMAIL$"

[1312211613.855398] [032.2] [pid=22154] Processed notification command:
/usr/local/icinga/etc/scripts/icinga_sendmail_monitorcsp.pl "CUSTOM" "CSP
Monitor" "cz.frontend.xxx" "OK" "Mon Aug 1 17:13:33 JREUS 2011"
"xxx.ranfi at xxx"

[1312211613.865045] [032.2] [pid=22154] ** Attempting to notifying contact
'xxx-csp'...

[1312211613.865063] [032.2] [pid=22154] ** Checking service notification
viability for contact 'xxx-csp'...

[1312211613.865097] [032.2] [pid=22154] ** Notifying contact 'xxx-csp'

[1312211613.865123] [032.2] [pid=22154] Raw notification command:
/usr/local/icinga/etc/scripts/icinga_sendmail_monitorcsp.pl
"$NOTIFICATIONTYPE$" "$SERVICEDESC$" "$HOSTADDRESS$" "$SERVICESTATE$"
"$LONGDATETIME$" "$CONTACTEMAIL$"

[1312211613.865151] [032.2] [pid=22154] Processed notification command:
/usr/local/icinga/etc/scripts/icinga_sendmail_monitorcsp.pl "CUSTOM" "CSP
Monitor" "cz.frontend.xxx" "OK" "Mon Aug 1 17:13:33 JREUS 2011"
"xxx.santi at xxx"

[1312211613.874573] [032.0] [pid=22154] 2 contacts were notified.

 

 

 

But:

Looks like all ok but icinga don't run the script.

 

On the shell if I launch the raw notification command  as Root and icinga
user both users work like a charm. 

I don't know how to do more to run the script

Icinga don't run it . If I use a test perl script that write some bla bla on
one file and nothing else nothing appened. Icinga just don't run any perl
script.

If I put some append >> and 2>> at the end of the command (tried with
illegal_macro_output_chars=`~$|'" ) no file output. If I try on the shell
work fine and produce output and no error.

 

 

Embedded perl disable.I'm using perl strict

 

 

Thanks and let me know if someone have some advice

 

Lorenzo

 

  _____  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20110801/8aa29580/attachment.html>


More information about the icinga-users mailing list