Hi, I'm running NNMi 9 on Linux and am trying to sort out SNMP Incident Actions. I'd like to have an automatic action of an email sent whenever a node goes down. The email message would need to specify the IP address and or hostname of the Node that is in a down state. What I have working so far, configured the node down action to run a script that sends an email using Sendmail. Script is : echo "Subject:Node $sourceObjectName Down" The email is generated but I'm not getting the source IP address (I've tried the variable $mga too) all i get in the email is Node Down. Can anyone help please? I don't want to have to install Alarmpoint as this will involve installing a database too. Thanks in advance.
Hi Thanks, but tried that-same results. I've moved to using the ciscoConfigMan trap (every time I save the config a trap is fired off which triggers the email action script), so similar script but the node name still isn't being displayed. I've run nnmtrapdump.ovpl -short -t to see what is coming in: Trap ciscoConfigMan (.18.104.22.168.22.214.171.124.126.96.36.199)at March 10,2011 8:35:53 AM GMT from 'IP Address here'. Will NNM treat the IP address as the hostname in this instance? Thanks again.
*Note. In the command you may specify several Custom Incident Attributes (CIAs), the list of available CIAs is found in the "Help for Administrators" guide available to download at http://support.openview.hp.com/selfsolve/manuals In the command example the following CIA is used: $snn. This indicates the name attribute of the incident's source node.
================================================== ================================================== A couple of mail examples below:
# Example 1 - Simple: echo "This is the body."| mailx -s "mailx Test1" firstname.lastname@example.org
For examples 2 and 3, you can create an script and then call the it from the NNMi command field.
# Example 2 - Using Variables: SUBJECT="mailx Test2" EMAIL_ADDRESS="email@example.com" BODY="This is the body of the message."