0

I am trying to use the chef logrotate recipe.

include_recipe "logrotate"
logrotate_app "kafka-logs" do
  cookbook "logrotate"
  path "/tmp/kafka.log"
  frequency "daily"
  size "1k"
  rotate 10
  create "0644 root root"
end

I am trying to rotate given a size. I used 1K test. Yet..when I ingest data..I see no rotation. where are the logs? there is no /tmp/kafka.1.log etc..

Should I not see the rotated logs in /tmp dir?

Tampa
  • 75,446
  • 119
  • 278
  • 425

1 Answers1

4

Logrotate is triggered via a cronjob, so check the frequency of your cronjob to verify that the rotation process is actually being triggered by a timer.

Adam
  • 1,962
  • 2
  • 17
  • 30