Re: snmptrapd, pas de traphandle
Raphaël 'SurcouF' Bordet <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <1295863386.3020.22.camel@rpvbpi2> |
Hi, Please speak english on this list not french. Since Net-SNMP 5.3, you have to setup authentification configuration to accept incoming SNMP trap and inform requests. I don't understand why you have configuration directives from snmpd.conf in your snmptrapd.conf file. According to snmptrapd.conf manual[1], you've to define: - disableAuthorization yes To disable the new access control. - authCommunity, authUser, authGroup or authAccess to define access rights, like this example: authCommunity log,execute public Bests regards, [1]: http://net-snmp.sourceforge.net/docs/man/snmptrapd.conf.html#lbAF Le lundi 24 janvier 2011 à 08:48 +0100, Victor D'Agostino a écrit : > Bonjour, > > Je tente de faire superviseur snmp sous Debian (Lenny) pour mon onduleur. J'ai installé les packages snmp et snmpd (NET-SNMP 5.4.1) et j'ai fait la configuration suivante avec snmpconf.pl essentielement : > > fichier /etc/snmp/snmp.conf > Code: > # snmp.conf > # Configuration du superviseur SNMP (snmpd) > > # SECTION: Debugging output options > > #dodebugging 0 > #dumppacket no > #notokenwarnings yes > > # SECTION: Output style options > > logtimestamp yes > printnumericenums 1 > printnumericoids no > dontbreakdownoids yes > escapequotes no > quickprinting yes > numerictimeticks yes > suffixprinting 1 > > # SECTION: Textual mib parsing > > mibdirs /etc/snmp/mibs:/usr/share/snmp/mibs > #mibdirs /etc/snmp/mibs > showmiberrors no > mibwarninglevel 2 > strictcommentterm 1 > miballowunderline no > mibreplacewithlatest no > > > # SECTION: Default Authentication Options > # port UDP, version de SNMP, groupe snmp pour ecriture > > defaultport 161 > defversion 1 > defcommunity perso > > > # Access Control > > # sec.name source community > com2sec paranoid default public > com2sec readonly default public > com2sec readwrite default askco > > # sec.model sec.name > group MyROSystem v1 paranoid > group MyROSystem v2c paranoid > group MyROSystem usm paranoid > group MyROGroup v1 readonly > group MyROGroup v2c readonly > group MyROGroup usm readonly > group MyRWGroup v1 readwrite > group MyRWGroup v2c readwrite > group MyRWGroup usm readwrite > > # incl/excl subtree mask > view all included .1 80 > view system included .iso.org.dod.internet.mgmt.mib-2.system > > # context sec.model sec.level match read write notif > access MyROSystem "" any noauth exact system none none > access MyROGroup "" any noauth exact all none none > access MyRWGroup "" any noauth exact all all none > > > fichier /etc/snmp/snmptrapd.conf > Code: > # snmptrapd.conf: > # Gestion des messages d'alertes (trap) par le service > # de gestion des alertes (snmptrapd) > > # Runtime options > #pidfile /var/run/snmptrapd.pid > > # SECTION: Output formatting for traps received. > format2 %02.2l/%02.2m/%y %02.2h:%02.2j:%02.2k %W de %A\n > > # SECTION: Logging options > donotlogtraps no > logoption s 2 > logoption f /var/log/snmptrapd.log > outputoption S > printeventnumbers yes > > # SECTION: Trap Handlers / Traitement des alertes > > #traphandle " .oid" /chemin/programme "arguments" > traphandle default /usr/bin/eject > [b]# remarque : j'ai essayé avec divers OID, notament .1.*[/b] > > # SECTION: Authentication options > ignoreauthfailure no > > # Access Control > > # sec.name source community > com2sec paranoid default public > com2sec readonly default public > com2sec readwrite default perso > > # sec.model sec.name > group MyROSystem v1 paranoid > group MyROSystem v2c paranoid > group MyROSystem usm paranoid > group MyROGroup v1 readonly > group MyROGroup v2c readonly > group MyROGroup usm readonly > group MyRWGroup v1 readwrite > group MyRWGroup v2c readwrite > group MyRWGroup usm readwrite > > # incl/excl subtree mask > view all included .1 80 > #view system included .iso.org.dod.internet.mgmt.mib-2 > > # context sec.model sec.level match read write notif > access MyROSystem "" any noauth exact none none none > access MyROGroup "" any noauth exact all none none > access MyRWGroup "" any noauth exact all all none > > > Le fichier /etc/snmp/snmpd.conf est vide car je ne veux pas d'agent snmp la machine superviseur. > > Je lance le tout sans passer par inetd par les commandes suivantes : > Code: > #!/bin/bash > killall snmpd > killall snmptrapd > snmpd -d -c /etc/snmp/snmp.conf > snmptrapd -d -c /etc/snmp/snmptrapd.conf > > avec -d pour avoir le débug dans les logs, dans les logs je vois ça : > > Code: > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0000: 30 58 02 01 00 04 05 61 73 6B 63 6F A4 4C 06 0B 0X.....perso.L.. > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0000: 30 58 02 01 00 04 05 61 73 6B 63 6F A4 4C 06 0B 0X.....perso.L.. > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0016: 2B 06 01 04 01 93 24 01 02 01 02 40 04 C0 A8 00 +.....$....@.... > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0016: 2B 06 01 04 01 93 24 01 02 01 02 40 04 C0 A8 00 +.....$....@.... > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0032: 01 02 01 06 02 01 02 43 03 0B 09 89 30 2C 30 2A .......C....0,0* > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0032: 01 02 01 06 02 01 02 43 03 0B 09 89 30 2C 30 2A .......C....0,0* > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0048: 06 0B 2B 06 01 04 01 93 24 01 02 01 02 04 1B 55 ..+.....$......U > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0048: 06 0B 2B 06 01 04 01 93 24 01 02 01 02 04 1B 55 ..+.....$......U > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0064: 74 69 6C 69 74 79 20 70 6F 77 65 72 20 6E 6F 74 tility power not > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0064: 74 69 6C 69 74 79 20 70 6F 77 65 72 20 6E 6F 74 tility power not > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0080: 20 61 76 61 69 6C 61 62 6C 65 available > Jan 21 10:57:03 pi02-deb1 snmptrapd[3054]: 0080: 20 61 76 61 69 6C 61 62 6C 65 available > > > Et avec Wireshark je vois bien les traps arrivées sur le port UDP 162. > > Mais malheureusement l'action associée à la réception de toutes les trap (ouvrir le lecteur cd avec /bin/eject) ne se fait pas :( > > Sur le net beaucoup de personnes ont rencontré ce problème mais impossible de trouver la solution. > Je ne sais pas du tout où l'erreur se situe ! > > Merci d'avance pour votre aide > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Net-snmp-users mailing list > [email protected] > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users