Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm having a timeout issue with the command check_snmp:
Where I don't understand is that when I tipe the command on the command line it's working fine but not when I put it in the host configuration file.
The following is working fine:
Code:
# ./check_snmp -H IP-TO-CHECK -o ".1.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.2" -U USER -A PASSWORD -x AES -X PASSWORD_SNMP -L authPriv -P 3 -a MD5 -u W -w 1000 -c 1050
SNMP OK - 859 W | iso.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.2=859
The same line in the config file:
Code:
define service{
use generic-service ; Name of service template to use
host_name IP-TO-CHECK-BladeCenter
service_description Power Domain 1 Utilization
check_command check_snmp!-o ".1.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.2" -U USER -A PASSWORD -x AES -X PASSWORD_SNMP -L authPriv -P 3 -a MD5 -u W -w 1000 -c 1050
}
Give me this:
Code:
External command error: Timeout: No Response from IP-TO-CHECK:161.
and if I do specify a timeout value with the "-t" option it give me a timeout critical error.
I think the problem you are having is related to how the command is parsed. I looked through my Nagios configs and I don't use "" anywhere in the command strings.
Try from the command line:
Code:
# ./check_snmp -H IP-TO-CHECK -o .1.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.2 -U USER -A PASSWORD -x AES -X PASSWORD_SNMP -L authPriv -P 3 -a MD5 -u W -w 1000 -c 1050
and this in your Nagios Config:
Code:
define service{
use generic-service ; Name of service template to use
host_name IP-TO-CHECK-BladeCenter
service_description Power Domain 1 Utilization
check_command check_snmp!-o .1.3.6.1.4.1.2.3.51.2.2.10.1.1.1.10.2 -U USER -A PASSWORD -x AES -X PASSWORD_SNMP -L authPriv -P 3 -a MD5 -u W -w 1000 -c 1050
}
Yes, I did and it, but just re-test it again, and it is the same.
Code:
External command error: Timeout: No Response from IP-TO-CHECK:161.
One thing that I don't understand is that it's working fine from command line.
I do monitor over 1000 services and hosts on our network and everything works.
The other thing that comes to mind may be your User / Password. Do they have any special characters that could be intercepted rather than passed in some way (a $ for example).
If it is all related to one host, it has to be something common to those entries. Look for special characters in the Username and password, that is the only other thing I can think of.
after testing wrapping the password with single or double quote give me a "Null" result, so I change my password and remove the exclamation mark character.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.