Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to monitor the rate of 404, 403, 500 etc errors in my Apache logs with Munin but I can't find a plugin to do this. Surely it exists?

share|improve this question

2 Answers 2

I did the same kind of monitoring for another service (spam filter), never with Apache. However, the idea is the same.

You have to code a little script which will parse the log files and analyze them. Munin will launch the script every like 5 minutes.

The script uses logtail to keep track of unread lines. With a bunch of grep you will be able to count the lines depending of what HTTP code you're looking for.

I hope you get the point.

Sorry I can't give you the script, I moved to another company.

share|improve this answer

Here's a plugin that might help. It monitors various request codes by parsing the log files.

https://github.com/dc2447/munin-apache-error-rate/blob/master/apache_error_rate

Near the top you can set the codes you care about:

mystatuscodes="400 401 403 404 500 503 504"

You can also configure how many recent log lines it looks at and what log file to parse.

To be honest you are probably better off writing your own plugin. It's really simple and you can customize it for your needs (for example, does your system use logrotate? etc.) – plus, you get to write your first munin plugin.

share|improve this answer
    
Welcome to Server Fault - we prefer answers that are more than just links around here. Please edit your answer to actually explain why this is a useful plugin to solve the problem being asked (maybe with some usage examples) rather than simply trying to subvert the character-counter. Thanks :-) –  voretaq7 Nov 15 '12 at 16:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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