Sign "+" in $ARGn$
Posted: Thu Jul 16, 2015 12:08 pm
CentOS release 6.6 (Final) 64bit, manual install on VMware VM, Nagios XI 2014R2.0 - nothing special.
I developed script for Tomcat monitoring, it works from command line:
I created Nagios command and service:
and tried to use it with args:
$ARG1$ /nagios.jsp
$ARG2$ Catalina:type=ThreadPool,name="http-nio-8080"
$ARG3$ connectionCount+currentThreadCount+currentThreadsBusy
$ARG4$ -w 2048 -c 3072
Test check command returns:
So, Nagios removed my "+" from $ARG3$
How can I resolve this issue?
I developed script for Tomcat monitoring, it works from command line:
Code: Select all
[root@nagios libexec]# ./check_bamsas_tomcat.pl -v -H hds1.prod.bamsas.com --port=8081 --url='/nagios.jsp' --name='Catalina:type=ThreadPool,name="http-nio-8080"' --attr='connectionCount+currentThreadCount+currentThreadsBusy'
OK - connectionCount: 8 | connectionCount=8 currentThreadCount=161 currentThreadsBusy=2
Code: Select all
$USER1$/check_bamsas_tomcat.pl -v -H $HOSTADDRESS$ --port=8081 --url='$ARG1$' --name='$ARG2$' --attr='$ARG3$' $ARG4$ $ARG5$$ARG1$ /nagios.jsp
$ARG2$ Catalina:type=ThreadPool,name="http-nio-8080"
$ARG3$ connectionCount+currentThreadCount+currentThreadsBusy
$ARG4$ -w 2048 -c 3072
Test check command returns:
Code: Select all
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_bamsas_tomcat.pl -v -H hds1.prod.bamsas.com --port=8081 --url='/nagios.jsp' --name='Catalina:type=ThreadPool,name="http-nio-8080"' --attr='connectionCount currentThreadCount currentThreadsBusy' -w 2048 -c 3072
OUTPUT: OK - connectionCount currentThreadCount currentThreadsBusy: |
How can I resolve this issue?