bonjour,
je me permet de poster à la suite de ce sujet, car j'ai besoin d'interroger un serveur AIX 5.2 via snmp, et cela me donne du fil à retordre !
mon but principal est de récupérer les informations de stockage dans le MIB
ces infos sont normalement dispo grace au service "hostmibd" sur AIX
le plugin suivant me permet de le faire à merveille sur des linux : http://nagios.manubulon.com/snmp_storage.html
voici où j'en suis :
les services suivant fonctionnent :
snmpd tcpip 68506 active
snmpmibd tcpip 113626 active
dpid2 tcpip 67784 active
hostmibd tcpip 110124 active
aixmibd tcpip 127350 active
voici mon snmpdv3.conf
Code:
VACM_GROUP group1 SNMPv1 ccub - VACM_VIEW defaultView internet - included - # exclude snmpv3 related MIBs from the default view #VACM_VIEW defaultView snmpModules - excluded - VACM_VIEW defaultView 1.3.6.1.6.3.1.1.4 - included - VACM_VIEW defaultView 1.3.6.1.6.3.1.1.5 - included - VACM_VIEW defaultView 1.3.6.1.2.1 - included - # exclude aixmibd managed MIBs from the default view #VACM_VIEW defaultView 1.3.6.1.4.1.2.6.191 - excluded - VACM_ACCESS group1 - - noAuthNoPriv SNMPv1 defaultView - defaultView - NOTIFY notify1 traptag trap - TARGET_ADDRESS Target1 UDP 127.0.0.1 traptag trapparms1 - - - TARGET_PARAMETERS trapparms1 SNMPv1 SNMPv1 ccub noAuthNoPriv - COMMUNITY ccub ccub noAuthNoPriv 0.0.0.0 0.0.0.0 - DEFAULT_SECURITY no-access - - logging file=/usr/tmp/snmpdv3.log enabled logging size=0 level=0 smux 1.3.6.1.4.1.2.3.1.2.1.2 gated_password # gated smux 1.3.6.1.4.1.2.3.1.2.3.1.1 muxatmd_password #muxatmd
/etc/snmpd.peers
Code:
"gated" 1.3.6.1.4.1.2.3.1.2.1.2 "gated_password" "dpid2" 1.3.6.1.4.1.2.3.1.2.2.1.1.2 "dpid_password" "muxatmd" 1.3.6.1.4.1.2.3.1.2.3.1.1 "muxatmd_password"
une requete qui fonctionne :
snmpwalk -c ccub -v1 MachineAIX .1.3.6.1.2.1
Code:
SNMPv2-MIB::sysDescr.0 = STRING: IBM PowerPC CHRP Computer Machine Type: 0x0800004c Processor id: 0051DD5A4C00 Base Operating System Runtime AIX version: 05.02.0000.0010 TCP/IP Client Support version: 05.02.0000.0010 SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2.3.1.2.1.1.3 SNMPv2-MIB::sysUpTime.0 = Timeticks: (21400) 0:03:34.00 SNMPv2-MIB::sysContact.0 = STRING: SNMPv2-MIB::sysName.0 = STRING: blablabla SNMPv2-MIB::sysLocation.0 = STRING: SNMPv2-MIB::sysServices.0 = INTEGER: 72 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-SMI::enterprises.2.3.1.2.1.1.3 SNMPv2-MIB::sysORDescr.1 = STRING: AIX SNMP Agent SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::snmpInPkts.0 = Counter32: 101 SNMPv2-MIB::snmpInBadVersions.0 = Counter32: 0 SNMPv2-MIB::snmpInBadCommunityNames.0 = Counter32: 67 SNMPv2-MIB::snmpInBadCommunityUses.0 = Counter32: 0 SNMPv2-MIB::snmpInASNParseErrs.0 = Counter32: 0 SNMPv2-MIB::snmpEnableAuthenTraps.0 = INTEGER: disabled(2) SNMPv2-MIB::snmpSilentDrops.0 = Counter32: 0 SNMPv2-MIB::snmpProxyDrops.0 = Counter32: 0
snmpwalk -c ccub -v1 MachineAIX .1.3.6.1.2.1.25
mais elle ne me retourne rien du tout !!
depuis la machine AIX, en local donc, j'obtiens toujours la même valeur :
snmpinfo -m next -c ccub -v 1.3.6.1.2.1.25
ibm.2.1.1.0 = 50864
snmpinfo -m next -c ccub -v 1.3.6.1.2.1.25.2
ibm.2.1.1.0 = 50864
mais dans les logs, j'ai pas mal d'erreurs qui ne me plaisent pas :
/var/tmp/snmpdv3.log
Code:
12/19/07 11:23:22 AM - Accepted new SMUX inet socket connection on fd=11 from 127.0.0.1 port 51127. 12/19/07 11:23:22 AM - Closing SMUX connection, fd=11. 12/19/07 11:23:22 AM - Address 127.0.0.1 port 51127. 12/19/07 11:23:22 AM - rc = -2 (SNMP_RC_NOT_FOUND) from snmp_delete_subagent(). 12/19/07 11:23:27 AM - Accepted new SMUX inet socket connection on fd=11 from 127.0.0.1 port 51134. 12/19/07 11:23:27 AM - Closing SMUX connection, fd=11. 12/19/07 11:23:27 AM - Address 127.0.0.1 port 51134. 12/19/07 11:23:27 AM - rc = -2 (SNMP_RC_NOT_FOUND) from snmp_delete_subagent().
Code:
12/19/07 09:02:17 AM - hr_src.c (354) stopsrc issued 12/19/07 09:03:31 AM - ../../../../../../src/tcpip/usr/sbin/hostmibd/hr_main.C (586) Connect to SNMP agent failed, will keep trying 12/19/07 09:29:24 AM - hr_src.c (354) stopsrc issued 12/19/07 09:30:39 AM - ../../../../../../src/tcpip/usr/sbin/hostmibd/hr_main.C (586) Connect to SNMP agent failed, will keep trying
Code:
Wed Dec 19 11:24:33 NFT 2007 DPI sub-agent (AIX Enterprise MIB Support subagent): reconnected, ready to receive requests... Wed Dec 19 11:24:33 NFT 2007 Error occured, try to re-establish connection. Wed Dec 19 11:24:51 NFT 2007 Connect to SNMP agent failed, will keep trying Wed Dec 19 11:25:01 NFT 2007 DPI sub-agent (AIX Enterprise MIB Support subagent): reconnected, ready to receive requests... Wed Dec 19 11:25:01 NFT 2007 Error occured, try to re-establish connection. Wed Dec 19 11:25:19 NFT 2007 Connect to SNMP agent failed, will keep trying Wed Dec 19 11:25:29 NFT 2007 DPI sub-agent (AIX Enterprise MIB Support subagent): reconnected, ready to receive requests... Wed Dec 19 11:25:29 NFT 2007 Error occured, try to re-establish connection.
Leave a comment: