Skip to content

Commit

Permalink
Merge pull request #44 from barryib/monitoring-plugin
Browse files Browse the repository at this point in the history
Change Nagios::Plugin with Monitoring::Plugin
  • Loading branch information
James Casey committed Dec 10, 2014
2 parents e824103 + 8ee8f5d commit c115647
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 57 deletions.
4 changes: 2 additions & 2 deletions Build.PL
Expand Up @@ -4,7 +4,7 @@ use Module::Build;
my $build = Module::Build->new
(
dist_name => "nagios-plugins-rabbitmq",
dist_version => "2.0.0",
dist_version => "2.0.1",
dist_author => 'James Casey (jamesc.000@gmail.com)',
dist_abstract => 'Nagios checks for RabbitMQ using the management interface',
installdirs => 'site',
Expand All @@ -20,7 +20,7 @@ my $build = Module::Build->new
"Getopt::Long" => 0,
},
recommends => {
"Nagios::Plugin" => "0.33",
"Monitoring::Plugin" => "0.37",
},
configure_requires => {
"Module::Build" => 0,
Expand Down
16 changes: 8 additions & 8 deletions META.json
Expand Up @@ -4,7 +4,7 @@
"James Casey (jamesc.000@gmail.com)"
],
"dynamic_config" : 1,
"generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.110930",
"generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.133380",
"license" : [
"apache_2_0"
],
Expand All @@ -16,23 +16,23 @@
"prereqs" : {
"build" : {
"requires" : {
"Module::Build" : 0
"Module::Build" : "0"
}
},
"configure" : {
"requires" : {
"Module::Build" : 0
"Module::Build" : "0"
}
},
"runtime" : {
"recommends" : {
"Nagios::Plugin" : "0.27"
"Monitoring::Plugin" : "0.37"
},
"requires" : {
"Getopt::Long" : 0,
"Getopt::Long" : "0",
"JSON" : "2.12",
"LWP::UserAgent" : 0,
"Pod::Usage" : 0,
"LWP::UserAgent" : "0",
"Pod::Usage" : "0",
"URI" : "1.35"
}
}
Expand All @@ -43,5 +43,5 @@
"http://apache.org/licenses/LICENSE-2.0"
]
},
"version" : "v1.0.3"
"version" : "v2.0.1"
}
7 changes: 4 additions & 3 deletions META.yml
Expand Up @@ -6,14 +6,15 @@ build_requires:
Module::Build: 0
configure_requires:
Module::Build: 0
generated_by: 'Module::Build version 0.3603'
dynamic_config: 1
generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.133380'
license: apache
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: nagios-plugins-rabbitmq
recommends:
Nagios::Plugin: 0.33
Monitoring::Plugin: 0.37
requires:
Getopt::Long: 0
JSON: 2.12
Expand All @@ -22,4 +23,4 @@ requires:
URI: 1.35
resources:
license: http://apache.org/licenses/LICENSE-2.0
version: v1.1.0
version: v2.0.1
10 changes: 5 additions & 5 deletions scripts/check_rabbitmq_aliveness
Expand Up @@ -12,7 +12,7 @@
use strict;
use warnings;

use Nagios::Plugin ;
use Monitoring::Plugin ;
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -31,8 +31,8 @@ $PROGNAME = basename($0);
# http://nagiosplug.sourceforge.net/developer-guidelines.html#PLUGOPTIONS


# Instantiate Nagios::Plugin object (the 'usage' parameter is mandatory)
my $p = Nagios::Plugin->new(
# Instantiate Monitoring::Plugin object (the 'usage' parameter is mandatory)
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -141,7 +141,7 @@ check_rabbitmq_aliveness [options] -H hostname
Use the management interface of RabbitMQ to check that the server is alive.
It declares a test queue, then publishes and consumes a message.
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -215,7 +215,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
10 changes: 5 additions & 5 deletions scripts/check_rabbitmq_connections
Expand Up @@ -7,8 +7,8 @@
use strict;
use warnings;

use Nagios::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Nagios::Plugin::Functions qw(%STATUS_TEXT);
use Monitoring::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Monitoring::Plugin::Functions qw(%STATUS_TEXT);
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -20,7 +20,7 @@ $VERSION = '1.0';
use File::Basename;
$PROGNAME = basename($0);

my $p = Nagios::Plugin->new(
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -207,7 +207,7 @@ values are published as performance metrics for the check.
Critical and warning thresholds can be set for each of the metric.
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -303,7 +303,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
8 changes: 4 additions & 4 deletions scripts/check_rabbitmq_objects
Expand Up @@ -8,7 +8,7 @@
use strict;
use warnings;

use Nagios::Plugin ;
use Monitoring::Plugin ;
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -20,7 +20,7 @@ $VERSION = '1.0';
use File::Basename;
$PROGNAME = basename($0);

my $p = Nagios::Plugin->new(
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -154,7 +154,7 @@ Currently the following objects are counted:
=back
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -221,7 +221,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
10 changes: 5 additions & 5 deletions scripts/check_rabbitmq_overview
Expand Up @@ -7,8 +7,8 @@
use strict;
use warnings;

use Nagios::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Nagios::Plugin::Functions qw(%STATUS_TEXT);
use Monitoring::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Monitoring::Plugin::Functions qw(%STATUS_TEXT);
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -20,7 +20,7 @@ $VERSION = '1.0';
use File::Basename;
$PROGNAME = basename($0);

my $p = Nagios::Plugin->new(
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -185,7 +185,7 @@ metrics for the check.
Critical and warning thresholds can be set for each of the metrics.
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -265,7 +265,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
12 changes: 6 additions & 6 deletions scripts/check_rabbitmq_partition
Expand Up @@ -13,7 +13,7 @@
use strict;
use warnings;

use Nagios::Plugin ;
use Monitoring::Plugin ;
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -32,8 +32,8 @@ $PROGNAME = basename($0);
# http://nagiosplug.sourceforge.net/developer-guidelines.html#PLUGOPTIONS


# Instantiate Nagios::Plugin object (the 'usage' parameter is mandatory)
my $p = Nagios::Plugin->new(
# Instantiate Monitoring::Plugin object (the 'usage' parameter is mandatory)
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -101,7 +101,7 @@ if (!$nodename) {
}

my $url = sprintf("http%s://%s:%d/api/nodes/%s\@%s", ($p->opts->ssl ? "s" : ""), $hostname, $port, $rname, $nodename);

print $url;
my $ua = LWP::UserAgent->new;
if (defined $p->opts->proxyurl)
{
Expand Down Expand Up @@ -154,7 +154,7 @@ check_rabbitmq_partition [options] -H hostname
Use the management interface of RabbitMQ to check if a cluster partition has occured.
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -228,7 +228,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
10 changes: 5 additions & 5 deletions scripts/check_rabbitmq_queue
Expand Up @@ -7,8 +7,8 @@
use strict;
use warnings;

use Nagios::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Nagios::Plugin::Functions qw(%STATUS_TEXT);
use Monitoring::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Monitoring::Plugin::Functions qw(%STATUS_TEXT);
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -20,7 +20,7 @@ $VERSION = '1.0';
use File::Basename;
$PROGNAME = basename($0);

my $p = Nagios::Plugin->new(
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname --queue queue",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -198,7 +198,7 @@ published as performance metrics for the check.
Critical and warning thresholds can be set for each of the metrics.
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -290,7 +290,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
12 changes: 6 additions & 6 deletions scripts/check_rabbitmq_server
Expand Up @@ -9,8 +9,8 @@
use strict;
use warnings;

use Nagios::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Nagios::Plugin::Functions qw(%STATUS_TEXT);
use Monitoring::Plugin qw(OK CRITICAL WARNING UNKNOWN);
use Monitoring::Plugin::Functions qw(%STATUS_TEXT);
use LWP::UserAgent;
use URI::Escape;
use JSON;
Expand All @@ -31,8 +31,8 @@ $PROGNAME = basename($0);
# http://nagiosplug.sourceforge.net/developer-guidelines.html#PLUGOPTIONS


# Instantiate Nagios::Plugin object (the 'usage' parameter is mandatory)
my $p = Nagios::Plugin->new(
# Instantiate Monitoring::Plugin object (the 'usage' parameter is mandatory)
my $p = Monitoring::Plugin->new(
usage => "Usage: %s [options] -H hostname",
license => "",
version => $VERSION,
Expand Down Expand Up @@ -223,7 +223,7 @@ the host and examines the erlang memory, process and file descriptor usage.
It provides performance data for each of these variables and allows for
warning and criticality levels to be specified for each.
It uses Nagios::Plugin and accepts all standard Nagios options.
It uses Monitoring::Plugin and accepts all standard Nagios options.
=head1 OPTIONS
Expand Down Expand Up @@ -318,7 +318,7 @@ signify WARNING, UNKNOWN or CRITICAL state.
=head1 SEE ALSO
See Nagios::Plugin(3)
See Monitoring::Plugin(3)
The RabbitMQ management plugin is described at
http://www.rabbitmq.com/management.html
Expand Down
6 changes: 3 additions & 3 deletions scripts/check_rabbitmq_shovels
Expand Up @@ -3,7 +3,7 @@ use strict;
use warnings;
use JSON -support_by_pp;
use LWP::UserAgent;
use Nagios::Plugin;
use Monitoring::Plugin;


$::PROGRAM = "check_rabbitmq_shovels";
Expand All @@ -22,7 +22,7 @@ MAIN: {
# run()
# ---
sub run {
my $np = Nagios::Plugin->new(
my $np = Monitoring::Plugin->new(
plugin => $::PROGRAM,
version => $::VERSION,
blurb => "check that all the shovels of the given RabbitMQ host "
Expand Down Expand Up @@ -234,7 +234,7 @@ diagnostic:
=head1 SEE ALSO
See L<Nagios::Plugin>
See L<Monitoring::Plugin>
The RabbitMQ management plugin is described at
L<http://www.rabbitmq.com/management.html>
Expand Down

0 comments on commit c115647

Please sign in to comment.