RES: $OUTPUT$ in misccommands.cfg Question...

Sandro Vaz (UOL) sandromergvaz at uol.com.br
Wed Mar 5 00:51:03 CET 2003


I had this problem too, and Mr. De Blende told me to do this...

And it worked fine...

Sure that helps...

Sandro Vaz

****************************************************************************
****************************
Try this:

define command{
        command_name    notify-by-email
        command_line    /bin/echo -e '***** OpMon
*****\n\nNotificationType: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:$HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$' |
/bin/mail -s "** OpMon Alert - $NOTIFICATIONTYPE$ -$HOSTALIAS$/$SERVICEDESC$
is $SERVICESTATE$ **" $CONTACTEMAIL$
         }

-----Mensagem original-----
De: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] Em nome de David Levine
Enviada em: terça-feira, 4 de março de 2003 20:02
Para: Nagios Users List (E-mail)
Assunto: [Nagios-users] $OUTPUT$ in misccommands.cfg Question...


Hi all -

I am having a little trouble with email notifications...
I receive the messages just fine, but I am experiencing the following
behavior:

With check_nt,  am getting the output from USEDDISKSPACE.
It displays fine on the Nagios (web) interface, but when I receive an
(email)
notification, this is what I get:

Notification Type: PROBLEM
Service Name: Disk Usage Stats - D
On Host: host.domain.com
Host IP Address: 192.168.100.8
Service State: CRITICAL
Occurence Date/Time: Tue Mar 4 17:48:51 CST 2003
Additional Info:
D:

It is the last line that I am curious about - there is nothing beyond the
"D:". I can also see this error message from the Nagios host console:

/usr/bin/printf: \ : invalid escape

This makes sense to me, because the backslash (as in D:\) is an escape
character 
in printf. However, is there a way that I can stop this - so I can get all
of the information in the email notification?

Thanks!

David
dlevine at seasontickets.com 


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/2/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/2/2003
 



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
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