Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a best practice for logging stats on my server. I've seen a lot of packages which do most of the thinks but I am building the front-end myself. So basically I'm looking for pure the logging part. Any best practice tips for doing it myself or frameworks which can be taken apart for usage (or as example to build my own)

Linux server with:

  • Apache (+PHP)
  • nGinX
  • MySQL (Percona)
  • Varnish
  • APC
  • Traffic

I was thinking about logging this to mysql for easy (remote) access.

share|improve this question

closed as not constructive by Sven, Zoredache, Tim Brigham, rnxrx, gWaldo Aug 30 '12 at 19:19

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Which "stats" do you mean? If you want to log and graph performance metrics etc., I would suggest to use munin. – j0nes Aug 30 '12 at 18:05
All the values available which a certain service can give me so I can create a detailed view of the stats. For example the load avg of the server itself or from MySQL. – PvdL Aug 30 '12 at 18:09
You really should be asking questions that you think you already know the answers to. One such question might be "How do I log without significantly impacting my server's performance?" – Michael Hampton Aug 30 '12 at 20:00

You should have a look at Munin. Munin is a standard system to collect and graph all kinds of data (performance data, application stats etc). It is easily expandable with a custom set of plugins that you can fit to your application. Munin is already available as a package for a lot of Linux distributions.

Munin uses RRD files for logging purposes. If you want (or if you do not like the default Munin graphs), you can write custom graphs based on this data.

Download, installation and sample graphs available from:

share|improve this answer
I am looking into this a.t.m. yes, especially for just the logging functions to do this as efficiently as possible so my fast servers without logging won't become slow one's with logging. – PvdL Aug 30 '12 at 18:17
Well the performance of logging mainly depends on the plugins itself. Munin runs its plugins in 5-minute cycles. With all performance considerations, the metrics gained from running monitoring software are really really useful, so I just accept the observer effect and run a lot of plugins. – j0nes Aug 30 '12 at 18:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.