$ARGS1$ problem, using command's output as argument
Posted: Thu Nov 12, 2015 12:51 pm
I'm trying to figure out arguments substitution, but I don't seem to have found a solution to my problem.
Service MySuperservice should give me a warning if its value goes over that of Command_B, yet it doesn't!
Command_B and Command_C have been tested, and are giving numeric and correct values as output.
What I'm doing wrong?
Code: Select all
define command {
command_name Command_A
command_line /usr/local/nagios/libexec/check_snmp \
-H '$HOSTADDRESS$' \
-C public \
-o 1.2.3.4.5.6.7.8 \
-n \
-w $ARG1$ \
-c $ARG2$
}Code: Select all
define command {
command_name Command_B
command_line /usr/local/nagios/libexec/check_snmp \
-H '$HOSTADDRESS$' \
-C public \
-o 1.2.3.4.5.6.7.9 \
-n
}Code: Select all
define command {
command_name Command_C
command_line /usr/local/nagios/libexec/check_snmp \
-H '$HOSTADDRESS$' \
-C public \
-o 1.2.3.4.5.6.7.10 \
-n
}Code: Select all
define service {
service_description MySuperservice
hostgroup_name MyHostgroup
check_command Command_A!Command_B!Command_C
}
Command_B and Command_C have been tested, and are giving numeric and correct values as output.
What I'm doing wrong?