Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Delete event log periodically

Delete event log periodically

Scheduled Pinned Locked Moved Solved Support
eventlog
7 Posts 4 Posters 1.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    konservenknilch
    wrote on last edited by girish
    #1

    I am looking for a way to clear the event log periodically. This should work in such a way that all entries older than 14 days are deleted daily. It would also be good if the deletion could be set for certain event groups.

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Currently the eventlog should be purging events older than 10days https://git.cloudron.io/cloudron/box/-/blob/master/src/cron.js#L101

      There is no config option to adjust this though and I am also not sure if that is really useful, given the low amount of events and thus storage they will be using.

      Maybe in your case something doesn't work in the cleanup?

      1 Reply Last reply
      1
      • K Offline
        K Offline
        konservenknilch
        wrote on last edited by
        #3

        Hello, my server has only been running for a short time. It seems that the log entries are deleted after 14 days. Thanks for the support.

        1 Reply Last reply
        1
        • M Online
          M Online
          msbt
          App Dev
          wrote on last edited by
          #4

          @nebulon sorry for digging up another corpse, but can you confirm that the event log is supposed to be cleared every two weeks? I'm about to hand over a Cloudron to a customer and wanted to see that all the try and error attempts during setup are not in there, but the Event Log shows pretty much everything, dating back almost two years. How can I manually clear the event/mail/cert logs?

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            The current eventlog cleanup time is actually 90 days https://git.cloudron.io/cloudron/box/-/blob/master/src/cron.js#L147

            There is otherwise no convenient way to purge the eventlog. Presumably you could just delete all entries in that db table, but that is not really tested. So maybe you can clone the instance, purge that manually and see if it still works.

            1 Reply Last reply
            1
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              There is an eventlog table. The notifications table references entries in that table. Make sure you have a backup and then:

              mysql -uroot -ppassword -e "DELETE from box.notifications"
              mysql -uroot -ppassword -e "DELETE from box.eventlog"
              
              1 Reply Last reply
              1
              • M Online
                M Online
                msbt
                App Dev
                wrote on last edited by msbt
                #7

                thanks, made a snapshot and got rid of the most important/obvious logs, cheers 👍

                Unsure about the 90 days though, many of my servers have logs until the day they were created.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search