opnsense-speedtest
opnsense-speedtest copied to clipboard
Cron job results don't appear in the Reporting logs
I've set up a hourly job to run speedtest (reduced to every 30 minutes for debugging). I can see in the logs that the cron job is being triggered as shown in the second picture.
However, the results of the cronjob are not appearing the Reporting page (in the third picture those are manual runs)
Am I missing something? I admit that I'm a bit newbie with OPNSense, so I can't find the logs detailing what's happening in the cron triggered runs... Any help here would be appreciated, and I can provide more information if you ask.



this looks like some odd permissions issue; can you check the permissions on .csv file where results are stored?
thanks for the quick response, here's the result
couto@sun /usr/local/opnsense/scripts/OPNsense/speedtest]$ ls -la
total 28
drwxr-xr-x 2 root wheel 512 Nov 24 18:22 .
drwxr-xr-x 10 root wheel 512 Nov 24 18:20 ..
-rwxr-xr-x 1 root wheel 1640 Apr 4 2021 install_speedtest.sh
-rwxr-xr-x 1 root wheel 9344 Apr 4 2021 opn_speedtest.py
-rw-r----- 1 root wheel 1326 Nov 26 09:12 speedtest.csv
[couto@sun /usr/local/opnsense/scripts/OPNsense/speedtest]$
I changed the permissions to chmod 0755
and it seems to be working now, if you have a more restricted permission that still allows it to work, please feel free to suggest. Thanks for the tip! 👍
Sorry, I have something to add.
So, the next cron job after fixing the file permissions ran perfectly. However the following ones no longer appear on the report page again. The csv file still has the 0755 permission. Im getting the feeling that it's something a bit deeper than simple file permissions.
Exactly the same issue here... Does anyone have a suggestion?
@scottini Unfortunately not, I haven't found a solution yet. This bug is annoying enough to make this plugin lose its best feature 😢
@Couto, please try to modify your scheduled execution time from something else than 0 or 30 (start and middle of every hour). I've scheduled it to start every hour at 15', and it works on 4 installations. Let me know!
@scottini thanks for the tip, that indeed solved the problem. Which is such a weird workaround!
@Couto yes, definitely... But with this indication maybe @mihakralj can find an elegant solution! ;)
I cannot reproduce... Also, we moved maintenance and further development of this plugin to https://github.com/mimugmail/opn-repo Here is a direct link to Speedtest plugin in mimugmail's repo: https://github.com/mimugmail/opn-repo/tree/main/net-mgmt/speedtest-community