diff options
| author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-30 00:03:24 +0200 |
|---|---|---|
| committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-30 00:03:24 +0200 |
| commit | 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch) | |
| tree | 1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/332975-check_asterisk.pl.diff | |
| download | site-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz | |
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts,
and configuration files.
Diffstat (limited to 'web/attachments/332975-check_asterisk.pl.diff')
| -rw-r--r-- | web/attachments/332975-check_asterisk.pl.diff | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/web/attachments/332975-check_asterisk.pl.diff b/web/attachments/332975-check_asterisk.pl.diff new file mode 100644 index 0000000..3bc7584 --- /dev/null +++ b/web/attachments/332975-check_asterisk.pl.diff | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | --- check_asterisk.orig.pl 2009-06-25 16:58:44.000000000 -0500 | ||
| 2 | +++ check_asterisk.pl 2009-06-25 16:55:44.000000000 -0500 | ||
| 3 | @@ -16,6 +16,7 @@ | ||
| 4 | $runmode, | ||
| 5 | $key, | ||
| 6 | $s, | ||
| 7 | + $p, | ||
| 8 | ); | ||
| 9 | my $stop = 0; | ||
| 10 | my $mgr_port = 5038; | ||
| 11 | @@ -178,6 +179,23 @@ | ||
| 12 | undef($s); | ||
| 13 | foreach $key (keys %channels) { | ||
| 14 | $s .= " " . $key . " (" . $channels{$key} . ")"; | ||
| 15 | + | ||
| 16 | + # Performance | ||
| 17 | + if (defined($p)) { | ||
| 18 | + $p .= " "; | ||
| 19 | + } | ||
| 20 | + $p .= $key . "=" . $channels{$key}; | ||
| 21 | + if (defined($warnval{$key})) { | ||
| 22 | + $p .= ";" . $warnval{$key}; | ||
| 23 | + } else { | ||
| 24 | + $p .= ";"; | ||
| 25 | + } | ||
| 26 | + if (defined($critval{$key})) { | ||
| 27 | + $p .= ";" . $critval{$key}; | ||
| 28 | + } else { | ||
| 29 | + $p .= ";"; | ||
| 30 | + } | ||
| 31 | + $p .= ";0"; | ||
| 32 | } | ||
| 33 | |||
| 34 | foreach $key (keys %critval) { | ||
| 35 | @@ -214,6 +232,8 @@ | ||
| 36 | } | ||
| 37 | |||
| 38 | print $cause; | ||
| 39 | + print "|"; | ||
| 40 | + print $p; | ||
| 41 | |||
| 42 | print "\n" if ($verbose); | ||
| 43 | |||
| 44 | |||
