panel icon indicating copy to clipboard operation
panel copied to clipboard

Add Admin Action Logging

Open notAreYouScared opened this issue 5 months ago • 1 comments

This should log all (Editing/Creating/Deleting/etc) admin actions on the admin side of the panel. A role permission should be added to view the admin activity log. A purge period should also be added to prevent database ballooning, 30/60 days. Events should NOT be deletable. Events should also have some metadata.

examples <username> edited <server name> variables. <variable name>: <old> -> <new> notCharles edited Factorio Experimental variables. Server Name: SuperAwesomeServer -> SuperDuperAwesomeServer <username> deleted <server name> notCharles deleted Factorio Experimental <username> edited <username>, changed password/updated email <old> -> <new>/ (Added/Removed) <role(s)> notCharles edited Lance: Updated email [email protected] -> [email protected] <username> edited <server name> limits: (limit) <from> -> <to> notCharles edited FTB 1.22 limits: CPU unlimited -> 400% <username> suspended <server name>

Discussed in https://github.com/pelican-dev/panel/discussions/95

Originally posted by Poseidon281 April 17, 2024 This would make it so that admin actions are also logged to a activity tab or to Discord #49

Actions like: Deleting a server Suspending a server etc ..

notAreYouScared avatar Aug 11 '25 11:08 notAreYouScared

A purge period should also be added to prevent database ballooning, 30/60 days.

We can leverage the activity_logs and alter its ROW_FORMAT to be COMPRESSED, i already do it on all my ptero/peli installs. In the end i used ALTER TABLE activity_logs ROW_FORMAT=COMPRESSED went from 60gb to 3.3gb 👌

examples edited variables. : ->

Since aren't unique i'd rather use UUID and then display the name on hover & add a event/server filter like we do on the client side.

rmartinoscar avatar Aug 11 '25 11:08 rmartinoscar