Syslog rotation

Hey,

if there a possibile solution to modify the syslog and other log rotation in the logroation.d folder?
I found these files are all read only and we want to modify that we not running out of space on the sd-card

Greets Tony

The only logging happening to SD on Ubuntu Core is rsyslog … which runs in parallel with journald (which in turn only logs to a ringbuffer in ram)

if you add a yaml snippet to your gadget.yaml like:

defaults:
  99T7MUlRhtI3U0QFgl5mXXESAiSwt776:
    service:
      rsyslog:
        disabled: true

this turns off rsyslog and leaves you with journalctl without touching the SD card at all.

@ogra,
not that what I really want, I like to have the syslog but my question was to decrease the keeping days of syslog and size like syslog-yesterday, syslog-someotherday so like only keep like 2-3 days of syslog
I know that on a “normal” system this config is editable. Can I editable this like in my own images to mount some stuff?

no, currently /etc/logrotate.d is not writable (and the plan is also to move away from rsyslog in UbuntuCore 18 AFAIK)

you could try to create a syslogger snap though and use the “log_observe” interface for it … in such a snap you could ship rsyslog and logrotate and configure it as you like (and indeed you would have to turn off the shipped rsyslog as i described above)