Fix indentation and some helps
This commit is contained in:
garnier-quentin 2014-04-25 23:51:09 +02:00
parent 930c83cfaf
commit 43316f9dee
3 changed files with 36 additions and 84 deletions

View File

@ -58,7 +58,6 @@ sub new {
"sudo" => { name => 'sudo' },
"command:s" => { name => 'command', default => 'errpt' },
"command-path:s" => { name => 'command_path' },
"command-options:s" => { name => 'command_options', default => ' ' },
"error-type:s" => { name => 'error_type' },
"error-class:s" => { name => 'error_class' },
"retention:s" => { name => 'retention' },
@ -108,7 +107,7 @@ sub manage_selection {
sudo => $self->{option_results}->{sudo},
command => $self->{option_results}->{command},
command_path => $self->{option_results}->{command_path},
command_options => $extra_options.' '.$self->{option_results}->{command_options});
command_options => $extra_options);
my @lines = split /\n/, $stdout;
# Header not needed
shift @lines;
@ -193,45 +192,13 @@ Use 'sudo' to execute the command.
=item B<--command>
Command to get information (Default: 'df').
Command to get information (Default: 'errpt').
Can be changed if you have output in a file.
=item B<--command-path>
Command path (Default: none).
=item B<--command-options>
Command options (Default: '-P -k -T 2>&1').
=item B<--warning>
Threshold warning.
=item B<--critical>
Threshold critical.
=item B<--units>
Units of thresholds (Default: '%') ('%', 'B').
=item B<--free>
Thresholds are on free space left.
=item B<--name>
Set the storage mount point (empty means 'check all storages')
=item B<--regexp>
Allows to use regexp to filter storage mount point (with option --name).
=item B<--regexp-isensitive>
Allows to use regexp non case-sensitive (with --regexp).
=item B<--error-type>
Filter error type separated by a coma (INFO, PEND, PERF, PERM, TEMP, UNKN).

View File

@ -47,25 +47,10 @@ sub new {
$self->{version} = '0.1';
%{$self->{modes}} = (
'cpu' => 'os::aix::local::mode::cpu',
'cmd-return' => 'os::aix::local::mode::cmdreturn',
'diskio' => 'os::aix::local::mode::diskio',
'files-size' => 'os::aix::local::mode::filessize',
'files-date' => 'os::aix::local::mode::filesdate',
'inodes' => 'os::aix::local::mode::inodes',
'load' => 'os::aix::local::mode::loadaverage',
'list-interfaces' => 'os::aix::local::mode::listinterfaces',
'list-partitions' => 'os::aix::local::mode::listpartitions',
'list-storages' => 'os::aix::local::mode::liststorages',
'memory' => 'os::aix::local::mode::memory',
'packet-errors' => 'os::aix::local::mode::packeterrors',
'process' => 'os::aix::local::mode::process',
'storage' => 'os::aix::local::mode::storage',
'swap' => 'os::aix::local::mode::swap',
'traffic' => 'os::aix::local::mode::traffic',
'uptime' => 'os::aix::local::mode::uptime',
'mirrorvg' => 'os::aix::local::mode::mirrorvg',
'errpt' => 'os::aix::local::mode::errpt',
'list-storages' => 'os::aix::local::mode::liststorages',
'storage' => 'os::aix::local::mode::storage',
'mirrorvg' => 'os::aix::local::mode::mirrorvg',
);
return $self;
@ -77,6 +62,6 @@ __END__
=head1 PLUGIN DESCRIPTION
Check Linux through local commands (the plugin can use SSH).
Check AIX through local commands (the plugin can use SSH).
=cut