Closed SeaLife closed 3 years ago
try:
fritzbox_wan_result = self.conn.call_action('WANCommonIFC1', 'GetAddonInfos')
wan_bytes_rx = fritzbox_wan_result['NewX_AVM_DE_TotalBytesReceived64']
and see this https://github.com/kbr/fritzconnection/issues/20
Hey! Thanks, the counter is above 4.23GB, but for some reason, it differs from the metric displayed in the Fritz!Box UI.
(Grafana shows ~15 GB)
(Today at ~20GB)
//EDIT:
I resetted the "Online Zähler" in the UI of the Box and the Metric returned by the API call remains at the value given before... Im confused now :D
It's not documented, but it seems that 'NewX_AVM_DE_TotalBytesReceived64'
returns the number of bytes since the system start (I don't know whether it is reset by a restart). The UI displays the bytes for time ranges - these are different numbers.
Okay, so, after modifying the code to use the other values, its kinda working. I can assure, that the value resets after the "Zwangstrennung" (force disconnect from the ISP).
At the weekend, i'll probably open a PR to "fix" the metrics in the exporter, hopefully, the dude is still maintaining the repository. :D
This is probably closed. :)
Thanks. :)
As it seems to be resolved and there are no more comments, I like to close the issue.
Hello!
im using https://github.com/pdreker/fritzbox_exporter to export fritz!box data to my prometheus instance. For some reason, the data returned by GetTotalBytesReceived in NewTotalBytesReceived is resetted after ~4.23GB. Can i somehow prevent this?
The code the exporter uses (
conn
is a instance offc.FritzConnection
):Regards SeaLife