mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
Refs: #5771
This commit is contained in:
parent
f34ce8b02a
commit
7af42dcae1
@ -52,6 +52,7 @@ sub new {
|
|||||||
"hostname:s" => { name => 'hostname' },
|
"hostname:s" => { name => 'hostname' },
|
||||||
"port:s" => { name => 'port', default => '49000' },
|
"port:s" => { name => 'port', default => '49000' },
|
||||||
"timeout:s" => { name => 'timeout', default => 30 },
|
"timeout:s" => { name => 'timeout', default => 30 },
|
||||||
|
"agent:s" => { name => 'agent', default => 'igdupnp' },
|
||||||
"warning-in:s" => { name => 'warning_in', },
|
"warning-in:s" => { name => 'warning_in', },
|
||||||
"critical-in:s" => { name => 'critical_in', },
|
"critical-in:s" => { name => 'critical_in', },
|
||||||
"warning-out:s" => { name => 'warning_out', },
|
"warning-out:s" => { name => 'warning_out', },
|
||||||
@ -100,7 +101,7 @@ sub run {
|
|||||||
my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
|
my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
|
||||||
|
|
||||||
### GET DATA START
|
### GET DATA START
|
||||||
network::fritzbox::mode::libgetdata::init($self, pfad => '/upnp/control/WANCommonIFC1',
|
network::fritzbox::mode::libgetdata::init($self, pfad => '/' . $self->{option_results}->{agent} . '/control/WANCommonIFC1',
|
||||||
uri => 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1');
|
uri => 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1');
|
||||||
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetAddonInfos');
|
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetAddonInfos');
|
||||||
my $NewTotalBytesSent = network::fritzbox::mode::libgetdata::value($self, path => '//GetAddonInfosResponse/NewTotalBytesSent');
|
my $NewTotalBytesSent = network::fritzbox::mode::libgetdata::value($self, path => '//GetAddonInfosResponse/NewTotalBytesSent');
|
||||||
@ -208,6 +209,10 @@ This Mode needs UPNP.
|
|||||||
|
|
||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
|
=item B<--agent>
|
||||||
|
|
||||||
|
Fritzbox has two different UPNP Agents. upnp or igdupnp. (Default: igdupnp)
|
||||||
|
|
||||||
=item B<--warning-in>
|
=item B<--warning-in>
|
||||||
|
|
||||||
Threshold warning for 'in' traffic.
|
Threshold warning for 'in' traffic.
|
||||||
|
@ -53,6 +53,7 @@ sub new {
|
|||||||
"hostname:s" => { name => 'hostname' },
|
"hostname:s" => { name => 'hostname' },
|
||||||
"port:s" => { name => 'port', default => '49000' },
|
"port:s" => { name => 'port', default => '49000' },
|
||||||
"timeout:s" => { name => 'timeout', default => 30 },
|
"timeout:s" => { name => 'timeout', default => 30 },
|
||||||
|
"agent:s" => { name => 'agent', default => 'igdupnp' },
|
||||||
"warning:s" => { name => 'warning', },
|
"warning:s" => { name => 'warning', },
|
||||||
"critical:s" => { name => 'critical', },
|
"critical:s" => { name => 'critical', },
|
||||||
"seconds" => { name => 'seconds', },
|
"seconds" => { name => 'seconds', },
|
||||||
@ -83,13 +84,13 @@ sub run {
|
|||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
my $exit_code;
|
my $exit_code;
|
||||||
|
|
||||||
network::fritzbox::mode::libgetdata::init($self, pfad => '/upnp/control/WANCommonIFC1',
|
network::fritzbox::mode::libgetdata::init($self, pfad => '/' . $self->{option_results}->{agent} . '/control/WANCommonIFC1',
|
||||||
uri => 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1');
|
uri => 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1');
|
||||||
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetCommonLinkProperties');
|
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetCommonLinkProperties');
|
||||||
my $WANAccessType = network::fritzbox::mode::libgetdata::value($self, path => '//GetCommonLinkPropertiesResponse/NewWANAccessType');
|
my $WANAccessType = network::fritzbox::mode::libgetdata::value($self, path => '//GetCommonLinkPropertiesResponse/NewWANAccessType');
|
||||||
my $LinkStatus = network::fritzbox::mode::libgetdata::value($self, path => '//GetCommonLinkPropertiesResponse/NewPhysicalLinkStatus');
|
my $LinkStatus = network::fritzbox::mode::libgetdata::value($self, path => '//GetCommonLinkPropertiesResponse/NewPhysicalLinkStatus');
|
||||||
|
|
||||||
network::fritzbox::mode::libgetdata::init($self, pfad => '/upnp/control/WANIPConn1',
|
network::fritzbox::mode::libgetdata::init($self, pfad => '/' . $self->{option_results}->{agent} . '/control/WANIPConn1',
|
||||||
uri => 'urn:schemas-upnp-org:service:WANIPConnection:1');
|
uri => 'urn:schemas-upnp-org:service:WANIPConnection:1');
|
||||||
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetStatusInfo');
|
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetStatusInfo');
|
||||||
my $uptime = network::fritzbox::mode::libgetdata::value($self, path => '//GetStatusInfoResponse/NewUptime');
|
my $uptime = network::fritzbox::mode::libgetdata::value($self, path => '//GetStatusInfoResponse/NewUptime');
|
||||||
@ -128,6 +129,10 @@ This Mode needs UPNP.
|
|||||||
|
|
||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
|
=item B<--agent>
|
||||||
|
|
||||||
|
Fritzbox has two different UPNP Agents. upnp or igdupnp. (Default: igdupnp)
|
||||||
|
|
||||||
=item B<--warning>
|
=item B<--warning>
|
||||||
|
|
||||||
Threshold warning in seconds.
|
Threshold warning in seconds.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user