summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-01-10 12:43:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-01-10 12:43:32 +0100
commita84a275798413c3b4d6c369598e6bd4c8faa83f3 (patch)
treea5160c2601d871d2ca1e53d858750019193c5745
parent368ebd9238068a237c5e07ba0c95bec26d2a0d74 (diff)
downloaditzks-systems-a84a275798413c3b4d6c369598e6bd4c8faa83f3.tar.gz
itzks-systems-a84a275798413c3b4d6c369598e6bd4c8faa83f3.tar.bz2
itzks-systems-a84a275798413c3b4d6c369598e6bd4c8faa83f3.zip
SQUID / Icinga: Update check_squid to usage of the new Monitoring:Plugin Perl module.
-rw-r--r--debian/control4
-rwxr-xr-xusr-lib-nagios-plugins/check_squid8
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 <host> ] [ -d <data> ] [ -p <port> ] [ -t <timeout>] [ -c <threshold> ] [ -w <threshold> ]", version => $VERSION);
+$np = Monitoring::Plugin->new(usage => "Usage: %s [ -v|--verbose ] [ -H <host> ] [ -d <data> ] [ -p <port> ] [ -t <timeout>] [ -c <threshold> ] [ -w <threshold> ]", 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.');