I need help in understanding how nagios remote server accept arguments. It seems to me that the plug-ins have different methods of accepting args from the nagios host. Sometimes the args are delimited by "!" and sometimes by " ". Look at the two examples below.
<br><br> # NAGIOS HOST: Define a service to check "hard drive"<br>
define service{<br>
use office-service<br>
host_name minsk<br>
service_description Disk Free<br>
check_command check_nrpe!check_disk!20%!10%<br> } ^^^^ args delimited by "!"<br> <br>But look how I had to pass in arg2 and arg3 to get the command to work.
<br><br> #REMOTE SERVER:<br> command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG2$ -c $ARG3$ -u MB -e -A<br>
^^^^^^ ^^^^<br>
This second plugin also works, but there is a space as a delimiter instead of "!"<br><br>NAGIOS HOST<br>
# Define a service to check "processes"<br>
define service{<br>
use office-service<br>
host_name minsk<br>
service_description MLMainDriver.pl<br>
check_command check_nrpe!check_procs!1:1 MLMainDriver.pl<br>
^^^^ args delimited by space<br><br>And here arg1 and arg2 are passed.<br><br> # REMOTE SERVER<br> command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
<br><br>NAGIOS HOST<br>define command{<br> command_name check_nrpe<br> command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$<br> }<br><br><br><br><br>--- <br><a href="mailto:Gil@Vidals.net">
Gil@Vidals.net</a>