Thank you, it works, but not so fine, i think there is a little problem and i don´t know how to do with de default lines of snmp2montrap file... 
Take a look in my confs if you have time, i don´t want to disturb you, i think you are capable to solve the problem ... I think there´s a little problem to work fine... take a look if you have time...
... Sorry I don´t know perl...
 

################ YOUR CONFIGURATION ##################

my $Patterns = {

# Windows backup exec

'\.iso\.org\.dod\.internet\.snmpV2\.snmpModules\.snmpMIB\.snmpMIBObjects\.snmpTraps\.linkDown' => {

group => 'IFMIB',

service => 'link',

status => 'ok',

},

'\.iso\.org\.dod\.internet\.snmpV2\.snmpModules\.snmpMIB\.snmpMIBObjects\.snmpTraps\.linkUp' => {

group => 'IFMIB',

service => 'link',

status => 'ok',

},

########### WHAT I DO WITH THESE SNMP2MONTRAP DEFAULT LINES ???????? ###########

'^enterprises\.1302\.3\.3\.5(.*)' => {

group => 'tr',            ### mon.cf mapped ###

service => 'tre',        ### mon.cf mapped ###

},

'\.iso\.org\.dod\.internet\.snmpV2\.snmpModules\.snmpMIB\.snmpMIBObjects\.snmpTraps\.authenticationFailure' => { ignore => 1},

};

######################################################################################

 
######### snmptrapd deamon with a little problem  ########
 
[root@mail andre]# /usr/sbin/snmptrapd -P
2002-11-08 16:16:04 UCD-snmp version 4.2 Started.
2002-11-08 16:16:07 192.168.0.130 [192.168.0.130] (via 148.5.7.130 [148.5.7.130])  enterprises.3.1.1
        Link Up Trap (0) Uptime: 16 days, 8:11:50.61
 
Use of uninitialized value in concatenation (.) at /home/andre/mont line 99, <> line 7.
Use of uninitialized value in concatenation (.) at /home/andre/mont line 99, <> line 7.
 
 
######### These are the lines of the log files on snmp2montrap ########
 
>>>>> Fri Nov 8 16:16:07 2002 /home/andre/mont <<<<<

148.5.7.130

148.5.7.130

system.sysUpTime.0 16:8:11:50.61

.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapOID.0 .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTraps.linkUp

.iso.org.dod.internet.snmpV2.snmpModules.snmpCommunityMIB.snmpCommunityMIBObjects.snmpTrapAddress.0 192.168.0.130

.iso.org.dod.internet.snmpV2.snmpModules.snmpCommunityMIB.snmpCommunityMIBObjects.snmpTrapCommunity.0 "public"

.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapEnterprise.0 enterprises.3.1.1

 
######### This is the e-mail output that works for the trap ########

Summary output       : 148.5.7.130:

Group                 : IFMIB
Service               : link
Time noticed          : Fri Nov  8 16:16:07 2002
Secs until next alert :
Members       : IFMIB

Detailed text (if any) follows:
-------------------------------
148.5.7.130:

 
#####################################################
 
There´s a problem here, in the detailed text, theres no information of traps, 'LinkUp', 'LinkDown', 'ColdStart'.
 
 
I hope you understand...
 
----- Original Message -----
From: Ralph.Bugg
Sent: Friday, November 08, 2002 2:51 PM
Subject: RE: Hello !!! I would like a help please .... it´s about snmp2montrap....

Sorry I misunderstood you... What I told you to do would ignore the messages what you really want to do is map it into a serivce watch statement so you'll want it something like this added to the $Patterns hash...
 
---------------------
'\.iso\.org\.dod\.internet\.snmpV2\.snmpModules\.snmpMIB\.snmpMIBObjects\.snmpTraps\.linkDown' => {
            group => 'IFMIB',
            service => 'link',
            status => 'ok',
},
'\.iso\.org\.dod\.internet\.snmpV2\.snmpModules\.snmpMIB\.snmpMIBObjects\.snmpTraps\.linkUp' => {
            group => 'IFMIB',
            service => 'link,
            status => 'ok',
},
----------------------
Then in your mon.cf you can add a watch for it something like
-----------------------
watch IFMIB
  service link
    description SNMP Link Status traps
    period wd {Sun-Sat}
      alert mail.alert bob joe
      upalert mail.alert -u bob joe
-----------------------------
Hope this helps
-----Original Message-----
From: André Leão [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 08, 2002 11:18 AM
To: Ralph.Bugg
Cc: [EMAIL PROTECTED]
Subject: RE: Hello !!! I would like a help please .... it´s about snmp2montrap....

Thank you for yor suggestion, but i don´t know perl so much but i tried to do this and it´s no working fine and, i would like to receive LinkUP
and LinkDown Traps...

 
These traps are linkUp traps which get generated whenever an interface comes up... I'm guessing that you are getting them when the machines bootup.
 
If you don't care about them what you could do is add this to the $Patterns hash in snmp2montrap
 
'\.iso\.org\.dod\.internet\.snmpV2\.snmpModules\.snmpMIB\.snmpMIBObjects\.snmpTraps\.linkUp' => { ignore => 1},
 
and that will silently ignore the linkUp traps (you'll probably want to add linkDown traps as well)

-----Original Message-----
From: André Leão [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 05, 2002 3:06 PM
To: [EMAIL PROTECTED]
Subject: Hello !!! I would like a help please .... it´s about snmp2montrap....

my snmptrapd.conf
traphandle default /etc/snmp2montrap
 
When i receive any trap i always receive something like this:
 
Summary output       : /etc/snmp2montrap: Unrecognized SNMP trap

Group                 : default
Service               : default
Time noticed          : Tue Nov  5 17:43:09 2002
Secs until next alert :
Members       : default

Detailed text (if any) follows:
-------------------------------
=================
148.5.7.130
148.5.7.130
system.sysUpTime.0 13:9:39:02.30
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapOID.0 .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTraps.linkUp
.iso.org.dod.internet.snmpV2.snmpModules.snmpCommunityMIB.snmpCommunityMIBObjects.snmpTrapAddress.0 192.168.0.130
.iso.org.dod.internet.snmpV2.snmpModules.snmpCommunityMIB.snmpCommunityMIBObjects.snmpTrapCommunity.0 "public"
.iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTrap.snmpTrapEnterprise.0 enterprises.3.1.1
=================
 
I receive traps of Windows 2000 server, Linux, Cisco routers, Cyclades routers, Cisco Switch  and it´s the same thing.
 
i hope you help me please...
 
Thank you so lot. 
 
 

André Guizarde Q. de Leão
        Suporte Técnico
Sysdata Sistemas Integrados
     (91) 3084 1610 (Direto)
     (91) 3084 1600 (Geral)
     0300-789-2214

Reply via email to