Refs: #5771
This commit is contained in:
parent
707487b5db
commit
064ec952c7
|
@ -52,6 +52,7 @@ sub new {
|
|||
"hostname:s" => { name => 'hostname' },
|
||||
"port:s" => { name => 'port', default => '49000' },
|
||||
"timeout:s" => { name => 'timeout', default => 30 },
|
||||
"agent:s" => { name => 'agent', default => 'igdupnp' },
|
||||
"warning-in:s" => { name => 'warning_in', },
|
||||
"critical-in:s" => { name => 'critical_in', },
|
||||
"warning-out:s" => { name => 'warning_out', },
|
||||
|
@ -100,7 +101,7 @@ sub run {
|
|||
my $old_timestamp = $self->{statefile_value}->get(name => 'last_timestamp');
|
||||
|
||||
### 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');
|
||||
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetAddonInfos');
|
||||
my $NewTotalBytesSent = network::fritzbox::mode::libgetdata::value($self, path => '//GetAddonInfosResponse/NewTotalBytesSent');
|
||||
|
@ -208,6 +209,10 @@ This Mode needs UPNP.
|
|||
|
||||
=over 8
|
||||
|
||||
=item B<--agent>
|
||||
|
||||
Fritzbox has two different UPNP Agents. upnp or igdupnp. (Default: igdupnp)
|
||||
|
||||
=item B<--warning-in>
|
||||
|
||||
Threshold warning for 'in' traffic.
|
||||
|
|
|
@ -53,6 +53,7 @@ sub new {
|
|||
"hostname:s" => { name => 'hostname' },
|
||||
"port:s" => { name => 'port', default => '49000' },
|
||||
"timeout:s" => { name => 'timeout', default => 30 },
|
||||
"agent:s" => { name => 'agent', default => 'igdupnp' },
|
||||
"warning:s" => { name => 'warning', },
|
||||
"critical:s" => { name => 'critical', },
|
||||
"seconds" => { name => 'seconds', },
|
||||
|
@ -83,13 +84,13 @@ sub run {
|
|||
my ($self, %options) = @_;
|
||||
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');
|
||||
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');
|
||||
|
||||
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');
|
||||
network::fritzbox::mode::libgetdata::call($self, soap_method => 'GetStatusInfo');
|
||||
my $uptime = network::fritzbox::mode::libgetdata::value($self, path => '//GetStatusInfoResponse/NewUptime');
|
||||
|
@ -128,6 +129,10 @@ This Mode needs UPNP.
|
|||
|
||||
=over 8
|
||||
|
||||
=item B<--agent>
|
||||
|
||||
Fritzbox has two different UPNP Agents. upnp or igdupnp. (Default: igdupnp)
|
||||
|
||||
=item B<--warning>
|
||||
|
||||
Threshold warning in seconds.
|
||||
|
|
Loading…
Reference in New Issue