diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-01-10 12:43:32 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-01-10 12:43:32 +0100 |
commit | a84a275798413c3b4d6c369598e6bd4c8faa83f3 (patch) | |
tree | a5160c2601d871d2ca1e53d858750019193c5745 /usr-lib-nagios-plugins | |
parent | 368ebd9238068a237c5e07ba0c95bec26d2a0d74 (diff) | |
download | itzks-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.
Diffstat (limited to 'usr-lib-nagios-plugins')
-rwxr-xr-x | usr-lib-nagios-plugins/check_squid | 8 |
1 files changed, 4 insertions, 4 deletions
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.'); |