bug with a cyrillic text in host alias

Danila Kutepkin skorbets at rambler.ru
Wed May 17 14:50:38 CEST 2006


I've found, that nagios shell has many envariment  variables, such as 
NAGIOS_HOSGROUPNAME etc. Also, in has $NAGIOS_HOSTALIAS. That var 
contains correct KOI8-R text. Also, I've found, that I can use this 
vars instead of macros in commands definitions:

monitoring:/bin# cat /bin/notify
#/bin/bash

/usr/bin/printf "%b" "***** Nagios  *****\n\nТип: 
$NAGIOS_NOTIFICATIONTYPE\n<KOI8-R text>: 
$NAGIOS_HOSTGROUPNAME\n<KOI8-R text>: $NAGIOS_HOSTNAME\n<KOI8-R text>: 
$NAGIOS_HOSTSTATE\n<KOI8-R text>: $NAGIOS_HOSTALIAS\n<KOI8-R text>: 
$NAGIOS_SHORTDATETIME\n" | /usr/bin/mail -s "Host $NAGIOS_HOSTSTATE 
alert for $NAGIOS_HOSTNAME!" $NAGIOS_CONTACTEMAIL

Is it a good idea to use shell env vars for generating notifications?

Also, I've found, that I can use a mix of macros and shell vars. There 
is only bug in shuch way - when I dump text from PRINTF to some file 
(for example "command_line printf "..." >> /tmp/tmp") it creates file 
named /tmp/tmp$, i.e. we have wrong filename.
I Think, It'd be very useful to have an  opportunity of using both 
macros and shell vars in command scripts!


-------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
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