Code:
./configure --enable-server --enable-agent \
--with-mysql \
--with-net-snmp \
--with-libcurl=/usr/local
Code:
>snmpget -c commun -v2c 172.17.1.10 .1.3.6.1.2.1.1.1.0 SNMPv2-MIB::sysDescr.0 = STRING: Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by cisco Systems, Inc. Compiled Wed 23-Mar-05 15:33 by yenanh
log file:
Code:
88890:20070513:145553 In process_rule(name:vlan1,range:172.17.1.10-10) 88890:20070513:145553 IP [172.17.1.10] 88890:20070513:145553 Query [select dcheckid,druleid,type,key_,snmp_community,ports from dchecks where druleid=2] 88890:20070513:145553 In process_check(ip:172.17.1.10, ports:161, type:11) 88890:20070513:145553 In discover_service(ip:172.17.1.10, port:161, type:11) 88890:20070513:145553 End discover_service() 88890:20070513:145553 In update_service(ip:172.17.1.10, port:161, status:down) 88890:20070513:145553 In register_host(ip:172.17.1.10) 88890:20070513:145553 Query [select dhostid,druleid,ip,status,lastup,lastdown from dhosts where ip='172.17.1.10' and dhostid>=100000000000000*0 and dhostid<......... 88890:20070513:145553 End register_host() 88890:20070513:145553 End process_check() 88890:20070513:145553 In add_host_event(ip:172.17.1.10) 88890:20070513:145553 Query [select status,dhostid from dhosts where ip='172.17.1.10'] 88890:20070513:145553 End add_host_event()
Code:
>time tcpdump -nli em0 host 172.17.1.10 | grep .1.3.6.1.2.1.1.1.0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 96 bytes ^C316 packets captured 126335 packets received by filter 0 packets dropped by kernel tcpdump -nli em0 host 172.17.1.10 0.01s user 0.01s system 0% cpu 2:55.93 total grep .1.3.6.1.2.1.1.1.0 0.00s user 0.00s system 0% cpu 2:55.93 total
Comment