quentin-st/Freebox-OS-munin

Can't get a continuous tracking

Closed this issue · 10 comments

I can't get a continuous tracking of my freebox revolution.

freebox_switch1-day

However, it appears that everytime I manually start the scripts, tracking is ok for around one hour.

Are you using the latest version of the script? I fixed an API session error yesterday. Could you cd into the script directory and git pull?

I just realized that I had an issue on munin user running the scripts :

munin@rpi-stable:~$ /etc/munin/plugins/freebox-df Traceback (most recent call last): File "/etc/munin/plugins/freebox-df", line 270, in <module> query_storage_data() File "/etc/munin/plugins/freebox-df", line 79, in query_storage_data disks = get_connected_disks() File "/etc/munin/plugins/freebox-df", line 75, in get_connected_disks return call_api(freebox.get_api_call_uri('storage/disk/')) File "/etc/munin/plugins/freebox-df", line 61, in call_api api_open_session(freebox, app_id) File "/usr/local/src/munin-freebox/freebox.py", line 131, in api_open_session freebox.save() File "/usr/local/src/munin-freebox/freebox.py", line 32, in save with open(freebox_config_file, 'w') as output: PermissionError: [Errno 13] Permission denied: '/usr/local/src/munin-freebox/freebox.json'

Does munin needs write permission on the json file ?

Yes indeed: it needs to update API session information in freebox.json to avoid flooding the Freebox with new API sessions 5 times each 5 minutes.

I'm updating the README to include this information, thanks for the reminder!
Also, don't forget to git pull the script to benefit from yesterday's fix.

Please star+watch this repo to be warned when a new version is released!

Are you using the latest version of the script? I fixed an API session error yesterday. Could you cd into the script directory and git pull?

I'll try to pull right after.

Yes indeed: it needs to update API session information in freebox.json to avoid flooding the Freebox with new API sessions 5 times each 5 minutes.

You might mention that in the readme, whether to run these scripts with specific user, or change permission on json file.
For security reason, I would recommend to limit access to json file, and change user when munin run these scripts

Do you mind opening a pull request for the documentation update? So you get credited for this :)

Please let me know if the script works fine for you now that permissions are updated so I can close this issue.

I'll check that. I just have to clean my code, because I added a feature (hdd spin status). I'll also make a pull request for that feature.

Please do! Thank you for your contribution!

Waiting a few hours to be sure that my modifications are stable before issuing pull requests.

Great, thanks!

Since the underlying issue has been documented, this issue can be closed. Thank you for your pull request!