Since my upgrade to Core-4 it appears that I can no longer pass a "$" character in the community string to the check_snmp_uptinme.pl script
I used to be able to do this by using \\$$ before my upgrade to NagiosXI 2014 R1.0
If I run it from the command line it works OK
./check_snmp_uptime.pl -H 10.1.1.1 -C pas\$word
I have updated the $ARG1$ variable now to pas$word as the Nagios service command appears to actually add a backslash now when I run the Test Check Command
COMMAND:check_snmp_uptime.pl -H 10.1.1.1 -C pas\$word
OUTPUT:
I have now tried all sorts of combinations of \ , \\ , $ and $$ to no avail.
regards... Fred
Problems with passing $ to plugins
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Problems with passing $ to plugins
The $ is for sure special and does require special escaping in the CCM, see:
http://support.nagios.com/wiki/index.ph ... ck_Command
I do want to point out one other thing. The "Test Command" button in the CCM works great for most items as a quick and dirty test to see if the command is formatted correctly, but it is not possible for us to make it work with special side cases like having $ in the$ARGn$ fields, even though Nagios Core may execute them correctly.
http://support.nagios.com/wiki/index.ph ... ck_Command
I do want to point out one other thing. The "Test Command" button in the CCM works great for most items as a quick and dirty test to see if the command is formatted correctly, but it is not possible for us to make it work with special side cases like having $ in the$ARGn$ fields, even though Nagios Core may execute them correctly.
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
Re: Problems with passing $ to plugins
Thanks Scott
Thanks for the tip about the Test Command. Now I understand why my results weren't consistent.
I gave up in the end and took the easy option - I got the Network Team to remove the $ from their community string.
Thanks for the tip about the Test Command. Now I understand why my results weren't consistent.
I gave up in the end and took the easy option - I got the Network Team to remove the $ from their community string.