2

We have the graphite-web package installed, which came with its /etc/logrotate.d/graphite-web.

Unfortunately, the "out-of-the-box" file is broken -- the files are rotated, but the daemons writing into them are never notified. Listing the files opened by the (wsgi:_graphite)-processes one sees entries like:

apache2 615 _graphite   33w   REG                8,6 1168535870  25303589 /var/log/graphite/exception.log.1 (deleted)
apache2 615 _graphite   34w   REG                8,6  283563359  25302970 /var/log/graphite/cache.log.1 (deleted)
apache2 615 _graphite   35w   REG                8,6  156016897  25302081 /var/log/graphite/rendering.log.1 (deleted)
apache2 615 _graphite   36w   REG                8,6  156296784  25298790 /var/log/graphite/metricaccess.log.1 (deleted)

which is both wasteful and useless. Unlike carbon, which can rotate its own /var/log/carbon/*.log, graphite-web seems to have no built-in mechanism of its own. How do I fix its logrotate-entry?

1 Answers1

0

Ok, I figured this out... Because the graphite-processes are, actually, launched by Apache in a typical Ubuntu config, it is the Apache, that needs to be notified, whenever the logs are rotated.

So I copied the postrotate clause from /etc/logrotate.d/apache2 into graphite-provided file.

Alternatively, one could simply remove the graphite's file and add the /var/log/graphite/*.log into the list of apache-logs...

Overall, I have to admit, I'm disappointed about the Graphite packages available for Ubuntu -- they are way out of date and subtly misconfigured out of the box...