- 论坛徽章:
- 0
|
在配置使用snmp时遇到问题。
Current Status: | UNKNOWN
| Status Information: | SNMP problem - No data received from host |
define service{
use generic-service
hostgroup_name switches
service_description Uptime
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 120
notification_period 24x7
check_command check_snmp! -C 'public' -o 'sysUpTime.0'
}
# 'check_snmp' command definition
define command{
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$
}
配置后,出现上面红字的错误,但当我使用:
/usr/lib/nagios/plugins/check_snmp -H HOSTIPADDRESS -P 1 -C 'public' -o 'sysUpTime.0'
可以得到结果:
SNMP OK - Timeticks: (2588692764) 299 days, 14:48:47.64 | DISMAN-EVENT-MIB::sysUpTimeInstance=Timeticks: (2588692764) 299 days, 14:48:47.64
不知道问题出在什么地方?请高手指教!谢谢!
[ 本帖最后由 toseeme 于 2009-5-18 14:57 编辑 ] |
|