From 0a7064d46c5c9de7c10440301002a7899eeb5716 Mon Sep 17 00:00:00 2001 From: arnaud-michel Date: Thu, 30 Nov 2017 17:54:10 +0100 Subject: [PATCH 1/5] init arista --- network/arista/plugin.pm | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 network/arista/plugin.pm diff --git a/network/arista/plugin.pm b/network/arista/plugin.pm new file mode 100644 index 000000000..78fea541a --- /dev/null +++ b/network/arista/plugin.pm @@ -0,0 +1,61 @@ +################################################################################ +# Copyright 2005-2013 MERETHIS +# Centreon is developped by : Julien Mathis and Romain Le Merlus under +# GPL Licence 2.0. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation ; either version 2 of the License. +# +# This program is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, see . +# +# Linking this program statically or dynamically with other modules is making a +# combined work based on this program. Thus, the terms and conditions of the GNU +# General Public License cover the whole combination. +# +# As a special exception, the copyright holders of this program give MERETHIS +# permission to link this program with independent modules to produce an executable, +# regardless of the license terms of these independent modules, and to copy and +# distribute the resulting executable under terms of MERETHIS choice, provided that +# MERETHIS also meet, for each linked independent module, the terms and conditions +# of the license of that module. An independent module is a module which is not +# derived from this program. If you modify this program, you may extend this +# exception to your version of the program, but you are not obliged to do so. If you +# do not wish to do so, delete this exception statement from your version. +# +# For more information : contact@centreon.com +# Authors : Quentin Garnier +# +#################################################################################### + +package network::arista::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; + # $options->{options} = options object + + $self->{version} = '1.0'; + %{$self->{modes}} = ( + 'list-interfaces' => 'snmp_standard::mode::listinterfaces', + 'packet-errors' => 'snmp_standard::mode::packeterrors', + 'traffic' => 'snmp_standard::mode::traffic', + 'uptime' => 'snmp_standard::mode::uptime', + 'vrrp' => 'snmp_standard::mode::vrrp', + ); + + return $self; +} + +1; + From 9f8bd96a735089e4ed5057e34e610033bab72539 Mon Sep 17 00:00:00 2001 From: arnaud-michel Date: Wed, 6 Dec 2017 15:11:10 +0100 Subject: [PATCH 2/5] move --- network/arista/standard/snmp/plugin.pm | 67 ++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 network/arista/standard/snmp/plugin.pm diff --git a/network/arista/standard/snmp/plugin.pm b/network/arista/standard/snmp/plugin.pm new file mode 100644 index 000000000..8e63cb13b --- /dev/null +++ b/network/arista/standard/snmp/plugin.pm @@ -0,0 +1,67 @@ +################################################################################ +# Copyright 2005-2013 MERETHIS +# Centreon is developped by : Julien Mathis and Romain Le Merlus under +# GPL Licence 2.0. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation ; either version 2 of the License. +# +# This program is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, see . +# +# Linking this program statically or dynamically with other modules is making a +# combined work based on this program. Thus, the terms and conditions of the GNU +# General Public License cover the whole combination. +# +# As a special exception, the copyright holders of this program give MERETHIS +# permission to link this program with independent modules to produce an executable, +# regardless of the license terms of these independent modules, and to copy and +# distribute the resulting executable under terms of MERETHIS choice, provided that +# MERETHIS also meet, for each linked independent module, the terms and conditions +# of the license of that module. An independent module is a module which is not +# derived from this program. If you modify this program, you may extend this +# exception to your version of the program, but you are not obliged to do so. If you +# do not wish to do so, delete this exception statement from your version. +# +# For more information : contact@centreon.com +# Authors : Quentin Garnier +# +#################################################################################### + +package network::arista::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; + # $options->{options} = options object + + $self->{version} = '1.0'; + %{$self->{modes}} = ( + 'cpu' => 'snmp_standard::mode::cpu', + 'entity' => 'snmp_standard::mode::entity', + 'hardwaredevice' => 'snmp_standard::mode::hardwaredevice', + 'interfaces' => 'snmp_standard::mode::interfaces', + 'list-interfaces' => 'snmp_standard::mode::listinterfaces', + 'ntp' => 'snmp_standard::mode::ntp', + 'numericvalue' => 'snmp_standard::mode::numericvalue', + 'stringvalue' => 'snmp_standard::mode::stringvalue', + 'tcpcon' => 'snmp_standard::mode::tcpcon', + 'uptime' => 'snmp_standard::mode::uptime', + 'vrrp' => 'snmp_standard::mode::vrrp', + ); + + return $self; +} + +1; + From ff2326378b17dff38b7dce8f26403ad129735932 Mon Sep 17 00:00:00 2001 From: arnaud-michel Date: Wed, 6 Dec 2017 15:11:35 +0100 Subject: [PATCH 3/5] delete --- network/arista/plugin.pm | 61 ---------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 network/arista/plugin.pm diff --git a/network/arista/plugin.pm b/network/arista/plugin.pm deleted file mode 100644 index 78fea541a..000000000 --- a/network/arista/plugin.pm +++ /dev/null @@ -1,61 +0,0 @@ -################################################################################ -# Copyright 2005-2013 MERETHIS -# Centreon is developped by : Julien Mathis and Romain Le Merlus under -# GPL Licence 2.0. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation ; either version 2 of the License. -# -# This program is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, see . -# -# Linking this program statically or dynamically with other modules is making a -# combined work based on this program. Thus, the terms and conditions of the GNU -# General Public License cover the whole combination. -# -# As a special exception, the copyright holders of this program give MERETHIS -# permission to link this program with independent modules to produce an executable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting executable under terms of MERETHIS choice, provided that -# MERETHIS also meet, for each linked independent module, the terms and conditions -# of the license of that module. An independent module is a module which is not -# derived from this program. If you modify this program, you may extend this -# exception to your version of the program, but you are not obliged to do so. If you -# do not wish to do so, delete this exception statement from your version. -# -# For more information : contact@centreon.com -# Authors : Quentin Garnier -# -#################################################################################### - -package network::arista::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; - # $options->{options} = options object - - $self->{version} = '1.0'; - %{$self->{modes}} = ( - 'list-interfaces' => 'snmp_standard::mode::listinterfaces', - 'packet-errors' => 'snmp_standard::mode::packeterrors', - 'traffic' => 'snmp_standard::mode::traffic', - 'uptime' => 'snmp_standard::mode::uptime', - 'vrrp' => 'snmp_standard::mode::vrrp', - ); - - return $self; -} - -1; - From 4540d1c97d0993d5add915e84acb9a78d269e35e Mon Sep 17 00:00:00 2001 From: arnaud-michel Date: Wed, 6 Dec 2017 15:16:10 +0100 Subject: [PATCH 4/5] path --- network/arista/standard/snmp/plugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/arista/standard/snmp/plugin.pm b/network/arista/standard/snmp/plugin.pm index 8e63cb13b..bb88cefe0 100644 --- a/network/arista/standard/snmp/plugin.pm +++ b/network/arista/standard/snmp/plugin.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::arista::plugin; +package network::arista::standard::snmp::plugin; use strict; use warnings; From 0e9701fa4bea1370230a8f1ec0133d4739240cfe Mon Sep 17 00:00:00 2001 From: arnaud-michel Date: Wed, 6 Dec 2017 18:22:45 +0100 Subject: [PATCH 5/5] header --- network/arista/standard/snmp/plugin.pm | 43 ++++++++------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/network/arista/standard/snmp/plugin.pm b/network/arista/standard/snmp/plugin.pm index bb88cefe0..332f0131c 100644 --- a/network/arista/standard/snmp/plugin.pm +++ b/network/arista/standard/snmp/plugin.pm @@ -1,37 +1,22 @@ -################################################################################ -# Copyright 2005-2013 MERETHIS -# Centreon is developped by : Julien Mathis and Romain Le Merlus under -# GPL Licence 2.0. # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation ; either version 2 of the License. +# Copyright 2017 Centreon (http://www.centreon.com/) # -# This program is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Centreon is a full-fledged industry-strength solution that meets +# the needs in IT infrastructure and application monitoring for +# service performance. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, see . +# 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 # -# Linking this program statically or dynamically with other modules is making a -# combined work based on this program. Thus, the terms and conditions of the GNU -# General Public License cover the whole combination. +# http://www.apache.org/licenses/LICENSE-2.0 # -# As a special exception, the copyright holders of this program give MERETHIS -# permission to link this program with independent modules to produce an executable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting executable under terms of MERETHIS choice, provided that -# MERETHIS also meet, for each linked independent module, the terms and conditions -# of the license of that module. An independent module is a module which is not -# derived from this program. If you modify this program, you may extend this -# exception to your version of the program, but you are not obliged to do so. If you -# do not wish to do so, delete this exception statement from your version. +# 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. # -# For more information : contact@centreon.com -# Authors : Quentin Garnier -# -#################################################################################### package network::arista::standard::snmp::plugin; @@ -53,8 +38,6 @@ sub new { 'interfaces' => 'snmp_standard::mode::interfaces', 'list-interfaces' => 'snmp_standard::mode::listinterfaces', 'ntp' => 'snmp_standard::mode::ntp', - 'numericvalue' => 'snmp_standard::mode::numericvalue', - 'stringvalue' => 'snmp_standard::mode::stringvalue', 'tcpcon' => 'snmp_standard::mode::tcpcon', 'uptime' => 'snmp_standard::mode::uptime', 'vrrp' => 'snmp_standard::mode::vrrp',