hello
Nagios Xi I'm testing in our company snmp community standard contains special characters, nagios xi having trouble adapting to plug check_ifoperstatus
Try editing the file command.cfg by placing the variable $ ARG1 $ in single quotes, but every time you run the program is removed. Is there any way to make nagios Xi accept special characters in the snmp community?
reviewing the console and verify that this type of check I can see doing that changes the snmp community, my community is $1$3.v/q/$; but notes $1$3.v/q/$$; why it gives me the error that is not recognized snmp
nagios 4917 4916 1 07:52 ? 00:00:00 /usr/bin/perl -w /usr/local/nagios/libexec/check_ifoperstatus -H 10.101.11.228 -C $1$3.v/q/$$ -k 9
Problem with community containing special characters
-
ppalaguachi1976
- Posts: 15
- Joined: Wed Apr 09, 2014 7:57 am
Re: Problem with community containing special characters
1) You could attempt to escape the dollar signs ($):
http://support.nagios.com/wiki/index.ph ... ck_Command
2) Or you could use resource.cfg:
Your community string includes 'illegal' meta characters. You will need to use the file /usr/local/nagios/etc/resource.cfg. Edit it to include (we will use $USER9$ for this example):
Then change your command to:
http://support.nagios.com/wiki/index.ph ... ck_Command
2) Or you could use resource.cfg:
Your community string includes 'illegal' meta characters. You will need to use the file /usr/local/nagios/etc/resource.cfg. Edit it to include (we will use $USER9$ for this example):
Code: Select all
$USER9$=$1$3.v/q/$$Code: Select all
$USER1$/check_ifoperstatus -H $HOSTADDRESS$ -C $USER9$ -k 9Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Problem with community containing special characters
My SNMP comunity name has $ in it. I tired defining $USER9$=communityname in /usr/local/nagios/etc/resource.cfg but that didn't work. Could you please help?
Thank you
Thank you
Re: Problem with community containing special characters
Did you try to escape the $ in the password like the example shows?
Also, you can try and surround the password with a single quote and see if that works as well.
Also, you can try and surround the password with a single quote and see if that works as well.
Code: Select all
$USER9$='pass$word'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Problem with community containing special characters
In addition to what @tgriep mentioned, if it does not work -
Could you please show us your entire check_command, and related command definition? What error are you seeing?
This document is pretty useful if you haven't seen it yet - https://assets.nagios.com/downloads/nag ... Macros.pdf
Could you please show us your entire check_command, and related command definition? What error are you seeing?
This document is pretty useful if you haven't seen it yet - https://assets.nagios.com/downloads/nag ... Macros.pdf
Former Nagios Employee