Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
alerts:html_mail2.0 [2016/03/21 07:50] – [Changelog] helge | alerts:html_mail2.0 [2016/03/21 11:58] (current) – [Installation] helge | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
^ Author | [[ helge.jacobsen@atos.net | Helge Jacobsen]] | | ^ Author | [[ helge.jacobsen@atos.net | Helge Jacobsen]] | | ||
Line 5: | Line 5: | ||
^ Requirements | Perl, MIME::Lite | | ^ Requirements | Perl, MIME::Lite | | ||
^ Download | None | | ^ Download | None | | ||
- | ^ Last Update | 2016-03-14 | | + | ^ Last Update | 2016-03-21 | |
===== Description ===== | ===== Description ===== | ||
Line 26: | Line 26: | ||
-Make the script executable:< | -Make the script executable:< | ||
chmod 755 html_mail.pl</ | chmod 755 html_mail.pl</ | ||
+ | -Be sure that you have MIME:: | ||
+ | |||
- Add the following line in whichever alert for which you want messages < | - Add the following line in whichever alert for which you want messages < | ||
- | SCRIPT [XYMON_SERVER_ROOT]/ | + | SCRIPT [XYMON_SERVER_ROOT]/ |
- | - And of course you replace [XYMON_SERVER_ROOT] with the full path to your xymon server directory (e.g. /usr/lib/hobbit/server ). | + | If you want enable/ |
+ | SCRIPT [XYMON_SERVER_ROOT]/ | ||
+ | |||
+ | |||
+ | - And of course you replace [XYMON_SERVER_ROOT] with the full path to your xymon server directory | ||
+ | (e.g. /home/xymon/server ). | ||
===== Source ===== | ===== Source ===== | ||
Line 63: | Line 70: | ||
# 1.7 Helge Jacobsen Add Flapping Status | # 1.7 Helge Jacobsen Add Flapping Status | ||
# 2.0 Helge Jacobsen | # 2.0 Helge Jacobsen | ||
+ | # 2.01 Helge Jacobsen Add Enable/ | ||
+ | # 2.02 Helge Jacobsen Fix for disable "until okay": Convert XYmon Recover Bodytext "for -1 minutes" | ||
+ | # | ||
############################################################################### | ############################################################################### | ||
Line 68: | Line 78: | ||
use strict; | use strict; | ||
- | use lib "/ | + | # only necessary if you have no access to the perl system libs |
+ | # use lib "/ | ||
use MIME::Lite; | use MIME::Lite; | ||
Line 110: | Line 122: | ||
my $FLAPPING; | my $FLAPPING; | ||
my $FLAPPM=" | my $FLAPPM=" | ||
- | + | my $DISABLE; # Disable Flag | |
############################################################################### | ############################################################################### | ||
Line 185: | Line 197: | ||
$SUBJECT = "is Flapping"; | $SUBJECT = "is Flapping"; | ||
} | } | ||
+ | # | ||
+ | # Disable Detection | ||
+ | $DISABLE=(split(/ | ||
+ | if ($DISABLE =~ /INFO/) { | ||
+ | if ($BBALPHAMSG =~ /DISABLED/) { | ||
+ | $SUBJECT = "is DISABLED" | ||
+ | } | ||
+ | if ($BBALPHAMSG =~ /ENABLED/) { | ||
+ | $SUBJECT = "is ENABLED" | ||
+ | } | ||
+ | $BBCOLORLEVEL = " | ||
+ | } | ||
+ | # Convert XYmon Recover Bodytext "for -1 minutes" | ||
+ | | ||
+ | |||
+ | # | ||
# | # | ||
Line 236: | Line 264: | ||
EOF | EOF | ||
my $link .= " | my $link .= " | ||
- | | + | # |
- | $FLAPPM <p> See <a href=\" | + | $htmldata .= "<FONT FACE=\" |
+ | $FLAPPM <p> See <a href=\" | ||
< | < | ||
return $htmldata; | return $htmldata; | ||
Line 296: | Line 325: | ||
* **2016-03-14** | * **2016-03-14** | ||
- | * Initial release | + | * 2.0 Initial release |
* **2016-03-21** | * **2016-03-21** | ||
- | * Little Fix and a smart update | + | * 2.02 Little Fix and a smart update |