mon-devel Mailing List for mon
Brought to you by:
trockij
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
(27) |
Mar
|
Apr
(9) |
May
(11) |
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(15) |
| 2006 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(14) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(8) |
| 2008 |
Jan
(6) |
Feb
(4) |
Mar
(7) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2009 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
| 2010 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
|
|
3
|
4
|
5
|
6
(1) |
7
|
8
|
9
|
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
|
17
|
18
|
19
|
20
|
21
|
22
(3) |
23
|
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: Ed R. <er...@pa...> - 2005-07-22 05:12:16
|
On Thu, Jul 21, 2005 at 07:50:19PM -0700, Konstantin 'Kastus' Shchuka wrote:
> I had to make the following changes to make snpp.alert work:
>
> --- cvsroot/mon/alert.d/snpp.alert 2004-06-08 22:18:07.000000000 -0700
> +++ cvsroot-mine/mon/alert.d/snpp.alert 2005-07-21 19:15:31.000000000 -0700
> @@ -25,7 +25,7 @@
> # $Id: snpp.alert,v 1.1.1.1 2004/06/09 05:18:07 trockij Exp $
> #
> use strict;
> -use vars qw /$opt_g $opt_q $opt_s $opt_t/;
> +use vars qw /$opt_g $opt_q $opt_s $opt_t $opt_h $opt_l $opt_u/;
> use Getopt::Std;
> use Net::SNPP;
>
> @@ -52,7 +52,7 @@
>
> my $snpp = Net::SNPP->new ($opt_q) or die;
>
> -$ALERT = $opt_u ? "UPALERT" : "ALERT";
> +my $ALERT = $opt_u ? "UPALERT" : "ALERT";
>
> $snpp->send ( Pager => [ @ARGV ], Message => "$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)" );
Yeah, me too. I guess not too many people were using it.
Here's my version, which adds a few more of the features that are
supposed to be in all monitor scripts:
@@ -47,13 +47,15 @@
my $summary = <STDIN>;
chomp $summary;
-my $t = localtime ($opt_t);
+my $t = localtime ($opt_t || time);
my ($wday,$mon,$day,$tm) = split (/\s+/, $t);
my $snpp = Net::SNPP->new ($opt_q) or die;
-$ALERT = $opt_u ? "UPALERT" : "ALERT";
+my $ALERT= $opt_u ? "UPALERT" : "ALERT";
+my $GROUP= $opt_g || $ENV{MON_GROUP};
+my $SERVICE= $opt_s || $ENV{MON_SERVICE};
-$snpp->send ( Pager => [ @ARGV ], Message => "$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)" );
+$snpp->send ( Pager => [ @ARGV ], Message => "$ALERT $GROUP/$SERVICE: $summary ($wday $mon $day $tm)" );
$snpp->quit;
|
|
From: Konstantin 'K. S. <ka...@ep...> - 2005-07-22 02:50:57
|
I had to make the following changes to make snpp.alert work: --- cvsroot/mon/alert.d/snpp.alert 2004-06-08 22:18:07.000000000 -0700 +++ cvsroot-mine/mon/alert.d/snpp.alert 2005-07-21 19:15:31.000000000 -0700 @@ -25,7 +25,7 @@ # $Id: snpp.alert,v 1.1.1.1 2004/06/09 05:18:07 trockij Exp $ # use strict; -use vars qw /$opt_g $opt_q $opt_s $opt_t/; +use vars qw /$opt_g $opt_q $opt_s $opt_t $opt_h $opt_l $opt_u/; use Getopt::Std; use Net::SNPP; @@ -52,7 +52,7 @@ my $snpp = Net::SNPP->new ($opt_q) or die; -$ALERT = $opt_u ? "UPALERT" : "ALERT"; +my $ALERT = $opt_u ? "UPALERT" : "ALERT"; $snpp->send ( Pager => [ @ARGV ], Message => "$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)" ); -- Konstantin 'Kastus' Shchuka Unix System Administrator Epocrates Inc. tel 650.227.1786 fax 650.592.6995 |
|
From: Konstantin 'K. S. <ka...@ep...> - 2005-07-22 01:45:12
|
While comparing CVS version of qpage.alert to the one I'm using
I noticed the following difference:
--- cvsroot-mine/mon/alert.d/qpage.alert 2005-06-01 17:30:57.000000000 -0700
+++ /usr/lib/mon/alert.d/qpage.alert 2001-06-26 08:45:27.000000000 -0700
@@ -11,7 +11,7 @@
# -l service level
# -q SNPP server, translates to "qpage -s"
#
-# Jim Trocki, tr...@ar...
+# Jim Trocki, tr...@tr...
#
# Copyright (C) 1998, Jim Trocki
#
@@ -67,7 +67,7 @@
else
{
- if (system ("qpage -p $pagedest " .
+ if (!system ("qpage -p $pagedest " .
"'$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)'" .
"2>/dev/null"))
{
The version I'm using has "!system" which looks corect to me.
Any idea why negation was lost in CVS?
Thanks,
--
Konstantin 'Kastus' Shchuka
Unix System Administrator
Epocrates Inc.
tel 650.227.1786
fax 650.592.6995
|
|
From: Ed R. <er...@pa...> - 2005-07-06 23:35:22
|
This is for process.monitor so you can put the SNMP community into
mon.m4 (via the environment) rather than on the command line where
people (or Mon clients using mon.cgi) might see it.
-- Ed
===================================================================
RCS file: RCS/process.monitor,v
retrieving revision 1.1
diff -u -r1.1 process.monitor
--- process.monitor 2005/07/06 23:32:40 1.1
+++ process.monitor 2005/07/06 23:33:06
@@ -42,7 +42,7 @@
$ENV{'MIBS'} = "UCD-SNMP-MIB";
getopts("c:");
-$community = $opt_c || 'public';
+$community = $opt_c || $ENV{'COMMUNITY'} || 'public';
$RETVAL = 0;
|