Is there anything special (say, in the nagios config) that I need to do in order to use environment variables in my notification scripts? From the documentation, it looks like the various macros should be made available as enviroment variables, such as NAGIOS_HOSTNAME. However, when I do the following in my shell script: ADDRESS=$NAGIOS_HOSTADDRESS NAME=$NAGIOS_HOSTNAME STATE=$NAGIOS_SERVICESTATE TYPE=$NAGIOS_NOTIFICATIONTYPE TIME=$NAGIOS_LONGDATETIME DESC=$NAGIOS_SERVICEDESC INFO=$NAGIOS_SERVICEOUTPUT I get nothing in the notification email that uses the above set variables. Additionally, if I dump the output of the env command into the e-mail, it doesn't show any NAGIOS_ variables. What am I missing here? The goal is for the script to be able to query the appropriate environment variables directly, rather than having to have a huge long (hard to read) command string that passes in everything from the macros as arguments. Thanks. ----------------------------------------------- Israel Brewster Computer Support Technician II Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- |
BEGIN:VCARD VERSION:3.0 N:Brewster;Israel;;; FN:Israel Brewster ORG:Frontier Flying Service;MIS TITLE:PC Support Tech II EMAIL;type=INTERNET;type=WORK;type=pref:isr...@frontierflying.com TEL;type=WORK;type=pref:907-450-7293 item1.ADR;type=WORK;type=pref:;;5245 Airport Industrial Wy;Fairbanks;AK;99701; item1.X-ABADR:us CATEGORIES:General X-ABUID:36305438-95EA-4410-91AB-45D16CABCDDC\:ABPerson END:VCARD
------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf
_______________________________________________ Nagios-users mailing list Nagios-users@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