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 want to monitor an apache server. Primary goal is to detect if MaxClients gets reached, but later other values, too.

I looked at the nagios plugins, but most plugins seem to parse the HTML of the status page. I think this is an ugly solution. Is there any better way to get the server status?

Log file checking is not part of this question.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

You don't need to parse HTML - Apaches mod_status is capable of producing output well-suitable for regex parsing when called with the ?auto parameter (i.e. http://your-server/server-status/?auto). Depending on what monitoring system you need this to work with, there may or may not be a working / well-tested collector for this kind of thing.

As an example, take a look at how it is done in OpenNMS: http://www.opennms.org/wiki/Monitoring_Apache_with_the_HTTP_collector

share|improve this answer
    
OK, this output looks parsable. –  guettli Sep 5 '12 at 14:28

You could try and compile MOD-APACHE-SNMP which is here. You would use SNMP to collect your data if that is in fact an opinion for you. You can build a nice poller or use something like MTRG to do this for you.

Personally, I like @syneticon-dj's solution better. It could be simply that i'm bias to opennms. Love the product, the support and this is the solution i use.

NOTE i've only heard of MOD-APACHE-SNMP and have not actually used it.

share|improve this answer

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.