Fritzbox Monitoring Template
Moderators: Developers, Moderators
-
- Posts: 40
- Joined: Mon Jun 15, 2009 12:55 pm
Re: Fritzbox Monitoring Template
/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:
"<ip>" and "<password>" are inputvariables from Cacti
Data Input Method has to be look like this:
- Attachments
-
- Screenshot
- Unbenannt.png (17.36 KiB) Viewed 2631 times
Re: Fritzbox Monitoring Template
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..
Are you using another fritzbox.py? https://pastebin.com/ncU62Hgn <<< this is my version from the last post..
Code: Select all
...
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
....
-
- Posts: 40
- Joined: Mon Jun 15, 2009 12:55 pm
Re: Fritzbox Monitoring Template
you are right,
i missed to update the Script in Template Archiv.
Here the fixed one:
i missed to update the Script in Template Archiv.
Here the fixed one:
- Attachments
-
- fritzbox_template.zip
- fixed Fritzbox Template
- (18.38 KiB) Downloaded 338 times
Re: Fritzbox Monitoring Template
Thank you very much
-
- Posts: 3
- Joined: Fri Sep 08, 2017 12:13 pm
Re: Fritzbox Monitoring Template
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?
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?
-
- Posts: 3
- Joined: Fri Sep 08, 2017 12:13 pm
Re: Fritzbox Monitoring Template
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...
It looks like the import was damaged somewhere internally...
-
- Cacti User
- Posts: 68
- Joined: Thu Aug 04, 2005 8:34 am
Re: Fritzbox Monitoring Template
hi, im using your templates but i still have 2 questions:
1) could it be that the crc template was created with a newer cacti version than 0.8.8h?
if so, how can i import that template to 0.8.8h?
the rest of the templates and the newest version of the script work.
2) the traffic template only shows traffic without iptv
is this on purpose? for t-entertain, for example, the streaming traffic is not shown. only traffic i add on top of this.
1) could it be that the crc template was created with a newer cacti version than 0.8.8h?
if so, how can i import that template to 0.8.8h?
the rest of the templates and the newest version of the script work.
2) the traffic template only shows traffic without iptv
is this on purpose? for t-entertain, for example, the streaming traffic is not shown. only traffic i add on top of this.
Re: Fritzbox Monitoring Template
It seems the CRC template has been exported from a version 1.x.x that uses a different syntax for the RRA definitions.
I managed to modify it manually and import the attached template version in my 0.8.8h version.
I managed to modify it manually and import the attached template version in my 0.8.8h version.
- Attachments
-
- cacti_graph_template_fritzbox_crc_error.zip
- (2.33 KiB) Downloaded 198 times
Re: Fritzbox Monitoring Template
I have deleted & re-uploaded the graph and data templates several times, but i keep getting the NaN error for inbound trafic.
The python script outputs the correct data.
Has anyone ever got to the root of the issue here?
thanks!
The python script outputs the correct data.
Has anyone ever got to the root of the issue here?
thanks!
Re: Fritzbox Monitoring Template
Hello,
is the main developper still there? I have found some additional scripts in python for munin. I have checked them and they work flawlessly. But I have troubles to integrate them into Cacti. I think this is a very small job, giving all Fritzbox owners a big step forward. They work with FritzOS 7.x and use the same basis as this script here.
When running on OS Basis, just the following env Variables must be set:
fritzbox_ip
fritzbox_password
locale (value de or en)
https://github.com/Tafkas/fritzbox-munin
I have tested them with a Fritzbox Cable 6590.
BR
is the main developper still there? I have found some additional scripts in python for munin. I have checked them and they work flawlessly. But I have troubles to integrate them into Cacti. I think this is a very small job, giving all Fritzbox owners a big step forward. They work with FritzOS 7.x and use the same basis as this script here.
When running on OS Basis, just the following env Variables must be set:
fritzbox_ip
fritzbox_password
locale (value de or en)
https://github.com/Tafkas/fritzbox-munin
I have tested them with a Fritzbox Cable 6590.
BR
Who is online
Users browsing this forum: No registered users and 1 guest