Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

Creating a script to send email notifications for HP Openview Node outages

Hello, everyone...

I need a sample script for Unix, to send email notifications to administrators when a node event is down for more than 5 minutes on HP Openview.

I would like the administrator to  receive an email notiftication when HP Openview displays a  node down event, kick off a script that delays for 5 minuets then pings the node,  If the node is up then exit.  If the node is still down then do a sendmail to that user.  


 I would like this script to pass the name of the node to the script so that it knows what device to ping after the 5 minute delay.

Any help would be greatly appreciated.

0
Menace212
Asked:
Menace212
  • 2
  • 2
1 Solution
 
TintinCommented:

#!/bin/sh
NODE=$1
sleep 300
ping $NODE >/dev/null 2>&1 || mail -s "$NODE down" some@address
0
 
Menace212Author Commented:
I would I implement this in Openview, so it can use the script. Hey tintin what is $1, does it represent the router(node) in Openview...

thanks tintin you've been alot of help over the last couple of months
0
 
TintinCommented:
I haven't used Openview for many years, but I assume you can create a call to the script with the node as the first parameter (that's what $1 will be set to).
0
 
Menace212Author Commented:
thks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now