DX NetOps

 View Only
Expand all | Collapse all

Generate SNMP Traps from a received email

  • 1.  Generate SNMP Traps from a received email

    Posted Oct 18, 2013 01:39 PM
    Hi everyone.

    We use spectrum as the main source of alarm notifications, and we receive several traps from different platforms and devices.
    Now, we need to process emails (alarms generated by other platforms) and generate snmp traps to send to spectrum.

    Regrettably, the platforms that generate that emails, can't generate and send traps directly to spectrum

    Someone have experience with this?
    I searched online, but all the solutions that i found...can convert syslog messages to snmp traps... but, not emails.

    Regards,
    Cristian


  • 2.  RE: Generate SNMP Traps from a received email

    Posted Oct 21, 2013 03:34 AM
    Hi,

    Spectrum is not able to read-out eMail message. I integrated Remedy via eMail Notification a few years ago. I wrote a Java program, which checks a email mailbox every few minutes and read-out the emails.
    With this information I updated the alarms in Spectrum.

    Regards,
    Christoph


  • 3.  RE: Generate SNMP Traps from a received email

    Posted Oct 21, 2013 01:19 PM
    Thanks for your answer Christoph

    I'll have to do the same.
    I'm going to keep looking if there is any tool on the market to do that.

    Regards,
    Cristian


  • 4.  RE: Generate SNMP Traps from a received email

    Posted Oct 27, 2013 10:22 PM

    What OS is the SpectroServer running ?

    If it's running linux, You could possibly use something like fetchmail/procmail to retreive emails from a server, and then further process the email to send a snmp trap out from the Spectrum Server itself. After that you could catch the trap with spectrum and do some further processing that way.



  • 5.  RE: Generate SNMP Traps from a received email

    Posted Oct 28, 2013 09:24 AM
    Thanks for your answer.
     
    Yes, we are using Linux on SS, and is a good idea that you're proposing. In a few weeks, we are going to deal with this topic... when we solve that, I'm going to share our solution in this post.
     

    Regards,

    Cristian



  • 6.  RE: Generate SNMP Traps from a received email

    Posted Nov 12, 2013 06:03 PM

    Christian

    Did you ever solve this? We are looking to do exactly this same thing: some external monitoring program can send email, and we'd like to have Spectrum react to it. Our Spectrum is RHEL-based, so we could use a linux-based mail program... How did you solve this?

    Thanks in advance
    Brian



  • 7.  RE: Generate SNMP Traps from a received email

    Posted Nov 13, 2013 07:56 AM
    Hi Brian,
     
    We can't solve this yet. As Christoph_Kessler said, we think that the best way to solve it's to code a piece of software in-house. We try to find some software online, but we can't (there is a lot of programs to read syslogs but not emails)
     
    I think, that in a month (approximately) we are going to start with this. When we solve the problem, i'm going to publish the solution
     
    My apologies for not help you now.
     
    Regards
     
    Cristian


  • 8.  RE: Generate SNMP Traps from a received email

    Posted Nov 13, 2013 01:16 PM

    I would configure your monitorint tool to send the email directly to an alias in your spectro server, ie: email2trap@yourspectroserverip. On the spectro server I would have the email2trap alias configured as a pipe to a script (perl, python, even bash, whatever you are confortable with). This script would process STDIN  and generate the trap.

     

    Of course with this solution you would need postfix running in your spectro server. If this is not acceptable you can simply have a cronjob running a similar script cheking the emais from the email server.

    Renato



  • 9.  RE: Generate SNMP Traps from a received email

    Posted Dec 15, 2013 07:45 PM
    renatobr:

    I would configure your monitorint tool to send the email directly to an alias in your spectro server, ie: email2trap@yourspectroserverip. On the spectro server I would have the email2trap alias configured as a pipe to a script (perl, python, even bash, whatever you are confortable with). This script would process STDIN  and generate the trap.

     

    Of course with this solution you would need postfix running in your spectro server. If this is not acceptable you can simply have a cronjob running a similar script cheking the emais from the email server.

    Renato


    As an alternate to sending traps from Spectrum itself you may be able to parse the content and do a CLI create event
     



  • 10.  Re: Generate SNMP Traps from a received email

    Posted Jun 09, 2016 04:26 AM

    Hello guys,

    did you solve it? I'm looking for mail(imap) utility which will read emails and will transform them to text files on operating system (Windows). I haven't allowed fetchmail under cygwin (cygwin is not supported by customer) .

    Tomas



  • 11.  RE: Generate SNMP Traps from a received email

    Posted Feb 26, 2024 10:02 AM

    Hi. Check out Mail2SNMP. With that app you are able to monitor multiple IMAP mailboxes for incoming mails and send SNMP traps when a mail matches configurable rules. Regards, Kevin




  • 12.  Re: Generate SNMP Traps from a received email

    Posted Jun 09, 2016 07:24 AM

    Just a question. Why don't you get the other tools to send traps? Mail isn't really the way forward with this kind of integration. Most tools provide the ability to send traps. We do this and it works fine. When there is no way we usually use syslog or in worst case we get a script to send a custom trap which we can manipulate in Spectrum.



  • 13.  Re: Generate SNMP Traps from a received email

    Posted Aug 30, 2018 08:06 AM
    Edited by Rajashekar Allala Jun 28, 2019 09:16 AM


  • 14.  RE: Re: Generate SNMP Traps from a received email

    Posted Jun 28, 2019 08:25 AM
    Hi Raj,

    Script link shared is re-directing to home page.Please can you re-share correct link

    Regards,
    Umesh


  • 15.  RE: Re: Generate SNMP Traps from a received email
    Best Answer

    Posted Jun 28, 2019 09:17 AM
    As the CA community got migrated to Broadcom community, the above link is not working. Use the below.

    https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=07ca49af-349e-4f0e-8f8d-5aa30648f2a3&CommunityKey=671164c3-e575-4b08-96ab-edc2e1ceed13&tab=digestviewer#bm05f26755-ca32-4525-b0ad-25de7822648a

    ------------------------------
    Thank you.
    Rajashekar
    ------------------------------



  • 16.  RE: Generate SNMP Traps from a received email

    Posted Feb 26, 2024 10:03 AM

    Check out Mail2SNMP. With that Windows tool you are able to monitor multiple IMAP mailboxes for incoming mails and send SNMP traps when a mail hits configurable rules.