centreon-plugins/os/linux/local/plugin.pm

68 lines
2.8 KiB
Perl
Raw Normal View History

#
2017-01-09 17:12:12 +01:00
# Copyright 2017 Centreon (http://www.centreon.com/)
2015-07-21 11:51:02 +02:00
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
2014-01-27 17:12:58 +01:00
package os::linux::local::plugin;
2013-12-13 16:14:12 +01:00
use strict;
use warnings;
2014-01-27 17:12:58 +01:00
use base qw(centreon::plugins::script_simple);
2013-12-13 16:14:12 +01:00
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '0.1';
%{$self->{modes}} = (
2014-03-12 11:50:01 +01:00
'cpu' => 'os::linux::local::mode::cpu',
2014-06-24 14:32:58 +02:00
'cpu-detailed' => 'os::linux::local::mode::cpudetailed',
2014-03-12 11:50:01 +01:00
'cmd-return' => 'os::linux::local::mode::cmdreturn',
2014-06-24 14:32:58 +02:00
'connections' => 'os::linux::local::mode::connections',
'diskio' => 'os::linux::local::mode::diskio',
2014-03-12 11:50:01 +01:00
'files-size' => 'os::linux::local::mode::filessize',
'files-date' => 'os::linux::local::mode::filesdate',
'inodes' => 'os::linux::local::mode::inodes',
2014-03-12 11:50:01 +01:00
'load' => 'os::linux::local::mode::loadaverage',
2014-03-12 17:31:16 +01:00
'list-interfaces' => 'os::linux::local::mode::listinterfaces',
'list-partitions' => 'os::linux::local::mode::listpartitions',
'list-storages' => 'os::linux::local::mode::liststorages',
2014-03-12 11:50:01 +01:00
'memory' => 'os::linux::local::mode::memory',
'packet-errors' => 'os::linux::local::mode::packeterrors',
2014-09-17 11:12:38 +02:00
'paging' => 'os::linux::local::mode::paging',
2014-03-12 14:39:42 +01:00
'process' => 'os::linux::local::mode::process',
2014-03-12 11:50:01 +01:00
'storage' => 'os::linux::local::mode::storage',
'swap' => 'os::linux::local::mode::swap',
2014-03-12 17:31:16 +01:00
'traffic' => 'os::linux::local::mode::traffic',
2014-03-20 10:03:21 +01:00
'uptime' => 'os::linux::local::mode::uptime',
2013-12-13 16:14:12 +01:00
);
return $self;
}
2013-12-13 16:14:12 +01:00
1;
2013-12-13 16:14:12 +01:00
__END__
2013-12-13 16:14:12 +01:00
=head1 PLUGIN DESCRIPTION
2014-01-27 17:12:58 +01:00
Check Linux through local commands (the plugin can use SSH).
2013-12-13 16:14:12 +01:00
=cut