Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Dec 15, 2017 8:41 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Fritzbox Monitoring Template
PostPosted: Tue May 30, 2017 2:23 pm 
Offline

Joined: Mon Jun 15, 2009 12:55 pm
Posts: 40
/usr/bin/python <path_cacti>/scripts/fritzbox.py <ip> <password> error

"<ip>" and "<password>" are inputvariables from Cacti

Data Input Method has to be look like this:


Attachments:
File comment: Screenshot
Unbenannt.png
Unbenannt.png [ 17.36 KiB | Viewed 483 times ]
Top
 Profile  
 
 Post subject: Re: Fritzbox Monitoring Template
PostPosted: Wed May 31, 2017 4:26 am 
Offline

Joined: Wed Nov 09, 2016 5:31 am
Posts: 4
There is no output for error from fritzbox.py. The other scripts are configured properly and are working, but my fritzbox.py hast no output for error just traffic and dslinfo..

Are you using another fritzbox.py? https://pastebin.com/ncU62Hgn <<< this is my version from the last post..
Code:
...


def run():

    arguments = sys.argv
    arguments.pop(0)
    ip, password, arg = arguments

    fc = Information(ip, password)

    if arg == "api_description":
        ret = fc.services
    elif arg == "dslinfo":
        ret = fc.dsl_information
    elif arg == "traffic":
        ret = fc.wan_information
    elif arg == 'ext_ip_address':
        ret = fc.ext_ip_address
    else:
        ret = "unknown Argument"

    return ret

....


Top
 Profile  
 
 Post subject: Re: Fritzbox Monitoring Template
PostPosted: Wed May 31, 2017 2:42 pm 
Offline

Joined: Mon Jun 15, 2009 12:55 pm
Posts: 40
you are right,

i missed to update the Script in Template Archiv.

Here the fixed one:


Attachments:
File comment: fixed Fritzbox Template
fritzbox_template.zip [18.38 KiB]
Downloaded 58 times
Top
 Profile  
 
 Post subject: Re: Fritzbox Monitoring Template
PostPosted: Wed May 31, 2017 3:12 pm 
Offline

Joined: Wed Nov 09, 2016 5:31 am
Posts: 4
Thank you very much :)


Top
 Profile  
 
 Post subject: Re: Fritzbox Monitoring Template
PostPosted: Fri Sep 08, 2017 12:22 pm 
Offline

Joined: Fri Sep 08, 2017 12:13 pm
Posts: 2
I have the same issue with NaN values only for TotalBytesReceived
all other graphs are OK, also a graph on packages, which I created.
everything looks good configured.
output of the script is ok:
NewTotalBytesSent:44178324 NewTotalBytesReceived:20996041 NewTotalPacketsSent:240725 NewTotalPacketsReceived:82615

the problem is somewhere in the data-source, when I look in the rrd, I see this (look at the bold lines):
( rrdtool dump 01-fritzbox_totalpacketsreceive_1557.rrd )
<rrd>
<version>0003</version>
<step>300</step> <!-- Seconds -->
<lastupdate>1504890922</lastupdate> <!-- 2017-09-08 19:15:22 CEST -->
<ds>
<name> TotalBytesReceived </name>
<type> COUNTER </type>
<minimal_heartbeat>600</minimal_heartbeat>
<min>0.0000000000e+00</min>
<max>1.0000000000e+08</max>
<!-- PDP Status -->
<last_ds>U</last_ds>
<value>NaN</value>

<unknown_sec> 22 </unknown_sec>
</ds>
<ds>
<name> TotalPacketsSent </name>
<type> COUNTER </type>
<minimal_heartbeat>600</minimal_heartbeat>
<min>0.0000000000e+00</min>
<max>NaN</max>
<!-- PDP Status -->
<last_ds>240446</last_ds>
<value>3.6016722408e+02</value>
<unknown_sec> 0 </unknown_sec>
</ds>

etc etc

it is strange that there is a "U" in the last_ds
in the cacti logging (debugmode):

09/08/2017 07:25:54 PM - SPINE: Poller[0] DEVDBG: SQL:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (1554,'','2017-09-08 19:25:26','NewUpstreamAttenuation:290 NewUpstreamPower:500 NewDownstreamCurrRate:25024 NewDownstreamMaxRate:34147 NewUpstreamNoiseMargin:130 NewDownstreamPower:500 NewUpstreamMaxRate:6053 NewDownstreamNoiseMargin:80 NewDownstreamAttenuation:250 NewUpstreamCurrRate:2759'),(1557,'','2017-09-08 19:25:26','NewTotalBytesSent:44386076 NewTotalBytesReceived:21099618 NewTotalPacketsSent:242010 NewTotalPacketsReceived:83331') ON DUPLICATE KEY UPDATE output=VALUES(output)'
09/08/2017 07:25:54 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/01-fritzbox_totalpacketsreceive_1557.rrd --template TotalBytesSent:TotalPacketsReceive:TotalPacketsSent 1504891526:44386076:21099618:242010

as you see, the poller is OK, but at the rrd update, the header, TotalBytesReceived is missing, but the value is there !
anybody any idea?


Top
 Profile  
 
 Post subject: Re: Fritzbox Monitoring Template
PostPosted: Sat Sep 09, 2017 4:35 am 
Offline

Joined: Fri Sep 08, 2017 12:13 pm
Posts: 2
I deleted the data-source template and recreated it by hand, after fixing the dependencies, this works fine.
It looks like the import was damaged somewhere internally...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 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