stange symbols in notifications

Hari Sekhon hpsekhon at googlemail.com
Mon Aug 14 10:45:07 CEST 2006


Hugo van der Kooij wrote:
> On Fri, 11 Aug 2006, Hari Sekhon wrote:
>
>   
>> Hari Sekhon wrote:
>>     
>>> Here is an example
>>>
>>> CRITICAL: Only 19.11G (4%) free on 92.168.1.138ig2
>>>
>>>
>>> Why does it seem to be mangled? Is this a character set issue or a local issue or something?
>>>       
>
>   
>> also, the web interface shows this normally:
>>
>> CRITICAL: Only 18.85G (4%) free on \\192.168.1.138\big2
>>
>> but the email alerts always come out as
>>
>> CRITICAL: Only 18.88G (4%) free on 92.168.1.138ig2
>>     
>
> Which makes sense if you read the printf() documentation. You are using a
> character which has a special meaning in string handling environments.
> Just get rid of those backslashes or escape them properly.
>
>   
>> It's not that terrible cos I still know what's going on but this
>> shouldn't happen, and I'd like to resolve it.
>>     
>
> You got exactly what you ordered.
>
> Hugo.
>
>   


After following your suggestion regarding prinf and checking the 
previously unchanged misccommand.cfg I'm not entirely sure what is going 
on here. The definition for email is below:


# 'notify-by-email' command definition
define command{
    command_name    notify-by-email
    command_line    /usr/bin/printf "%b" "***** Nagios  
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: 
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: 
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" 
| /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ 
is $SERVICESTATE$ **" $CONTACTEMAIL$
    }


This doesn't look bad to me, it seems to simply be using lots of Macro$ 
so I assume that the macro must be sending it something funny....

Will have to scratch my head and try to track that down.

Hari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060814/68524952/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
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