From a84a275798413c3b4d6c369598e6bd4c8faa83f3 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 10 Jan 2018 12:43:32 +0100 Subject: SQUID / Icinga: Update check_squid to usage of the new Monitoring:Plugin Perl module. --- debian/control | 4 ++-- usr-lib-nagios-plugins/check_squid | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index 8fcc120..f9664da 100644 --- a/debian/control +++ b/debian/control @@ -560,7 +560,7 @@ Depends: htop, itzks-keyring, itzks-systems-common (>= ${source:Version}), -# libnagios-plugin-perl, + libmonitoring-plugin-perl, links, linuxlogo, mc, @@ -633,7 +633,7 @@ Depends: htop, itzks-keyring, itzks-systems-common (>= ${source:Version}), -# libnagios-plugin-perl, + libmonitoring-plugin-perl, links, linuxlogo, mate-desktop-environment-core, diff --git a/usr-lib-nagios-plugins/check_squid b/usr-lib-nagios-plugins/check_squid index 804d664..a60d169 100755 --- a/usr-lib-nagios-plugins/check_squid +++ b/usr-lib-nagios-plugins/check_squid @@ -23,11 +23,11 @@ my $VERSION = "1.1"; $|; -use Nagios::Plugin; +use Monitoring::Plugin; # todo : use strict; -$np = Nagios::Plugin->new(usage => "Usage: %s [ -v|--verbose ] [ -H ] [ -d ] [ -p ] [ -t ] [ -c ] [ -w ]", version => $VERSION); +$np = Monitoring::Plugin->new(usage => "Usage: %s [ -v|--verbose ] [ -H ] [ -d ] [ -p ] [ -t ] [ -c ] [ -w ]", version => $VERSION); $np->add_arg( spec => 'host|H=s', @@ -247,14 +247,14 @@ if($data =~ /Resources/i) } if($data =~ /Memory/i) { - my $t = Nagios::Plugin::Threshold->set_thresholds(warning => $warning, critical => $critical); + my $t = Monitoring::Plugin::Threshold->set_thresholds(warning => $warning, critical => $critical); $np->add_perfdata( label => "Memory used", value => $memory_used, uom => "KB", threshold => $t); $np->add_perfdata( label => "Memory available", value => $memory_available, uom => "KB"); $np->nagios_exit($np->check_threshold($memory_used), "Squid use $memory_used KB of memory"); } if($data =~ /FileDescriptors/i) { - my $t = Nagios::Plugin::Threshold->set_thresholds(warning => $warning, critical => $critical); + my $t = Monitoring::Plugin::Threshold->set_thresholds(warning => $warning, critical => $critical); $np->add_perfdata( label => "Max FD", value => $fd_available); $np->add_perfdata( label => "Cur FD", value => $fd_used, threshold => $t); $np->nagios_exit($np->check_threshold($fd_used), 'Squid work fine.'); -- cgit v1.2.3