summaryrefslogtreecommitdiffstats
path: root/web/attachments/332975-check_asterisk.pl.diff
blob: 3bc75848b834b584d063c8120a0d587f88d4cbd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- check_asterisk.orig.pl	2009-06-25 16:58:44.000000000 -0500
+++ check_asterisk.pl	2009-06-25 16:55:44.000000000 -0500
@@ -16,6 +16,7 @@
 	$runmode,
 	$key,
 	$s,
+	$p,
 );
 my $stop = 0;
 my $mgr_port = 5038;
@@ -178,6 +179,23 @@
 	undef($s);
 	foreach $key (keys %channels) {
 		$s .= " " . $key . " (" . $channels{$key} . ")";
+
+		# Performance
+		if (defined($p)) {
+			$p .= " ";
+		}
+		$p .= $key . "=" . $channels{$key};
+		if (defined($warnval{$key})) {
+			$p .= ";" . $warnval{$key};
+		} else {
+			$p .= ";";
+		}
+		if (defined($critval{$key})) {
+			$p .= ";" . $critval{$key};
+		} else {
+			$p .= ";";
+		}
+		$p .= ";0";
 	}
 
 	foreach $key (keys %critval) {
@@ -214,6 +232,8 @@
 	}
 
 	print $cause;
+	print "|";
+	print $p;
 
 	print "\n" if ($verbose);