Hi Christian
First thing to say is that Spectrum Report Manager is the cleanest solution to
your problem. It is also the most costly :-)
Assuming your budget doesn't stretch to that I would think the AlarmNotifier
solution should work better for you than your cron script primarily because you
will be more sure of not missing any alarms. Your cron script would miss any
alarms that occur and are cleared in between the cron job running, whereas
AlarmNotifier is triggered by the alarm event and the alarm clear event.
If you configure AlarmNotifier correctly (using the SANM GUI for your filtering
if you have that) it triggers SetScript on the alarm event and ClearScript on
the alarm clear event. You would be able to modify those scripts to filter and
log any of the information in the alarm. So for instance you could filter out
all but the up/down alarms and log the details for those to a file and in a
format that suited you.
The FT issue with AlarmNotifier is something you will need to look at working
around. You could run your modified AlarmNotifier on both the Primary and
Secondary servers and do some postprocessing of the files to ensure you don't
miss or duplicate anything.
Regards, John
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 October 2008 06:53
To: spectrum
Subject: WG: Re: [spectrum] Outage Report(Virengetestet -> ok)
Yathrib & all,
thanks for your hints, but I guess usind AlarmNotifier is similar to my
dirty cronjob that seeks for models with Condition = red - it's hard to stay
synchronized in a Fault Tolerant environment. :-(
Freundliche Grüße / Best regards
Christian Fieres
Mainova AG
Planung und Betrieb Infrastruktur (M3-ON2)
Service Operation Center
Solmsstraße 38
60623 Frankfurt
Telefon / Phone (069) 2 13-2 36 17
Mobil / Mobile (0170) 5 60 15 63
Telefax / Facsimile (069) 2 13-9 62 36 17
E-Mail [EMAIL PROTECTED]
Mainova Aktiengesellschaft - Solmsstraße 38 - D-60623 Frankfurt am Main
Vorsitzende des Aufsichtsrates: Oberbürgermeisterin Dr. h. c. Petra
Roth - Vorstand: Dr. Constantin Alsheimer, Lothar Herbst, Joachim Zientek
Sitz der Aktiengesellschaft: Frankfurt am Main - Amtsgericht Frankfurt
HRB 7173 - USt-ID-Nr. DE 114184034
----- Weitergeleitet von Christian Fieres/M3-ON/MAINOVA/DE am
14.10.2008 07:51 -----
yathrib <[EMAIL PROTECTED]>
13.10.2008 15:53
An
[EMAIL PROTECTED]
Kopie
spectrum <[email protected]>, [EMAIL PROTECTED]
Thema
Re: [spectrum] Outage Report(Virengetestet -> ok)
On Mon, Oct 13, 2008 at 02:45:18PM +0200, [EMAIL PROTECTED] wrote:
> I need a CSV report (generated daily to import into Excel) that says
which
> models were alarmed critical from which time on for how long during
> yesterday (i.e. an outage report which was AFAIR part of the old
Report
> Generator). As easy as it seems, I have come along a few problems and
need
> a little push into the right direction.
Consider using AlarmNotifier.
Below is some sample code for logging every event, along with severity,
time,
model, etc. Feedback appreciated.
alarmrc:
VNM_MAIL_TIMEOUT=600000
VNM_CONNECT_TIME_LIMIT=60000
KEEP_ALIVE_TIMEOUT=30000
KEEP_ALIVE_INTERVAL=60000
GET_GRAY_INITIAL_ALARMS=false
GET_EXISTING_ALARMS=false
UPDATE_EXISTING_ALARMS=true
USE_DEVICE_NETWORK_ADDRESS=true
SEND_EVENT_UPDATES=true
USE_NEW_INTERFACE=true
EXTRA_ATTRS_AS_ENVVARS=
EXTRA_ATTRS_AS_ARGS=0x0023000e,0x11f51,0x12022
UPDATE_ATTRS=0x11f4d,0x12022
GET_PROBABLE_CAUSES=true
GET_EVENTS=true
SHOW_ALL_EVENTS=true
MSG_TIMESTAMP_FORMAT=%X %x
LANDSCAPE=1600
SEND_ALARM_DELAY=1000
SET_SCRIPT=/tmp/logger/alarm_logger_set.pl
CLEAR_SCRIPT=/tmp/logger/alarm_logger_clear.pl
UPDATE_SCRIPT=/tmp/logger/alarm_logger_update.pl
alarm_logger.pl:
#!/usr/bin/env perl
# modify as required, but keep this code light as it's executed for
every
# alarm action (set, clear, update).
use warnings;
use strict;
my ($action) = ( $0 =~ /alarm_logger_(\w+)\.pl/ );
$action = uc $action;
my @default_args = (
'Date', # 08/22/2008
'Time', # 13:50:01
'Model_Type', # Pingable
'Model_Name', # router1
'Alarm_ID', # 26671
#'Global_Alarm_ID',
'Severity', # CRITICAL
'Cause', # 10009
'Repair_Person', #
'Server', # server1
'Landscape', # 0x9000000
'Model_Handle', # 0x9000986
'Model_Type_Handle',# 0x10290
'IP_Address', # 192.168.37.132
'Security_String', #
'Alarm_State', # NEW
'Acknowledged', # FALSE
'Clearable', # FALSE
'Dummy', # FALSE
'Dummy', #
'Dummy', # 0
'Dummy', #
'Dummy', # 23150
'Dummy', #
'Device_Type', # IP Device
);
my @extra_args = qw(
Cleared_By_User_Name
Trouble_Ticket_ID
);
my @args = (@default_args, @extra_args);
if ( @args != @ARGV ) {
die "Arglist length mismatch detected: @ARGV\n";
}
my %alarm_details;
@[EMAIL PROTECTED]@ARGV;
$alarm_details{Action}=$action;
$alarm_details{Prob_Cause}=$ENV{PCAUSE};
$alarm_details{Prob_Cause}=~s/\n.*//xms;
$alarm_details{Event_Msg}=$ENV{EVENTMSG};
#use Data::Dumper;
#warn Dumper \%alarm_details;
# modify to output fields of interest
print "LOG:",
join(",",@alarm_details{qw(Server Model_Name Date
Time Action
Severity Alarm_ID Prob_Cause Acknowledged
Trouble_Ticket_ID
Cleared_By_User_Name)}),
"\n";
Running:
mkdir /tmp/logger
cp alarm_logger.pl /tmp/logger
cp alarmrc /tmp/logger
cd /tmp/logger
ln -s alarm_logger.pl alarm_logger_set.pl
ln -s alarm_logger.pl alarm_logger_clear.pl
ln -s alarm_logger.pl alarm_logger_update.pl
$SPECROOT/Notifier/AlarmNotifier -r /tmp/logger/alarmrc >
/tmp/logger/output.log
Output looks like:
LOG:server1,router1,10/13/2008,09:45:08,SET,CRITICAL,223507,DEVICE
HAS STOPPED RESPONDING TO POLLS,FALSE,,N/A
--
yathrib
* --To unsubscribe from spectrum, send email to [EMAIL PROTECTED]
with the body: unsubscribe spectrum [EMAIL PROTECTED]
---
To unsubscribe from spectrum, send email to [EMAIL PROTECTED] with the body:
unsubscribe spectrum [EMAIL PROTECTED]