Break change: move netapp directories - can add some new plugins for netapp

This commit is contained in:
garnier-quentin 2020-05-05 14:53:41 +02:00
parent f56986ae54
commit 83305b73e0
63 changed files with 463 additions and 501 deletions

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::custom::restapi;
package storage::netapp::ontap::oncommandapi::custom::api;
use strict;
use warnings;
@ -48,10 +48,10 @@ sub new {
"proto:s@" => { name => 'proto' },
"username:s@" => { name => 'username' },
"password:s@" => { name => 'password' },
"timeout:s@" => { name => 'timeout' },
"timeout:s@" => { name => 'timeout' }
});
}
$options{options}->add_help(package => __PACKAGE__, sections => 'REST API OPTIONS', once => 1);
$options{options}->add_help(package => __PACKAGE__, sections => 'OnCommand API OPTIONS', once => 1);
$self->{output} = $options{output};
$self->{mode} = $options{mode};
@ -202,13 +202,13 @@ __END__
=head1 NAME
NetApp OnCommand REST API
NetApp OnCommand API
=head1 SYNOPSIS
NetApp OnCommand Rest API custom mode
NetApp OnCommand API custom mode
=head1 REST API OPTIONS
=head1 OnCommand API OPTIONS
=over 8

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::aggregateraidstatus;
package storage::netapp::ontap::oncommandapi::mode::aggregateraidstatus;
use base qw(centreon::plugins::templates::counter);
@ -75,15 +75,14 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-node:s" => { name => 'filter_node' },
"filter-cluster:s" => { name => 'filter_cluster' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /normal/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-node:s' => { name => 'filter_node' },
'filter-cluster:s' => { name => 'filter_cluster' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /normal/i' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::aggregatestatus;
package storage::netapp::ontap::oncommandapi::mode::aggregatestatus;
use base qw(centreon::plugins::templates::counter);
@ -74,15 +74,14 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-node:s" => { name => 'filter_node' },
"filter-cluster:s" => { name => 'filter_cluster' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{state} !~ /online/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-node:s' => { name => 'filter_node' },
'filter-cluster:s' => { name => 'filter_cluster' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{state} !~ /online/i' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::aggregateusage;
package storage::netapp::ontap::oncommandapi::mode::aggregateusage;
use base qw(centreon::plugins::templates::counter);
@ -190,13 +190,13 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"filter-node:s" => { name => 'filter_node' },
"filter-cluster:s" => { name => 'filter_cluster' },
"filter-state:s" => { name => 'filter_state' },
"filter-type:s" => { name => 'filter_type' },
"units:s" => { name => 'units', default => '%' },
"free" => { name => 'free' },
'filter-name:s' => { name => 'filter_name' },
'filter-node:s' => { name => 'filter_node' },
'filter-cluster:s' => { name => 'filter_cluster' },
'filter-state:s' => { name => 'filter_state' },
'filter-type:s' => { name => 'filter_type' },
'units:s' => { name => 'units', default => '%' },
'free' => { name => 'free' }
});
return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::clusterio;
package storage::netapp::ontap::oncommandapi::mode::clusterio;
use base qw(centreon::plugins::templates::counter);
@ -66,17 +66,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
return $self;
}
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
return $self;
}
sub manage_selection {

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::clusterstatus;
package storage::netapp::ontap::oncommandapi::mode::clusterstatus;
use base qw(centreon::plugins::templates::counter);
@ -77,13 +77,12 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /ok/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /ok/i' },
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::clusterusage;
package storage::netapp::ontap::oncommandapi::mode::clusterusage;
use base qw(centreon::plugins::templates::counter);
@ -65,19 +65,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
}
sub manage_selection {
my ($self, %options) = @_;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::diskfailed;
package storage::netapp::ontap::oncommandapi::mode::diskfailed;
use base qw(centreon::plugins::templates::counter);
@ -59,11 +59,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-node:s" => { name => 'filter_node' },
"filter-cluster:s" => { name => 'filter_cluster' },
});
$options{options}->add_options(arguments => {
'filter-node:s' => { name => 'filter_node' },
'filter-cluster:s' => { name => 'filter_cluster' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::diskspare;
package storage::netapp::ontap::oncommandapi::mode::diskspare;
use base qw(centreon::plugins::templates::counter);
@ -68,12 +68,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-node:s" => { name => 'filter_node' },
"filter-cluster:s" => { name => 'filter_cluster' },
});
$options{options}->add_options(arguments => {
'filter-node:s' => { name => 'filter_node' },
'filter-cluster:s' => { name => 'filter_cluster' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::fcportstatus;
package storage::netapp::ontap::oncommandapi::mode::fcportstatus;
use base qw(centreon::plugins::templates::counter);
@ -78,14 +78,13 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{status} !~ /online/i || %{state} !~ /online/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /online/i || %{state} !~ /online/i' },
});
return $self;
}

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listaggregates;
package storage::netapp::ontap::oncommandapi::mode::listaggregates;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -30,19 +30,18 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-node:s" => { name => 'filter_node' },
"filter-cluster:s" => { name => 'filter_cluster' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-node:s' => { name => 'filter_node' },
'filter-cluster:s' => { name => 'filter_cluster' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listclusters;
package storage::netapp::ontap::oncommandapi::mode::listclusters;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -30,17 +30,16 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listfcports;
package storage::netapp::ontap::oncommandapi::mode::listfcports;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -29,18 +29,17 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listluns;
package storage::netapp::ontap::oncommandapi::mode::listluns;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -30,17 +30,16 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listnodes;
package storage::netapp::ontap::oncommandapi::mode::listnodes;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -30,17 +30,16 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listsnapmirrors;
package storage::netapp::ontap::oncommandapi::mode::listsnapmirrors;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -30,17 +30,16 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,9 +18,9 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::listvolumes;
package storage::netapp::ontap::oncommandapi::mode::listvolumes;
use base qw(centreon::plugins::templates::counter);
use base qw(centreon::plugins::mode);
use strict;
use warnings;
@ -30,17 +30,16 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->SUPER::init(%options);
}
sub manage_selection {

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::lunalignment;
package storage::netapp::ontap::oncommandapi::mode::lunalignment;
use base qw(centreon::plugins::templates::counter);
@ -95,11 +95,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-volume:s" => { name => 'filter_volume' },
});
$options{options}->add_options(arguments => {
'filter-volume:s' => { name => 'filter_volume' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::lunonline;
package storage::netapp::ontap::oncommandapi::mode::lunonline;
use base qw(centreon::plugins::templates::counter);
@ -77,11 +77,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-volume:s" => { name => 'filter_volume' },
});
$options{options}->add_options(arguments => {
'filter-volume:s' => { name => 'filter_volume' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::lunusage;
package storage::netapp::ontap::oncommandapi::mode::lunusage;
use base qw(centreon::plugins::templates::counter);
@ -119,9 +119,9 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"units:s" => { name => 'units', default => '%' },
"free" => { name => 'free' },
'filter-name:s' => { name => 'filter_name' },
'units:s' => { name => 'units', default => '%' },
'free' => { name => 'free' }
});
return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::nodefailoverstatus;
package storage::netapp::ontap::oncommandapi::mode::nodefailoverstatus;
use base qw(centreon::plugins::templates::counter);
@ -80,14 +80,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-cluster:s" => { name => 'filter_cluster' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{state} !~ /connected/i || %{interconnect} !~ /up/i'},
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-cluster:s' => { name => 'filter_cluster' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{state} !~ /connected/i || %{interconnect} !~ /up/i'}
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::nodehardwarestatus;
package storage::netapp::ontap::oncommandapi::mode::nodehardwarestatus;
use base qw(centreon::plugins::templates::counter);
@ -96,15 +96,14 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-cluster:s" => { name => 'filter_cluster' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{status} =~ /not healthy/i || ' .
'%{temperature} !~ /ok/i || %{battery_status} !~ /battery_ok|battery_fully_charge|battery_over_charged/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-cluster:s' => { name => 'filter_cluster' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{status} =~ /not healthy/i || ' .
'%{temperature} !~ /ok/i || %{battery_status} !~ /battery_ok|battery_fully_charge|battery_over_charged/i' },
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::qtreestatus;
package storage::netapp::ontap::oncommandapi::mode::qtreestatus;
use base qw(centreon::plugins::templates::counter);
@ -77,14 +77,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-volume:s" => { name => 'filter_volume' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-volume:s' => { name => 'filter_volume' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::snapmirrorstatus;
package storage::netapp::ontap::oncommandapi::mode::snapmirrorstatus;
use base qw(centreon::plugins::templates::counter);
@ -72,14 +72,13 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{state} !~ /snapmirrored/i || %{update} =~ /not healthy/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{state} !~ /snapmirrored/i || %{update} =~ /not healthy/i' },
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::snapmirrorusage;
package storage::netapp::ontap::oncommandapi::mode::snapmirrorusage;
use base qw(centreon::plugins::templates::counter);
@ -75,10 +75,9 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::volumeio;
package storage::netapp::ontap::oncommandapi::mode::volumeio;
use base qw(centreon::plugins::templates::counter);
@ -110,14 +110,13 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"filter-state:s" => { name => 'filter_state' },
"filter-style:s" => { name => 'filter_style' },
"filter-type:s" => { name => 'filter_type' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-state:s' => { name => 'filter_state' },
'filter-style:s' => { name => 'filter_style' },
'filter-type:s' => { name => 'filter_type' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::volumestatus;
package storage::netapp::ontap::oncommandapi::mode::volumestatus;
use base qw(centreon::plugins::templates::counter);
@ -73,12 +73,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"filter-name:s" => { name => 'filter_name' },
"warning-status:s" => { name => 'warning_status' },
"critical-status:s" => { name => 'critical_status', default => '%{state} !~ /online/i' },
});
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status' },
'critical-status:s' => { name => 'critical_status', default => '%{state} !~ /online/i' },
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::restapi::mode::volumeusage;
package storage::netapp::ontap::oncommandapi::mode::volumeusage;
use base qw(centreon::plugins::templates::counter);
@ -371,12 +371,12 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"filter-state:s" => { name => 'filter_state' },
"filter-style:s" => { name => 'filter_style' },
"filter-type:s" => { name => 'filter_type' },
"units:s" => { name => 'units', default => '%' },
"free" => { name => 'free' },
'filter-name:s' => { name => 'filter_name' },
'filter-state:s' => { name => 'filter_state' },
'filter-style:s' => { name => 'filter_style' },
'filter-type:s' => { name => 'filter_type' },
'units:s' => { name => 'units', default => '%' },
'free' => { name => 'free' }
});
return $self;

View File

@ -0,0 +1,75 @@
#
# Copyright 2020 Centreon (http://www.centreon.com/)
#
# 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.
#
package storage::netapp::ontap::oncommandapi::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_custom);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'aggregate-raid-status' => 'storage::netapp::ontap::oncommandapi::mode::aggregateraidstatus',
'aggregate-status' => 'storage::netapp::ontap::oncommandapi::mode::aggregatestatus',
'aggregate-usage' => 'storage::netapp::ontap::oncommandapi::mode::aggregateusage',
'cluster-io' => 'storage::netapp::ontap::oncommandapi::mode::clusterio',
'cluster-status' => 'storage::netapp::ontap::oncommandapi::mode::clusterstatus',
'cluster-usage' => 'storage::netapp::ontap::oncommandapi::mode::clusterusage',
'disk-failed' => 'storage::netapp::ontap::oncommandapi::mode::diskfailed',
'disk-spare' => 'storage::netapp::ontap::oncommandapi::mode::diskspare',
'fc-port-status' => 'storage::netapp::ontap::oncommandapi::mode::fcportstatus',
'list-aggregates' => 'storage::netapp::ontap::oncommandapi::mode::listaggregates',
'list-clusters' => 'storage::netapp::ontap::oncommandapi::mode::listclusters',
'list-fc-ports' => 'storage::netapp::ontap::oncommandapi::mode::listfcports',
'list-luns' => 'storage::netapp::ontap::oncommandapi::mode::listluns',
'list-nodes' => 'storage::netapp::ontap::oncommandapi::mode::listnodes',
'list-snapmirrors' => 'storage::netapp::ontap::oncommandapi::mode::listsnapmirrors',
'list-volumes' => 'storage::netapp::ontap::oncommandapi::mode::listvolumes',
'lun-alignment' => 'storage::netapp::ontap::oncommandapi::mode::lunalignment',
'lun-online' => 'storage::netapp::ontap::oncommandapi::mode::lunonline',
'lun-usage' => 'storage::netapp::ontap::oncommandapi::mode::lunusage',
'node-failover-status' => 'storage::netapp::ontap::oncommandapi::mode::nodefailoverstatus',
'node-hardware-status' => 'storage::netapp::ontap::oncommandapi::mode::nodehardwarestatus',
'qtree-status' => 'storage::netapp::ontap::oncommandapi::mode::qtreestatus',
'snapmirror-status' => 'storage::netapp::ontap::oncommandapi::mode::snapmirrorstatus',
'snapmirror-usage' => 'storage::netapp::ontap::oncommandapi::mode::snapmirrorusage',
'volume-io' => 'storage::netapp::ontap::oncommandapi::mode::volumeio',
'volume-status' => 'storage::netapp::ontap::oncommandapi::mode::volumestatus',
'volume-usage' => 'storage::netapp::ontap::oncommandapi::mode::volumeusage'
);
$self->{custom_modes}{api} = 'storage::netapp::ontap::oncommandapi::custom::api';
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check NetApp ONTAP with OnCommand API.
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::aggregatestate;
package storage::netapp::ontap::snmp::mode::aggregatestate;
use base qw(centreon::plugins::templates::counter);
@ -92,8 +92,8 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"threshold-overload:s@" => { name => 'threshold_overload' },
'filter-name:s' => { name => 'filter_name' },
'threshold-overload:s@' => { name => 'threshold_overload' },
});
return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::cacheage;
package storage::netapp::ontap::snmp::mode::cacheage;
use base qw(centreon::plugins::mode);
@ -30,11 +30,11 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
});
$options{options}->add_options(arguments => {
'warning:s' => { name => 'warning' },
'critical:s' => { name => 'critical' }
});
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::communication;
package storage::netapp::ontap::snmp::mode::components::communication;
use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::electronics;
package storage::netapp::ontap::snmp::mode::components::electronics;
use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::fan;
package storage::netapp::ontap::snmp::mode::components::fan;
use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::psu;
package storage::netapp::ontap::snmp::mode::components::psu;
use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::raid;
package storage::netapp::ontap::snmp::mode::components::raid;
use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::temperature;
package storage::netapp::ontap::snmp::mode::components::temperature;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::components::voltage;
package storage::netapp::ontap::snmp::mode::components::voltage;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::cpstatistics;
package storage::netapp::ontap::snmp::mode::cpstatistics;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::cpuload;
package storage::netapp::ontap::snmp::mode::cpuload;
use base qw(centreon::plugins::mode);
@ -30,11 +30,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
});
$options{options}->add_options(arguments => {
'warning:s' => { name => 'warning' },
'critical:s' => { name => 'critical' }
});
return $self;
}
@ -94,4 +93,4 @@ Threshold critical in percent.
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::diskfailed;
package storage::netapp::ontap::snmp::mode::diskfailed;
use base qw(centreon::plugins::mode);
@ -29,10 +29,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -81,4 +80,4 @@ If you are in cluster mode, the following mode doesn't work. Ask to netapp to ad
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::failover;
package storage::netapp::ontap::snmp::mode::failover;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::fan;
package storage::netapp::ontap::snmp::mode::fan;
use base qw(centreon::plugins::mode);
@ -29,10 +29,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -104,4 +103,4 @@ Check if fans are failed (not operating within the recommended RPM range).
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::filesys;
package storage::netapp::ontap::snmp::mode::filesys;
use base qw(centreon::plugins::templates::counter);
@ -186,12 +186,12 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
'units:s' => { name => 'units', default => '%' },
'free' => { name => 'free' },
'filter-name:s' => { name => 'filter_name' },
'filter-type:s' => { name => 'filter_type' },
'filter-vserver:s' => { name => 'filter_vserver' },
'filter-vserver-state:s' => { name => 'filter_vserver_state' },
'units:s' => { name => 'units', default => '%' },
'free' => { name => 'free' },
'filter-name:s' => { name => 'filter_name' },
'filter-type:s' => { name => 'filter_type' },
'filter-vserver:s' => { name => 'filter_vserver' },
'filter-vserver-state:s' => { name => 'filter_vserver_state' },
'unknown-vserver-status:s' => { name => 'unknown_vserver_status', default => '' },
'warning-vserver-status:s' => { name => 'warning_vserver_status', default => '' },
'critical-vserver-status:s' => { name => 'critical_vserver_status', default => '' },

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::globalstatus;
package storage::netapp::ontap::snmp::mode::globalstatus;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::listfilesys;
package storage::netapp::ontap::snmp::mode::listfilesys;
use base qw(centreon::plugins::mode);
@ -31,9 +31,9 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'filter-type:s' => { name => 'filter_type' },
'skip-total-zero' => { name => 'skip_total_zero' },
'filter-name:s' => { name => 'filter_name' },
'filter-type:s' => { name => 'filter_type' },
'skip-total-zero' => { name => 'skip_total_zero' }
});
return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::listsnapvault;
package storage::netapp::ontap::snmp::mode::listsnapvault;
use base qw(centreon::plugins::mode);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::ndmpsessions;
package storage::netapp::ontap::snmp::mode::ndmpsessions;
use base qw(centreon::plugins::mode);
@ -30,11 +30,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
});
$options{options}->add_options(arguments => {
'warning:s' => { name => 'warning' },
'critical:s' => { name => 'critical' }
});
return $self;
}
@ -94,4 +93,4 @@ Threshold critical.
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::nvram;
package storage::netapp::ontap::snmp::mode::nvram;
use base qw(centreon::plugins::mode);
@ -56,10 +56,9 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"threshold-overload:s@" => { name => 'threshold_overload' },
});
$options{options}->add_options(arguments => {
'threshold-overload:s@' => { name => 'threshold_overload' },
});
return $self;
}
@ -172,4 +171,4 @@ Example: --threshold-overload='nvram,CRITICAL,^(?!(ok)$)'
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::partnerstatus;
package storage::netapp::ontap::snmp::mode::partnerstatus;
use base qw(centreon::plugins::mode);
@ -55,10 +55,9 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"threshold-overload:s@" => { name => 'threshold_overload' },
});
$options{options}->add_options(arguments => {
'threshold-overload:s@' => { name => 'threshold_overload' },
});
return $self;
}
@ -196,4 +195,4 @@ Example: --threshold-overload='partner,CRITICAL,^(?!(ok)$)'
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::psu;
package storage::netapp::ontap::snmp::mode::psu;
use base qw(centreon::plugins::mode);
@ -30,9 +30,8 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -51,13 +50,16 @@ sub run {
my $oid_nodeName = '.1.3.6.1.4.1.789.1.25.2.1.1';
my $oid_nodeEnvFailedPowerSupplyCount = '.1.3.6.1.4.1.789.1.25.2.1.21';
my $oid_nodeEnvFailedPowerSupplyMessage = '.1.3.6.1.4.1.789.1.25.2.1.22';
my $results = $self->{snmp}->get_multiple_table(oids => [
{ oid => $oid_envFailedPowerSupplyCount },
{ oid => $oid_envFailedPowerSupplyMessage },
{ oid => $oid_nodeName },
{ oid => $oid_nodeEnvFailedPowerSupplyCount },
{ oid => $oid_nodeEnvFailedPowerSupplyMessage }
], nothing_quit => 1);
my $results = $self->{snmp}->get_multiple_table(
oids => [
{ oid => $oid_envFailedPowerSupplyCount },
{ oid => $oid_envFailedPowerSupplyMessage },
{ oid => $oid_nodeName },
{ oid => $oid_nodeEnvFailedPowerSupplyCount },
{ oid => $oid_nodeEnvFailedPowerSupplyMessage }
],
nothing_quit => 1
);
if (defined($results->{$oid_envFailedPowerSupplyCount}->{$oid_envFailedPowerSupplyCount . '.0'})) {
$self->{output}->output_add(severity => 'OK',
@ -104,4 +106,4 @@ Check if power supplies are failed (in degraded mode).
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::qtreeusage;
package storage::netapp::ontap::snmp::mode::qtreeusage;
use base qw(centreon::plugins::templates::counter);
@ -136,12 +136,12 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"units:s" => { name => 'units', default => '%' },
"free" => { name => 'free' },
"filter-vserver:s" => { name => 'filter_vserver' },
"filter-volume:s" => { name => 'filter_volume' },
"filter-qtree:s" => { name => 'filter_qtree' },
"not-kbytes" => { name => 'not_kbytes' },
'units:s' => { name => 'units', default => '%' },
'free' => { name => 'free' },
'filter-vserver:s' => { name => 'filter_vserver' },
'filter-volume:s' => { name => 'filter_volume' },
'filter-qtree:s' => { name => 'filter_qtree' },
'not-kbytes' => { name => 'not_kbytes' },
});
return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::sharecalls;
package storage::netapp::ontap::snmp::mode::sharecalls;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::shelf;
package storage::netapp::ontap::snmp::mode::shelf;
use base qw(centreon::plugins::templates::hardware);
@ -79,7 +79,7 @@ sub set_system {
],
};
$self->{components_path} = 'storage::netapp::snmp::mode::components';
$self->{components_path} = 'storage::netapp::ontap::snmp::mode::components';
$self->{components_module} = ['communication', 'psu', 'fan', 'temperature', 'voltage', 'electronics', 'raid'];
}
@ -100,9 +100,8 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -162,4 +161,4 @@ Example: --critical='temperature,.*,25' --warning='temperature,.*,35'
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::sis;
package storage::netapp::ontap::snmp::mode::sis;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::snapmirrorlag;
package storage::netapp::ontap::snmp::mode::snapmirrorlag;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::snapshotage;
package storage::netapp::ontap::snmp::mode::snapshotage;
use base qw(centreon::plugins::mode);
@ -38,15 +38,14 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"name:s" => { name => 'name' },
"regexp" => { name => 'use_regexp' },
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
});
$self->{snapshot_id_selected} = [];
$options{options}->add_options(arguments => {
'name:s' => { name => 'name' },
'regexp' => { name => 'use_regexp' },
'warning:s' => { name => 'warning' },
'critical:s' => { name => 'critical' },
});
$self->{snapshot_id_selected} = [];
return $self;
}

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::snapvaultusage;
package storage::netapp::ontap::snmp::mode::snapvaultusage;
use base qw(centreon::plugins::templates::counter);
@ -111,10 +111,10 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"unknown-status:s" => { name => 'unknown_status', default => '' },
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '' },
'filter-name:s' => { name => 'filter_name' },
'unknown-status:s' => { name => 'unknown_status', default => '' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '' },
});
return $self;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::temperature;
package storage::netapp::ontap::snmp::mode::temperature;
use base qw(centreon::plugins::mode);
@ -34,10 +34,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -54,11 +53,14 @@ sub run {
my $oid_envOverTemperature = '.1.3.6.1.4.1.789.1.2.4.1';
my $oid_nodeName = '.1.3.6.1.4.1.789.1.25.2.1.1';
my $oid_nodeEnvOverTemperature = '.1.3.6.1.4.1.789.1.25.2.1.18';
my $results = $self->{snmp}->get_multiple_table(oids => [
{ oid => $oid_envOverTemperature },
{ oid => $oid_nodeName },
{ oid => $oid_nodeEnvOverTemperature },
], nothing_quit => 1);
my $results = $self->{snmp}->get_multiple_table(
oids => [
{ oid => $oid_envOverTemperature },
{ oid => $oid_nodeName },
{ oid => $oid_nodeEnvOverTemperature },
],
nothing_quit => 1
);
if (defined($results->{$oid_envOverTemperature}->{$oid_envOverTemperature . '.0'})) {
$self->{output}->output_add(severity => 'OK',
@ -101,4 +103,4 @@ Check if hardware is currently operating outside of its recommended temperature
=back
=cut

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package storage::netapp::snmp::mode::volumeoptions;
package storage::netapp::ontap::snmp::mode::volumeoptions;
use base qw(centreon::plugins::templates::counter);
@ -28,7 +28,7 @@ use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold)
sub custom_options_threshold {
my ($self, %options) = @_;
my $status = catalog_status_threshold($self, %options);
if (!$self->{output}->is_status(value => $status, compare => 'ok', litteral => 1)) {
$self->{instance_mode}->{global}->{failed}++;
@ -105,14 +105,14 @@ sub new {
bless $self, $class;
$options{options}->add_options(arguments => {
"filter-name:s" => { name => 'filter_name' },
"filter-status:s" => { name => 'filter_status' },
"unknown-status:s" => { name => 'unknown_status', default => '' },
"warning-status:s" => { name => 'warning_status', default => '' },
"critical-status:s" => { name => 'critical_status', default => '' },
"unknown-options:s" => { name => 'unknown_options', default => '' },
"warning-options:s" => { name => 'warning_options', default => '' },
"critical-options:s" => { name => 'critical_options', default => '' },
'filter-name:s' => { name => 'filter_name' },
'filter-status:s' => { name => 'filter_status' },
'unknown-status:s' => { name => 'unknown_status', default => '' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '' },
'unknown-options:s' => { name => 'unknown_options', default => '' },
'warning-options:s' => { name => 'warning_options', default => '' },
'critical-options:s' => { name => 'critical_options', default => '' },
});
return $self;

View File

@ -0,0 +1,72 @@
#
# Copyright 2020 Centreon (http://www.centreon.com/)
#
# 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.
#
package storage::netapp::ontap::snmp::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'aggregatestate' => 'storage::netapp::ontap::snmp::mode::aggregatestate',
'cache-age' => 'storage::netapp::ontap::snmp::mode::cacheage',
'cp-statistics' => 'storage::netapp::ontap::snmp::mode::cpstatistics',
'cpuload' => 'storage::netapp::ontap::snmp::mode::cpuload',
'diskfailed' => 'storage::netapp::ontap::snmp::mode::diskfailed',
'failover' => 'storage::netapp::ontap::snmp::mode::failover',
'fan' => 'storage::netapp::ontap::snmp::mode::fan',
'filesys' => 'storage::netapp::ontap::snmp::mode::filesys',
'list-filesys' => 'storage::netapp::ontap::snmp::mode::listfilesys',
'list-snapvault' => 'storage::netapp::ontap::snmp::mode::listsnapvault',
'global-status' => 'storage::netapp::ontap::snmp::mode::globalstatus',
'ndmpsessions' => 'storage::netapp::ontap::snmp::mode::ndmpsessions',
'nvram' => 'storage::netapp::ontap::snmp::mode::nvram',
'partnerstatus' => 'storage::netapp::ontap::snmp::mode::partnerstatus',
'psu' => 'storage::netapp::ontap::snmp::mode::psu',
'qtree-usage' => 'storage::netapp::ontap::snmp::mode::qtreeusage',
'share-calls' => 'storage::netapp::ontap::snmp::mode::sharecalls',
'shelf' => 'storage::netapp::ontap::snmp::mode::shelf',
'sis' => 'storage::netapp::ontap::snmp::mode::sis',
'snapmirrorlag' => 'storage::netapp::ontap::snmp::mode::snapmirrorlag',
'snapshotage' => 'storage::netapp::ontap::snmp::mode::snapshotage',
'snapvault-usage' => 'storage::netapp::ontap::snmp::mode::snapvaultusage',
'temperature' => 'storage::netapp::ontap::snmp::mode::temperature',
'uptime' => 'snmp_standard::mode::uptime',
'volumeoptions' => 'storage::netapp::ontap::snmp::mode::volumeoptions'
);
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Netapp ONTAP in SNMP.
=cut

View File

@ -1,75 +0,0 @@
#
# Copyright 2020 Centreon (http://www.centreon.com/)
#
# 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.
#
package storage::netapp::restapi::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_custom);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'aggregate-raid-status' => 'storage::netapp::restapi::mode::aggregateraidstatus',
'aggregate-status' => 'storage::netapp::restapi::mode::aggregatestatus',
'aggregate-usage' => 'storage::netapp::restapi::mode::aggregateusage',
'cluster-io' => 'storage::netapp::restapi::mode::clusterio',
'cluster-status' => 'storage::netapp::restapi::mode::clusterstatus',
'cluster-usage' => 'storage::netapp::restapi::mode::clusterusage',
'disk-failed' => 'storage::netapp::restapi::mode::diskfailed',
'disk-spare' => 'storage::netapp::restapi::mode::diskspare',
'fc-port-status' => 'storage::netapp::restapi::mode::fcportstatus',
'list-aggregates' => 'storage::netapp::restapi::mode::listaggregates',
'list-clusters' => 'storage::netapp::restapi::mode::listclusters',
'list-fc-ports' => 'storage::netapp::restapi::mode::listfcports',
'list-luns' => 'storage::netapp::restapi::mode::listluns',
'list-nodes' => 'storage::netapp::restapi::mode::listnodes',
'list-snapmirrors' => 'storage::netapp::restapi::mode::listsnapmirrors',
'list-volumes' => 'storage::netapp::restapi::mode::listvolumes',
'lun-alignment' => 'storage::netapp::restapi::mode::lunalignment',
'lun-online' => 'storage::netapp::restapi::mode::lunonline',
'lun-usage' => 'storage::netapp::restapi::mode::lunusage',
'node-failover-status' => 'storage::netapp::restapi::mode::nodefailoverstatus',
'node-hardware-status' => 'storage::netapp::restapi::mode::nodehardwarestatus',
'qtree-status' => 'storage::netapp::restapi::mode::qtreestatus',
'snapmirror-status' => 'storage::netapp::restapi::mode::snapmirrorstatus',
'snapmirror-usage' => 'storage::netapp::restapi::mode::snapmirrorusage',
'volume-io' => 'storage::netapp::restapi::mode::volumeio',
'volume-status' => 'storage::netapp::restapi::mode::volumestatus',
'volume-usage' => 'storage::netapp::restapi::mode::volumeusage',
);
$self->{custom_modes}{api} = 'storage::netapp::restapi::custom::restapi';
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check NetApp with OnCommand API.
=cut

View File

@ -1,72 +0,0 @@
#
# Copyright 2020 Centreon (http://www.centreon.com/)
#
# 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.
#
package storage::netapp::snmp::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'aggregatestate' => 'storage::netapp::snmp::mode::aggregatestate',
'cache-age' => 'storage::netapp::snmp::mode::cacheage',
'cp-statistics' => 'storage::netapp::snmp::mode::cpstatistics',
'cpuload' => 'storage::netapp::snmp::mode::cpuload',
'diskfailed' => 'storage::netapp::snmp::mode::diskfailed',
'failover' => 'storage::netapp::snmp::mode::failover',
'fan' => 'storage::netapp::snmp::mode::fan',
'filesys' => 'storage::netapp::snmp::mode::filesys',
'list-filesys' => 'storage::netapp::snmp::mode::listfilesys',
'list-snapvault' => 'storage::netapp::snmp::mode::listsnapvault',
'global-status' => 'storage::netapp::snmp::mode::globalstatus',
'ndmpsessions' => 'storage::netapp::snmp::mode::ndmpsessions',
'nvram' => 'storage::netapp::snmp::mode::nvram',
'partnerstatus' => 'storage::netapp::snmp::mode::partnerstatus',
'psu' => 'storage::netapp::snmp::mode::psu',
'qtree-usage' => 'storage::netapp::snmp::mode::qtreeusage',
'share-calls' => 'storage::netapp::snmp::mode::sharecalls',
'shelf' => 'storage::netapp::snmp::mode::shelf',
'sis' => 'storage::netapp::snmp::mode::sis',
'snapmirrorlag' => 'storage::netapp::snmp::mode::snapmirrorlag',
'snapshotage' => 'storage::netapp::snmp::mode::snapshotage',
'snapvault-usage' => 'storage::netapp::snmp::mode::snapvaultusage',
'temperature' => 'storage::netapp::snmp::mode::temperature',
'uptime' => 'snmp_standard::mode::uptime',
'volumeoptions' => 'storage::netapp::snmp::mode::volumeoptions',
);
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Netapp in SNMP (Some Check needs ONTAP 8.x).
=cut