Using $ARGn$ in notify command

Tim Daley Tim.Daley at ccci.org
Mon Dec 4 23:04:35 CET 2006


I'm attempting to use $ARG1$ in a notify command:


define service{
        use                             GCX-website
        host_name                       staff2.ccci.org
        service_description             LOGIN-officedepot
        check_command
check_web_login_officedepot!https://staff2.ccci.org/ss/officedepotlogin!
XXXXX!XXXXX
        }

define command{
        command_name                    check_web_login_officedepot
        command_line                    $USER1$/check_website -N -s
$USER10$/check_web_login_officedepot.scr -D HOST=$HOSTNAME$ -D
URL=$ARG1$ -D USERNAME=$ARG2$ -D PASSWORD=$ARG3$
        }

define command{
        command_name    notify-by-email-test        command_line
/usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\\nDUMP:\n\
\nADMINEMAIL: $ADMINEMAIL$ \nADMINPAGER: $ADMINPAGER$ \nARG1: $ARG1$
\nARG2: $ARG2$ \nARG3: $ARG3$ \nARG4: $ARG4$ \nARG5: $ARG5$ \nARG6:
$ARG6$ \nARG7: $ARG7$ \nARG8: $ARG8$ \nARG9: $ARG9$ \nARG10: $ARG10$
\nUSER1: $USER1$ \nUSER2: $USER2$ \nUSER3: $USER3$ \nUSER4: $USER4$
\nUSER5: $USER5$ \nUSER6: $USER6$ \nUSER7: $USER7$ \nUSER8: $USER8$
\nUSER9: $USER9$ \nUSER10: $USER10$ " | /bin/mail -s
"$HOSTALIAS$/$SERVICEDESC$ $NOTIFICAT
IONTYPE$ state is $SERVICESTATE$ **" $CONTACTEMAIL$
        }


The output is:
***** Nagios  *****

Notification Type: PROBLEM

Service: LOGIN-officedepot
Host: staffservices
Address: staffweb.ccci.org
State: CRITICAL

Date/Time: Mon Dec 4 16:55:31 EST 2006

Additional Info:

CRITICAL: Process completed in 2962.234 msec

DUMP:
\
ADMINEMAIL: nagios
ADMINPAGER: pagenagios
ARG1:  
ARG2:  
ARG3:  
ARG4:  
ARG5:  
ARG6:  
ARG7:  
ARG8:  
ARG9:  
ARG10:  
USER1: /usr/lib/nagios/plugins
USER2:  
USER3:  
USER4:  
USER5:  
USER6:  
USER7:  
USER8:  
USER9:  
USER10: /usr/lib/nagios/plugins/check_website_scripts 

It looks like the USERn macros are getting through but the ARGn macros
aren't. What am I doing wrong?




Tim Daley
Campus Crusade for Christ
100 Lake Hart Dr. MC 2900
Orlando, Fl 32832-0100
(407)826-2911

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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