help with special character in check command
Rob Brown
dtownrobbrown at gmail.com
Thu Nov 23 00:16:31 CET 2006
I am trying to use the check_snmp command to do a check against some
network gear. The problem is that the community string is "xyz123!"
(not really but example) and I cannot figure out how to get this to
pass thru to the check command without it stripping the "!" character.
For example:
define command {
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o $ARG1$
-w $ARG2$ -c $ARG3$ -C $ARG4$
}
define service {
host_name myrouter
service_description check_connections
useprod- workhours
check_command check_snmp![myoid]!255000!260000!xyz123!
notification_options c,w,r,f
contact_groups sysadmin
}
I have run the args thru a debug command and no matter what, the last
! in the comm string gets stripped off.
I have tried:
check_snmp![myoid]!255000!260000!xyz123!
check_snmp![myoid]!255000!260000!xyz123\!
check_snmp![myoid]!255000!260000!xyz123!!
my nagios.cfg does have the following:
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
but I tried taking the bang out and it still doesn't work.
Any help here would be appreciated, as I cannot change the community string.
There's got to be some trick to get this to work!
PS: the command works fine when run from the command line.
-------------------------------------------------------------------------
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