/var/log/noc-ck/*.log {
  size 5G
  daily
  rotate 30
  missingok
  compress
  delaycompress
  sharedscripts
  postrotate
    /usr/lib/rsyslog/rsyslog-rotate
  endscript
}

# rotate py-spy profiler data
/var/log/noc-ck/profiler/*.json {
  # rotate json files as quick as possible
  hourly
  maxsize 1

  # no json files is OK
  missingok

  # gzip compression ratio is about 10x
  compress

  # once created json file is not appended anymore,
  # so we do not need to rotate file more than once and
  # we do not need to create new empty file
  rotate 1
  nocreate

  # keep profiler data for two weeks
  maxage 14

  # do not append date ext as filename already contains date/time
  nodateext
}
