I have used opcmsg for Openview alerts. A sample alert script is:

#!/usr/bin/perl
#
# ito.alert
# author: Tom Bates, [EMAIL PROTECTED]
# date written: 3/18/1999
#
# modified from:
# template for an alert
#
# Jim Trocki, [EMAIL PROTECTED]
#
# $Id: alert.template,v 1.4 1998/06/28 21:12:21 trockij Exp $
#
#    Copyright (C) 1998, Jim Trocki
#
#    This program is free software; you can redistribute it and/or
modify
#    it under the terms of the GNU General Public License as published
by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307  USA
#
use Getopt::Std;
getopts ("s:g:h:t:l:v:S:u");

#
# the first line is summary information, adequate to send to a pager
# or email subject line
#
#
# the following lines normally contain more detailed information,
# but this is monitor-dependent
#
# see the "Alert Programs" section in mon(1) for an explanation
# of the options that are passed to the monitor script.
#
$summary=<STDIN>;
chomp $summary;
$msg_text = $opt_s . " ALERT " . $opt_S;
if ($opt_u){$msg_text = "END " . $opt_s . " ALERT " . $opt_S};

$t = localtime($opt_t);
($wday,$mon,$day,$tm) = split (/\s+/, $t);



$retval = `/opt/OV/bin/OpC/opcmsg severity=\"$opt_v\" application=MON
object=\"$opt_s\" msg_text=\"$msg_text\" msg_grp=Apps`;

-----Original Message-----
From: Max Baker [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2003 1:32 PM
To: Mon Users
Subject: Using MON with OpenView


I just stumbled on mon, about a second before I started to (poorly)
reinvent the wheel.  This looks way cool!

I need a utility that monitors some services (DHCP,DNS,Radius) and
creates OpenView events/traps/alerts (whatever they call them) when
there is trouble.  

Seems like MON is a perfect match. 

If anyone has any hints on this, please post them here.  I checked
through the archives and found the openview scripts in contrib/, but not
too much more. 

Glad to be here, 
max

PS. If someone has time, could you re-do the all-*.tar.gz archives in
the contrib/ directory -- they're a little out of date. 
_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to