Logging on BE9300 Flint 3

We have a Flint 3 client insisting on no logs or record of offline clients. So we have tried to make this happen - but with mixed results.

We set cron job for ubus call gl-clients remove_offline to run every five minutes, which appears to wipe the offline clients list.

The GL admin panel has entries for system, kernel, crash, cloud & NGINX logs.

We ran /etc/init.d/log stop and /etc/init.d/log disable to disable system log.

Disabled NGINX logging with error_log off in /etc/nginx/nginx.conf

And we set a cron job /bin/dmesg -c > /dev/null every five minutes to keep the kernel ring buffer cleaned up.

Then rebooted Flint 3. Now the WiFi keeps dropping connections. I tested a few ideas why this may be happening, but have been unable to pin down the precise cause.

Maybe there is a better way to keep those GL admin panel logs clear?

I put some effort in to this and learned a bit.

Admin panel system log does not appear to rely on ubus log read as I initially thought, instead it seems to fetch logs via /www/cgi-bin/glc to libgl_log.so.

Ultimately I wrote a little script that seems to do what was needed:

#!/bin/sh
# Persistent 30-minute wipe script for Flint 3
# Run in background to avoid blocking boot

(
while true; do
    # 1. Clear NGINX log
    [ -f /var/log/nginx/error.log ] && > /var/log/nginx/error.log
    [ -f /var/log/nginx/access.log ] && > /var/log/nginx/access.log

    # 2. Clear kernel log
    dmesg -c

    # 3. Restart log daemon to clear system log
    /etc/init.d/log restart
    logger -t SYSTEM "Logs wiped"

    # 4. Remove offline clients from admin panel list
    ubus call gl-clients remove_offline

    # Minimal local record
    echo "$(date) - logs & offline clients cleared" >> /root/mirage.log
    tail -n 100 /root/mirage.log > /root/mirage.log.tmp && mv /root/mirage.log.tmp /root/mirage.log

    # Sleep 5 minutes
    sleep 300
done
) &

Made it executable, then call it in /etc/rc.local so it persists across reboot.

So far it seems to be working well. Router stays alive, WiFi doesn't drop, WireGuard tunnel stays alive …

Anything I am missing?

Hello,

We do not actually recommend that users disable these features or close records.

Sorry, we can't check if it's correct.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.