Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I have same issue as described in this post, with message "External command error: Timeout: No Response from xxxx".
Here is the step which i did:
1. Change check_snmp on commands.cfg to: # 'check_snmp' command definition
define command{
command_name check_snmp
command_line $USER1$/check_snmp -P 2c -C kvp -H $HOSTADDRESS$ $ARG1$
}
2. Using check_snmp script to check and result: [root@SYSEC01 libexec]# ./check_snmp -H 10.126.123.1 -C kvp -o sysUpTime.0 -e 2 -t 30 -vvv
/usr/bin/snmpget -Le -t 30 -r 2 -m ALL -v 1 [authpriv] 10.126.123.1:161 sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1077835466) 124 days, 17:59:14.66
Processing oid 1 (line 1)
oidname: DISMAN-EVENT-MIB::sysUpTimeInstance
response: Timeticks: (1077835466) 124 days, 17:59:14.66
SNMP OK - Timeticks: (1077835466) 124 days, 17:59:14.66 |
Any suggestion please let me know?
Regards,
Moderator's note: Always start your own threads and point to the "original" post. Thanks!
Can you post exactly what your are passing into $ARG1$ in the command definition?
This response usually means a few things:
1) You don't have the proper IP/ host, public string or snmp version. Since you ran from the command line cleanly it doesn't look like this is an issue.
2) You aren't passing the correct arguments or there is an arg missing: such as are you passing an OID with -o in the command?
It seems be wrong community con switch.cfg, after change community as same as commands.cfg --> uptime is fine now.
But i have still issue with bandwidth usage and link status port as attache file:
Here is my check_mrtgtraf on commands.cfg: # 'check_local_mrtgtraf' command definition
define command{
command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}
And on switch.cfg: # Monitor bandwidth via MRTG logs
define service{
use generic-service ; Inherit values from a template
host_name BB01
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/www/html/mrtg/10.126.123.1_l.log!AVG!1000000,1000000!5000000,5000000!10
}
I checked with directory /var/www/html/mrtg/ and existed all information of IP: 10.126.123.1
Here is my short mrtg.cfg: # Created by
# /usr/bin/cfgmaker --global "WorkDir: /var/www/html/mrtg" --output /etc/mrtg/mrtg.cfg [email protected]
#yum -y install gd libpng zlib
Package gd-2.0.35-11.el6.x86_64 already installed and latest version
Package 2:libpng-1.2.49-1.el6_2.x86_64 already installed and latest version
Package zlib-1.2.3-29.el6.x86_64 already installed and latest version
My next suggestion would be to recompile mrtg and start fresh.
As far as I can see the files and configs are all correct, there aren't multiple MRTG crons running, the log files and everything have correct permissions. Anything else you can think of??
Also, have you tried any other troubleshooting guides on MRTG? Because that log file read issue is a pretty common error.