From 93bb206740a95b2ed97b841e99d551b6b151b836 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Mon, 24 Mar 2014 19:04:23 +0100 Subject: [PATCH] Refs #5396 --- .../network/fritzbox/mode/dns1.pm | 115 ------------------ .../network/fritzbox/mode/dns2.pm | 115 ------------------ .../network/fritzbox/mode/externalip.pm | 115 ------------------ .../network/fritzbox/mode/libgetdata.pm | 71 ++++++----- .../network/fritzbox/mode/traffic.pm | 40 +++--- .../network/fritzbox/mode/upstatus.pm | 41 ++----- centreon-plugins/network/fritzbox/plugin.pm | 7 +- 7 files changed, 68 insertions(+), 436 deletions(-) delete mode 100644 centreon-plugins/network/fritzbox/mode/dns1.pm delete mode 100644 centreon-plugins/network/fritzbox/mode/dns2.pm delete mode 100644 centreon-plugins/network/fritzbox/mode/externalip.pm diff --git a/centreon-plugins/network/fritzbox/mode/dns1.pm b/centreon-plugins/network/fritzbox/mode/dns1.pm deleted file mode 100644 index 1d4e3266c..000000000 --- a/centreon-plugins/network/fritzbox/mode/dns1.pm +++ /dev/null @@ -1,115 +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 timeelapsedutable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting timeelapsedutable 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 : Florian Asche -# -#################################################################################### - -package network::fritzbox::mode::dns1; - -use base qw(centreon::plugins::mode); - -use strict; -use warnings; -use network::fritzbox::mode::libgetdata; - -sub new { - my ($class, %options) = @_; - my $self = $class->SUPER::new(package => __PACKAGE__, %options); - bless $self, $class; - - $self->{version} = '1.0'; - $options{options}->add_options(arguments => - { - "hostname:s" => { name => 'hostname' }, - "port:s" => { name => 'port', default => 49000 }, - "timeout:s" => { name => 'timeout', default => 30 }, - }); - return $self; -} - -sub check_options { - - my ($self, %options) = @_; - $self->SUPER::init(%options); - - if (!defined($self->{option_results}->{hostname})) { - $self->{output}->add_option_msg(short_msg => "Need to specify an Hostname."); - $self->{output}->option_exit(); - } -} - -sub run { - my ($self, %options) = @_; - my $exit_code; - - $self->{pfad} = '/upnp/control/WANCommonIFC1'; - $self->{uri} = 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'; - $self->{space} = 'GetAddonInfos'; - $self->{section} = 'NewDNSServer1'; - my $IP = network::fritzbox::mode::libgetdata::getdata($self); - #print $IP . "\n"; - - if ($IP =~ /^((([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])[.]){3}([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$/) { - $exit_code = 'ok'; - } else { - $exit_code = 'critical'; - } - - $self->{output}->output_add(severity => $exit_code, - short_msg => sprintf("Your current DNS-Server is " . $IP)); - - $self->{output}->display(); - $self->{output}->exit(); -} - -1; - -__END__ - -=head1 MODE - -This Mode provides your current first DNS Address. -This Mode needs UPNP. - -=over 8 - -=item B<--hostname> - -Hostname to query. - -=item B<--timeout> - -Timeout in seconds for the command (Default: 30). - -=back - -=cut diff --git a/centreon-plugins/network/fritzbox/mode/dns2.pm b/centreon-plugins/network/fritzbox/mode/dns2.pm deleted file mode 100644 index 32c3a50b6..000000000 --- a/centreon-plugins/network/fritzbox/mode/dns2.pm +++ /dev/null @@ -1,115 +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 timeelapsedutable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting timeelapsedutable 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 : Florian Asche -# -#################################################################################### - -package network::fritzbox::mode::dns2; - -use base qw(centreon::plugins::mode); - -use strict; -use warnings; -use network::fritzbox::mode::libgetdata; - -sub new { - my ($class, %options) = @_; - my $self = $class->SUPER::new(package => __PACKAGE__, %options); - bless $self, $class; - - $self->{version} = '1.0'; - $options{options}->add_options(arguments => - { - "hostname:s" => { name => 'hostname' }, - "port:s" => { name => 'port', default => 49000 }, - "timeout:s" => { name => 'timeout', default => 30 }, - }); - return $self; -} - -sub check_options { - - my ($self, %options) = @_; - $self->SUPER::init(%options); - - if (!defined($self->{option_results}->{hostname})) { - $self->{output}->add_option_msg(short_msg => "Need to specify an Hostname."); - $self->{output}->option_exit(); - } -} - -sub run { - my ($self, %options) = @_; - my $exit_code; - - $self->{pfad} = '/upnp/control/WANCommonIFC1'; - $self->{uri} = 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'; - $self->{space} = 'GetAddonInfos'; - $self->{section} = 'NewDNSServer2'; - my $IP = network::fritzbox::mode::libgetdata::getdata($self); - #print $IP . "\n"; - - if ($IP =~ /^((([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])[.]){3}([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$/) { - $exit_code = 'ok'; - } else { - $exit_code = 'critical'; - } - - $self->{output}->output_add(severity => $exit_code, - short_msg => sprintf("Your current DNS-Server is " . $IP)); - - $self->{output}->display(); - $self->{output}->exit(); -} - -1; - -__END__ - -=head1 MODE - -This Mode provides your current second DNS Address. -This Mode needs UPNP. - -=over 8 - -=item B<--hostname> - -Hostname to query. - -=item B<--timeout> - -Timeout in seconds for the command (Default: 30). - -=back - -=cut diff --git a/centreon-plugins/network/fritzbox/mode/externalip.pm b/centreon-plugins/network/fritzbox/mode/externalip.pm deleted file mode 100644 index 6b274048b..000000000 --- a/centreon-plugins/network/fritzbox/mode/externalip.pm +++ /dev/null @@ -1,115 +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 timeelapsedutable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting timeelapsedutable 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 : Florian Asche -# -#################################################################################### - -package network::fritzbox::mode::externalip; - -use base qw(centreon::plugins::mode); - -use strict; -use warnings; -use network::fritzbox::mode::libgetdata; - -sub new { - my ($class, %options) = @_; - my $self = $class->SUPER::new(package => __PACKAGE__, %options); - bless $self, $class; - - $self->{version} = '1.0'; - $options{options}->add_options(arguments => - { - "hostname:s" => { name => 'hostname' }, - "port:s" => { name => 'port', default => 49000 }, - "timeout:s" => { name => 'timeout', default => 30 }, - }); - return $self; -} - -sub check_options { - - my ($self, %options) = @_; - $self->SUPER::init(%options); - - if (!defined($self->{option_results}->{hostname})) { - $self->{output}->add_option_msg(short_msg => "Need to specify an Hostname."); - $self->{output}->option_exit(); - } -} - -sub run { - my ($self, %options) = @_; - my $exit_code; - - $self->{pfad} = '/upnp/control/WANIPConn1'; - $self->{uri} = 'urn:schemas-upnp-org:service:WANIPConnection:1'; - $self->{space} = 'GetExternalIPAddress'; - $self->{section} = 'NewExternalIPAddress'; - my $IP = network::fritzbox::mode::libgetdata::getdata($self); - #print $IP . "\n"; - - if ($IP =~ /^((([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])[.]){3}([0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$/) { - $exit_code = 'ok'; - } else { - $exit_code = 'critical'; - } - - $self->{output}->output_add(severity => $exit_code, - short_msg => sprintf("Your current IP-Address is " . $IP)); - - $self->{output}->display(); - $self->{output}->exit(); -} - -1; - -__END__ - -=head1 MODE - -This Mode provides your current WAN IPv4 Address. -This Mode needs UPNP. - -=over 8 - -=item B<--hostname> - -Hostname to query. - -=item B<--timeout> - -Timeout in seconds for the command (Default: 30). - -=back - -=cut diff --git a/centreon-plugins/network/fritzbox/mode/libgetdata.pm b/centreon-plugins/network/fritzbox/mode/libgetdata.pm index 1b6a29fac..df7f5de3a 100644 --- a/centreon-plugins/network/fritzbox/mode/libgetdata.pm +++ b/centreon-plugins/network/fritzbox/mode/libgetdata.pm @@ -39,44 +39,53 @@ use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; -sub getdata { +my $soap; +my $response; + +sub init { my ($self, %options) = @_; - my ($soap,$som,$body); - - $self->{url} = 'http://' . $self->{option_results}->{hostname} . ':' . $self->{option_results}->{port} . $self->{pfad}; + + my $proxy = 'http://' . $self->{option_results}->{hostname} . ':' . $self->{option_results}->{port} . $options{pfad}; $soap = SOAP::Lite->new( - proxy => $self->{url}, - uri => $self->{uri}, - timeout => $self->{option_results}->{timeout} + proxy => $proxy, + uri => $options{uri}, + timeout => $self->{option_results}->{timeout} ); + $soap->on_fault( + sub { # SOAP fault handler + my $soap = shift; + my $res = shift; - my $space = $self->{space}; - my $section = $self->{section}; + if(ref($res)) { + chomp( my $err = $res->faultstring ); + $self->{output}->output_add(severity => 'UNKNOWN', + short_msg => "SOAP Fault: $err"); + } else { + chomp( my $err = $soap->transport->status ); + $self->{output}->output_add(severity => 'UNKNOWN', + short_msg => "Transport error: $err"); + } + + $self->{output}->display(); + $self->{output}->exit(); + } + ); +} - #Check SOAP Session Setup - if (! defined($soap)) { - $self->{output}->output_add(severity => 'CRITICAL', - short_msg => 'NO DATA FOUND'); - $self->{output}->display(); - $self->{output}->exit(); - } +sub call { + my ($self, %options) = @_; + + my $method = $options{soap_method}; + $response = $soap->$method(); +} - # SOAP Call - $som = $soap->$space(); - - # Check Response - if (! exists($som->body->{$space."Response"})) { - $self->{output}->output_add(severity => 'CRITICAL', - short_msg => 'NO DATA FOUND'); - $self->{output}->display(); - $self->{output}->exit(); - } - - $body = $som->body->{$space."Response"}; - return $body->{$section}; -}; +sub value { + my ($self, %options) = @_; + my $value = $response->valueof($options{path}); + + return $value; +} 1; \ No newline at end of file diff --git a/centreon-plugins/network/fritzbox/mode/traffic.pm b/centreon-plugins/network/fritzbox/mode/traffic.pm index ec89d6ec2..682ddad87 100644 --- a/centreon-plugins/network/fritzbox/mode/traffic.pm +++ b/centreon-plugins/network/fritzbox/mode/traffic.pm @@ -38,7 +38,6 @@ package network::fritzbox::mode::traffic; use base qw(centreon::plugins::mode); use strict; use warnings; -use centreon::plugins::misc; use centreon::plugins::statefile; use network::fritzbox::mode::libgetdata; @@ -57,7 +56,7 @@ sub new { "critical-in:s" => { name => 'critical_in', }, "warning-out:s" => { name => 'warning_out', }, "critical-out:s" => { name => 'critical_out', }, - "units:s" => { name => 'units', default => 'B' }, + "units:s" => { name => 'units', default => '%' }, }); $self->{statefile_value} = centreon::plugins::statefile->new(%options); return $self; @@ -101,28 +100,15 @@ sub run { my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp'); ### GET DATA START - $self->{pfad} = '/upnp/control/WANCommonIFC1'; - $self->{uri} = 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'; + network::fritzbox::mode::libgetdata::init($self, pfad => '/upnp/control/WANCommonIFC1', + uri => 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'); + network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetAddonInfos'); + my $NewTotalBytesSent = network::fritzbox::mode::libgetdata::value($self, path => '/GetAddonInfosResponse/NewTotalBytesSent'); + my $NewTotalBytesReceived = network::fritzbox::mode::libgetdata::value($self, path => '/GetAddonInfosResponse/NewTotalBytesReceived'); - $self->{space} = 'GetAddonInfos'; - $self->{section} = 'NewTotalBytesSent'; - my $NewTotalBytesSent = network::fritzbox::mode::libgetdata::getdata($self); - #print $NewTotalBytesSent . "\n"; - - $self->{space} = 'GetAddonInfos'; - $self->{section} = 'NewTotalBytesReceived'; - my $NewTotalBytesReceived = network::fritzbox::mode::libgetdata::getdata($self); - #print $NewTotalBytesReceived . "\n"; - - $self->{space} = 'GetCommonLinkProperties'; - $self->{section} = 'NewLayer1UpstreamMaxBitRate'; - my $NewLayer1UpstreamMaxBitRate = network::fritzbox::mode::libgetdata::getdata($self); - #print $NewLayer1UpstreamMaxBitRate . "\n"; - - $self->{space} = 'GetCommonLinkProperties'; - $self->{section} = 'NewLayer1DownstreamMaxBitRate'; - my $NewLayer1DownstreamMaxBitRate = network::fritzbox::mode::libgetdata::getdata($self); - #print $NewLayer1DownstreamMaxBitRate . "\n"; + network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetCommonLinkProperties'); + my $NewLayer1UpstreamMaxBitRate = network::fritzbox::mode::libgetdata::value($self, path => '/GetCommonLinkPropertiesResponse/NewLayer1UpstreamMaxBitRate'); + my $NewLayer1DownstreamMaxBitRate = network::fritzbox::mode::libgetdata::value($self, path => '/GetCommonLinkPropertiesResponse/NewLayer1DownstreamMaxBitRate'); ### GET DATA END # DID U KNOW? @@ -171,6 +157,10 @@ sub run { my $exit1 = $self->{perfdata}->threshold_check(value => $in_prct, threshold => [ { label => 'critical-in', 'exit_litteral' => 'critical' }, { label => 'warning-in', exit_litteral => 'warning' } ]); my $exit2 = $self->{perfdata}->threshold_check(value => $out_prct, threshold => [ { label => 'critical-out', 'exit_litteral' => 'critical' }, { label => 'warning-out', exit_litteral => 'warning' } ]); $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2 ]); + } else { + my $exit1 = $self->{perfdata}->threshold_check(value => $in_absolute_per_sec, threshold => [ { label => 'critical-in', 'exit_litteral' => 'critical' }, { label => 'warning-in', exit_litteral => 'warning' } ]); + my $exit2 = $self->{perfdata}->threshold_check(value => $out_absolute_per_sec, threshold => [ { label => 'critical-out', 'exit_litteral' => 'critical' }, { label => 'warning-out', exit_litteral => 'warning' } ]); + $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2 ]); } $in_prct = sprintf("%.2f", $in_prct); $out_prct = sprintf("%.2f", $out_prct); @@ -189,13 +179,13 @@ sub run { } $self->{output}->perfdata_add(label => 'traffic_in', - unit => 'b/s', + unit => 'B/s', value => sprintf("%.2f", $in_absolute_per_sec), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-in', total => $NewLayer1DownstreamMaxBitRate), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-in', total => $NewLayer1DownstreamMaxBitRate), min => 0, max => $NewLayer1DownstreamMaxBitRate); $self->{output}->perfdata_add(label => 'traffic_out', - unit => 'b/s', + unit => 'B/s', value => sprintf("%.2f", $out_absolute_per_sec), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-out', total => $NewLayer1UpstreamMaxBitRate), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-out', total => $NewLayer1UpstreamMaxBitRate), diff --git a/centreon-plugins/network/fritzbox/mode/upstatus.pm b/centreon-plugins/network/fritzbox/mode/upstatus.pm index 1c600cd37..b917284bf 100644 --- a/centreon-plugins/network/fritzbox/mode/upstatus.pm +++ b/centreon-plugins/network/fritzbox/mode/upstatus.pm @@ -82,43 +82,24 @@ sub check_options { sub run { my ($self, %options) = @_; my $exit_code; - - $self->{pfad} = '/upnp/control/WANCommonIFC1'; - $self->{uri} = 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'; - $self->{space} = 'GetCommonLinkProperties'; - $self->{section} = 'NewWANAccessType'; - my $WANAccessType = network::fritzbox::mode::libgetdata::getdata($self); - #print "Type: " . $WANAccessType . "\n"; + network::fritzbox::mode::libgetdata::init($self, pfad => '/upnp/control/WANCommonIFC1', + uri => 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'); + network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetCommonLinkProperties'); + my $WANAccessType = network::fritzbox::mode::libgetdata::value($self, path => '/GetCommonLinkPropertiesResponse/NewWANAccessType'); + my $LinkStatus = network::fritzbox::mode::libgetdata::value($self, path => '/GetCommonLinkPropertiesResponse/NewPhysicalLinkStatus'); - $self->{space} = 'GetCommonLinkProperties'; - $self->{section} = 'NewPhysicalLinkStatus'; - my $LinkStatus = network::fritzbox::mode::libgetdata::getdata($self); - #print "Physical Link is: " . $LinkStatus . "\n"; - - $self->{pfad} = '/upnp/control/WANIPConn1'; - $self->{uri} = 'urn:schemas-upnp-org:service:WANIPConnection:1'; - - $self->{space} = 'GetStatusInfo'; - $self->{section} = 'NewUptime'; - my $uptime = network::fritzbox::mode::libgetdata::getdata($self); - #print "Internet is Connected since: " . $uptime . " seconds\n"; - #print "Internet is Connected since: " . floor($uptime / 60 / 60 / 24) . " days\n"; - - $self->{space} = 'GetStatusInfo'; - $self->{section} = 'NewConnectionStatus'; - my $ConnectionStatus = network::fritzbox::mode::libgetdata::getdata($self); - #print "Internet is: " . $ConnectionStatus . "\n"; + network::fritzbox::mode::libgetdata::init($self, pfad => '/upnp/control/WANIPConn1', + uri => 'urn:schemas-upnp-org:service:WANIPConnection:1'); + network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetStatusInfo'); + my $uptime = network::fritzbox::mode::libgetdata::value($self, path => '/GetStatusInfoResponse/NewUptime'); + my $ConnectionStatus = network::fritzbox::mode::libgetdata::value($self, path => '/GetStatusInfoResponse/NewConnectionStatus'); $exit_code = $self->{perfdata}->threshold_check(value => floor($uptime), threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); - if ($LinkStatus !~ /^up$/i) { - $exit_code = 'critical'; - } - - if ($ConnectionStatus !~ /^connected$/i) { + if ($LinkStatus !~ /^up$/i || $ConnectionStatus !~ /^connected$/i) { $exit_code = 'critical'; } diff --git a/centreon-plugins/network/fritzbox/plugin.pm b/centreon-plugins/network/fritzbox/plugin.pm index c9853b356..2d231f009 100644 --- a/centreon-plugins/network/fritzbox/plugin.pm +++ b/centreon-plugins/network/fritzbox/plugin.pm @@ -89,11 +89,8 @@ sub new { $self->{version} = '0.1'; %{$self->{modes}} = ( - 'upstatus' => 'network::fritzbox::mode::upstatus', - 'traffic' => 'network::fritzbox::mode::traffic', - 'externalip' => 'network::fritzbox::mode::externalip', - 'dns1' => 'network::fritzbox::mode::dns1', - 'dns2' => 'network::fritzbox::mode::dns2', + 'upstatus' => 'network::fritzbox::mode::upstatus', + 'traffic' => 'network::fritzbox::mode::traffic', ); return $self; }