Results 1 to 9 of 9

Thread: Logfile Rotation

  1. #1
    Passenger
    Join Date
    Aug 2018
    Location
    London, UK
    Posts
    14

    Logfile Rotation

    Folks,

    Few dats ago I added FR24 feed to my existing Flightaware setup on a Raspberry Pi. All seems to be working OK but examining the settings page on <local address>:8754 I notice the logfile mode says keep up to 48 hours, rotate every 24 hours. Location of logfile is correct.

    Mine is now nearly 5 days old and around 9MB in size.

    Geoff

  2. #2
    Super Moderator
    Join Date
    May 2011
    Location
    T-NZCH1, PP:PH New Zealand
    Posts
    5,038
    I don't think anyone has ever got it to work.

    Most turn it off to stop filing up and killing SD card.

    Only really need for diagnostic issues

    Sent from my XT1092 using Tapatalk
    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

  3. #3
    Passenger
    Join Date
    Mar 2018
    Location
    Netherlands
    Posts
    6
    This works for me:

    in the file /etc/logrotate.d/fr24feed

    Code:
    /var/log/fr24feed/*.log {
         daily
         missingok
         rotate 5
         compress
         su fr24 fr24
         create 0644 fr24 fr24
         copytruncate
         notifempty
         postrotate
             if
               /bin/systemctl status fr24feed.service > /dev/null ; then \
               /bin/systemctl restart fr24feed.service > /dev/null; \
             fi;
         endscript
    }

  4. #4
    Passenger
    Join Date
    Aug 2018
    Location
    London, UK
    Posts
    14
    Thanks SlashbNL - I'll give that a try.

    Geoff

  5. #5
    Super Moderator
    Join Date
    May 2011
    Location
    T-NZCH1, PP:PH New Zealand
    Posts
    5,038
    Fingers crossed someone with access to the distro code takes notice
    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

  6. #6
    Purser
    Join Date
    Jan 2015
    Location
    T-EGKK39
    Posts
    112
    Thanks @SlashbNL working good here too

    Maybe another one for @abcd567 to add to "the thread of all knowledge"

  7. #7
    Passenger
    Join Date
    Apr 2015
    Location
    Lausanne, Switzerland
    Posts
    7
    Thanks @SlashbNL, turns out that I did *NOT* have the logrotate configuration file in the logrotate.d directory, go figure out why!

    I have now created the file and look forward to see it doing its magic.

    The real question now is, what about the logfile rotation setting in the web interface to fr24feed? Is that even taken into consideration? I very much doubt it...

    Thanks,

    Luca

  8. #8
    Passenger
    Join Date
    Mar 2018
    Location
    Netherlands
    Posts
    6
    If you want a logfile set it to either 1 (keep 48hrs rotate every 24) or 2 (keep 72 hrs rotate every 24). These 2 settings will make the feeder send messages to the logfile, just the rotation does not work out of the box. If you disable it there will not be a log.

  9. #9
    Passenger
    Join Date
    Apr 2015
    Location
    Lausanne, Switzerland
    Posts
    7

    Thumbs up

    Quote Originally Posted by SlashbNL View Post
    If you want a logfile set it to either 1 (keep 48hrs rotate every 24) or 2 (keep 72 hrs rotate every 24). These 2 settings will make the feeder send messages to the logfile, just the rotation does not work out of the box. If you disable it there will not be a log.
    I see, it's just a UI design flaw in the settings page, then, as I could not understand how a setting in the fr24feed software could influence a system daemon setting like that of logrotate.

    Many thanks for the clarification!

    Luca

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •