Re: [NNMi] Email notification (2309 Views)
Reply
Occasional Advisor
bosseur974
Posts: 8
Registered: ‎05-16-2011
Message 1 of 26 (3,733 Views)
Accepted Solution

[NNMi] Email notification

Hi,
I'm a beginner on NNM and I would like to send an email automatically when an incident are registered. I use NNMi 9.00 on RedHat 5.6.
Can everyone help me to configure this please.
Thanks

Trusted Contributor
Mahmoud_Ibrahim
Posts: 113
Registered: ‎03-13-2011
Message 2 of 26 (3,733 Views)

Re: [NNMi] Email notification

Hi bosseur,


For notification, you have many options,
enabled automatic action for the alert to send email or NNMi comes with a free license for notificatio program called xMatters Lite (alarmpoint) http://www.xmatters.com/products/it-professionals/ mainly from https://connect.xmatters.com/products/alarmpoint-product-suite/index.html

 

You can download it from this link and it has a detailed guide with the source DVD

http://info.xmatters.com/hplite.html

 

Regards,

Mahmoud Ibrahim

http://www.mahmoudthoughts.com

---

  • Say thanks by clicking the "Kudos! Star" which is on the left.
  • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
Regards,
Mahmoud Ibrahim
http://www.mahmoudthoughts.com
  • Say thanks by clicking the "Kudos! Star" which is on the left.

  • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
  • Occasional Advisor
    bosseur974
    Posts: 8
    Registered: ‎05-16-2011
    Message 3 of 26 (3,732 Views)

    Re: [NNMi] Email notification

    Thanks for your quickly answer :smileyhappy: but do you have a solution who use the command "mail" or "mailx" I prefer. While waiting for I test the xmatter solution.

     

    Regards

    Trusted Contributor
    Mahmoud_Ibrahim
    Posts: 113
    Registered: ‎03-13-2011
    Message 4 of 26 (3,733 Views)

    Re: [NNMi] Email notification

    Hi bosseur,

    That was the 1st part of the answer:

    ---
    For notification, you have many options,
    enabled automatic action for the alert to send email

    ----

     


    1. Open incident configuration
    2. Go to -> Action Configuration TAB
    3. Create New one with Lifecycle state set to Registered and Command Type set to ScriptOrExecutable
    4. Add command to send e-mail:

    Type your command here


    Regards,

    Mahmoud Ibrahim

    http://www.mahmoudthoughts.com

    ---

    • Say thanks by clicking the "Kudos! Star" which is on the left.
    • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
    Regards,
    Mahmoud Ibrahim
    http://www.mahmoudthoughts.com
  • Say thanks by clicking the "Kudos! Star" which is on the left.

  • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
  • Occasional Advisor
    bosseur974
    Posts: 8
    Registered: ‎05-16-2011
    Message 5 of 26 (3,733 Views)

    Re: [NNMi] Email notification

    Thank you very much.

     

    I inform you of the progress.

     

    Best regards

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 6 of 26 (3,733 Views)

    Re: [NNMi] Email notification

    You may also want to limit which nodes the emails are being sent for. If this is the case, you could create a node group containing only those nodes, and then create a node-based action, rather than a general action, on the incidents you want to email.

     

    I, BTW, generally use blat.exe when sending emails from NNMi, but obviously this is just one out of many alternatives.

     

    BR,
    Frank W. Mortensen
    http://www.managon.com

    The views expressed in my contributions are both my own and my company's, as we are one :smileyhappy:

    Occasional Advisor
    bosseur974
    Posts: 8
    Registered: ‎05-16-2011
    Message 7 of 26 (3,732 Views)

    Re: [NNMi] Email notification

    Hi Frank,

    I can't use Blat because I'm on RedHat, but I make a bash script who works with mailx. This script is working on the command line interface but I don't manage to put it on NNM. Could you help me to configure the NNM to use my script please?

     

    Thank you in advance

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 8 of 26 (3,733 Views)

    Re: [NNMi] Email notification

    A very common mistake, IME, is that people add automatic actions to NNMi but forget to check the "Enable" field at the top of the Action page.

     

     

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 9 of 26 (3,732 Views)

    Re: [NNMi] Email notification

    Furthermore, if the action is in fact enabled, have a look at the logfiles in the $nnmdatadir/log/nnm directory. I usually look at the last update timestamp of the files, to see which would be worth opening.

     

    When I test incident based actions, I do this by manually changing the lifecycle state of an incident that should trigger the action. I.e. setting it to closed, then changing it back to registered. Rather than waiting for a new incident to happen, or trying to generate them from the command line. Just a little testing tip :smileyhappy:

     

     

    Trusted Contributor
    Mahmoud_Ibrahim
    Posts: 113
    Registered: ‎03-13-2011
    Message 10 of 26 (3,733 Views)

    Re: [NNMi] Email notification

    Hello,

    Copy your script to the nnm actions folder /var/opt/OV/ shared/nnm/actions/

    In the Incident Configuration type the command directly without absolute path and pass the parameters as needed using Custom Incident Attributes as needed.

    Regards,
    Mahmoud Ibrahim
    http://www.mahmoudthoughts.com
    ---
    Say thanks by clicking the "Kudos! Star" which is on the left.
    Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
    Regards,
    Mahmoud Ibrahim
    http://www.mahmoudthoughts.com
  • Say thanks by clicking the "Kudos! Star" which is on the left.

  • Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue.
  • Valued Contributor
    Sven Hruza
    Posts: 229
    Registered: ‎09-10-2007
    Message 11 of 26 (3,710 Views)

    Re: [NNMi] Email notification

    Is your script set to executable for everyone?

    Maybe it is a problem with the permissions to the script.

     

    I put the full path in the command field in the action folder.

    Command type is "scriptorexecutable"

     

     

    Sven

    Occasional Advisor
    bosseur974
    Posts: 8
    Registered: ‎05-16-2011
    Message 12 of 26 (3,712 Views)

    Re: [NNMi] Email notification

    Hello everybody!

     

    My email notification is works!!!

     

    The solution is:

     

    Go to "Incident Configuration" --> "Management Event" --> Select the Event --> Select "Node Setting" tab --> Open the Node Group --> Select "Actions" tab

    Now create a new action, choose a lifecycle state and a Command Type (ScriptOrExecutable for me)

    In the Command field type the command, for example: /var/opt/OV/shared/nnm/actions/email_alert.sh "NNM Alert" email@address.ent $snn

     

    My script email_alert.sh:

     

    #!/bin/bash

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

    SUBJECT=$1

    TO=$2

    EQUIPMENT=$3

    MESSAGE="/tmp/message.txt"

     

    echo "Incident!!!" > $MESSAGE

    echo "On $EQUIPMENT" >> $MESSAGE

     

    mail -s "$SUBJECT" "$TO" < $MESSAGE

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

     

    You can make the test with this command: /var/opt/shared/nnm/actions/email_alert.sh "Your email subject" "Your@email"

    If you receive the mail you can test it with NNM. Don't forget configure "mail" program before make this test :smileywink:

     

    Thanks everybody for your help,

    I remain available for all request!

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 13 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    I recognize the good feeling when things work after inital struggling :smileyhappy:

    Honored Contributor
    Jozef_Hitzinger
    Posts: 401
    Registered: ‎10-09-2007
    Message 14 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    Guys, I'm missing something, at the "Select the Event" step. Which event? Obviously we'd like to get e-mail notification for ALL incidents, so picking any specific one of the many predefined ones seems a bad idea. If I try to create new one, the dialog lists "SNMP Object ID   .1.3.6.1.4.1.11.2.17.19.2.0.9999". Hmmm.

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 15 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    Hi

     

    Using this approach, you would have to configure it on an incident by incident basis. But if you want a more general forwarding of all/many incidents, you are probably better off investigating the xMatters Lite alternative.

     

    The problem with this alternative, though, seems to be that you will not be able to use NNMi's own way of identifying a group of nodes (i.e. node groups).

     

    Frank

    Honored Contributor
    Jozef_Hitzinger
    Posts: 401
    Registered: ‎10-09-2007
    Message 16 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    Thanks for the hint, but 3rd party stuff is out of the equation here. Let me rephrase it:

     

    OK, so we have this nice big NNMi thing monitoring the network. When something happens, anything, we want to get notified, as the staff has better things to do than constantly staring at NNMi maps. Basic e-mail is fine, operator will lookup the details in NNMi map when notified ... So where can I put that e-mail? Individually into tens to hundreds of each and every possible Incident type?? Please say I'm wrong on this one ... ;-)

     

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 17 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    Be prepared that 3rd party solutions or in-house scripting/programming are the only alternatives..

     

    Let's see what others answer. Perhaps there is a miracle man or woman out there, who knows something that we don't..

     

    Frank

    Honored Contributor
    Jozef_Hitzinger
    Posts: 401
    Registered: ‎10-09-2007
    Message 18 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    Ok. There's not that much scripting for "send me an e-mail". But first there needs to be a sane way to hook the script into NNMi for "all incidents, thank you". I thought I was missing something obvious in the docs, but maybe it really isn't there. Thanks!

    Honored Contributor
    Frank-MANAGON
    Posts: 1,861
    Registered: ‎05-21-2003
    Message 19 of 26 (3,711 Views)

    Re: [NNMi] Email notification

    There is a webservice interface that can be used, and your script could also fetch stuff directly from the database, using ODBC.

     

    Good luck


    Frank

    Occasional Collector
    vrosic
    Posts: 3
    Registered: ‎09-06-2011
    Message 20 of 26 (3,454 Views)

    Re: [NNMi] Email notification

    hello all,

    I hope that someone is still watching this thread.

    I have configured blat and email.ovpl to work properly and I receive e-mails properly.

     

    But, my problem is when I try to configure sending e-mails to several e-mails. I created node group 1 (contains all routers) and node group 2 (contains several routers). I want NNM (blat/email.ovpl) to send e-mail company1 (which have access to all routers) and to company2 (which has access to several routers) when incident occurs in group of several routers.

     

    I went to Incidents - Snmp Trap Configurations - opened incident - node settings.

    - Under Node group i added group1 and defined "group1.ovpl $firstOccurrenceTime $name $priority $severity $managementAddress $sourceNodeName $sourceObjectName" under actions (lifecycle state registered, and command type scriptOrExecutable.); ordering is 1

    - Under Node group i added group2 and defined "group2.ovpl $firstOccurrenceTime $name $priority $severity $managementAddress $sourceNodeName $sourceObjectName" under actions (lifecycle state registered, and command type scriptOrExecutable.); ordering is 1

     

    when incident occurs, e-mail is sent only to group1@e-mail.com and I don't receive anything to group2@e-mail.com

     

    Regular Advisor
    Navarath
    Posts: 88
    Registered: ‎06-27-2011
    Message 21 of 26 (3,439 Views)

    Re: [NNMi] Email notification

    how come the ordering is 1 for both the node groups???

    Occasional Collector
    vrosic
    Posts: 3
    Registered: ‎09-06-2011
    Message 22 of 26 (3,435 Views)

    Re: [NNMi] Email notification

    Actually I tried everything and also changing numbers of ordering :|
    Member
    Pramodjain
    Posts: 2
    Registered: ‎07-31-2012
    Message 23 of 26 (2,519 Views)

    Re: [NNMi] Email notification

    HI, Can some help me with bat script which can be use for send mail alert from NNMI.

    Valued Contributor
    bebu
    Posts: 116
    Registered: ‎06-14-2011
    Message 24 of 26 (2,509 Views)

    Re: [NNMi] Email notification

    Hi,

     

    If you are using windows environment, you could use blat file to send email notification using SMTPserver, refer balt.net.

     

     

    //Bebu

    Frequent Advisor
    709
    Posts: 36
    Registered: ‎12-25-2012
    Message 25 of 26 (2,309 Views)

    Re: [NNMi] Email notification

    Hello,
    Dear i am facing the same issue nnmi 9 in windows2008, can you send me your full script and steps how to do that to send only email.

    thanks.
    The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.