Title: [opsview] [9658] Sort @valid_metricname, prevent a warning.
- Revision
- 9658
- Author
- pknight
- Date
- 2012-07-30 15:56:19 +0100 (Mon, 30 Jul 2012)
Log Message
Sort @valid_metricname, prevent a warning.
Modified Paths
Modified: trunk/opsview-core/nagios-plugins/check_apache_performance
===================================================================
--- trunk/opsview-core/nagios-plugins/check_apache_performance 2012-07-30 14:41:59 UTC (rev 9657)
+++ trunk/opsview-core/nagios-plugins/check_apache_performance 2012-07-30 14:56:19 UTC (rev 9658)
@@ -25,12 +25,14 @@
use LWP::UserAgent;
use URI::URL;
-#valid metricnames array
-my @valid_metricname =
- sort ( "traffic", "requests_per_second", "bytes_per_request",
- "bytes_per_second", "accesses", "active_sessions",
- "current_requests", "shared_memory", "idle_worker"
- );
+#valid metricnames array. Keep this list sorted.
+my @valid_metricname = (
+ "accesses", "active_sessions",
+ "bytes_per_request", "bytes_per_second",
+ "current_requests", "idle_worker",
+ "requests_per_second", "shared_memory",
+ "traffic",
+);
my $np = Nagios::Plugin->new(
shortname => "APACHE STATUS",
usage =>
@@ -379,9 +381,9 @@
=head1 NAME
-Nagios::Plugin::Differences - Module to streamline Nagios plugins
-that need to store temporary data and calculate the differences
-between the readings.
+Nagios::Plugin::Differences - Module to streamline Nagios plugins
+that need to store temporary data and calculate the differences
+between the readings.
=head1 VERSION
@@ -393,7 +395,7 @@
=head1 SYNOPSIS
-This module is useful for when there is need to store a set of values
+This module is useful for when there is need to store a set of values
that need to be reread at the next invocation of the plugin. It provides
a set of functions to calculate the differences between the readings.
@@ -421,8 +423,8 @@
=head2 new(%options)
-Constructor for the Nagios::Plugin::Differences object. You
-can pass 'file' => '/tmp/xxx' to override the default file
+Constructor for the Nagios::Plugin::Differences object. You
+can pass 'file' => '/tmp/xxx' to override the default file
('/tmp/_nagios_plugin_$0.tmp').
=cut
@@ -440,8 +442,8 @@
=head2 new_reading($data, [$ts])
-Report a new reading. The reading has to be a hashref. You can optionally
-pass the timestamp for the reading. If you don't pass $ts, the timestamp
+Report a new reading. The reading has to be a hashref. You can optionally
+pass the timestamp for the reading. If you don't pass $ts, the timestamp
of the invocation of the method will be used.
=cut
@@ -460,7 +462,7 @@
=head2 persist([$file])
-Write the stored data to the temporary file
+Write the stored data to the temporary file
=cut
@@ -596,7 +598,7 @@
$npd->rate('difference');
- $npd->rate('forward_difference', 1000);
+ $npd->rate('forward_difference', 1000);
$npd->rate('forward_difference_unknown_wrap');
_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins