Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 20, 2019 2:27 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: FritzBox uPNP template for cacti monitoring
PostPosted: Wed Sep 16, 2015 5:05 am 
Offline

Joined: Wed Sep 16, 2015 4:51 am
Posts: 10
Hi,
anybody out there already did a template for querying a FritzBox with uPNP?

Found a lot of HowTo fragments but no version for the lazy or newbees ... :-?

thanks for any help or any link


Top
 Profile  
 
 Post subject: Re: FritzBox uPNP template for cacti monitoring
PostPosted: Fri Oct 09, 2015 12:37 pm 
Offline

Joined: Wed Sep 16, 2015 4:51 am
Posts: 10
digging and copying other stuff this is my result:
(feedback and corrections welcome!)

Code:
#! /usr/bin/php -q
<?php
$myfb=$argv[1];
$client = new SoapClient(
    null,
    array(
        'location'   => "http://".$myfb.":49000/igdupnp/control/WANCommonIFC1",
        'uri'        => "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1",
        'noroot'     => True
    )
);

$out="";
$result = $client->GetCommonLinkProperties();
$out=$out." NewLayer1UpstreamMaxBitRate:".$result["NewLayer1UpstreamMaxBitRate"];
$out=$out." NewLayer1DownstreamMaxBitRate:".$result["NewLayer1DownstreamMaxBitRate"];

$result = $client->GetAddonInfos();
$out=$out." NewByteSendRate:".$result["NewByteSendRate"];
$out=$out." NewByteReceiveRate:".$result["NewByteReceiveRate"];
$out=$out." NewTotalBytesSent:".$result["NewTotalBytesSent"];
$out=$out." NewTotalBytesReceived:".$result["NewTotalBytesReceived"];

print $out;
?>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group