On 4/5/2012 10:09 AM, Dejan Muhamedagic wrote: > On Wed, Apr 04, 2012 at 11:21:15AM -0500, Dimitri Maziuk wrote: >> On 04/04/2012 10:59 AM, Dejan Muhamedagic wrote: >>> Hi, >> ... httpd monitor ... >>> It may be wrong or not, that depends on what you need. >> >> (Another questionable choice as I recall was to consider 4xx an error. >> Dep. on what you need, you may want to treat only some 5xx codes as >> errors b/c the others mean apache is up and answering properly.) > > Isn't the status page always supposed to return, well, the > status?
No. From http://httpd.apache.org/docs/2.2/mod/mod_status.html: "The Status module allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form." What cluster should monitor for is that httpd is running and answering requests. For that purpose a "404 Not found" is a success (while "500 Internal server failure" probably isn't). "How well the server is performing" implies that it's up and running, so it's a valid test -- in the same sense that counting ice cubes in the freezer compartment is a valid test to see if your fridge is working. >> Which is precisely what I do: I monitor on the host with (more or less) >> "lsof -i | grep httpd.+\*:http" > > How is that better than fetching the status page? It's not. It tells me httpd is running and is bound to ip/port. It does not tell me if the port is reachable on a particular ip (but neither does the resource agent) or whether it serves what it's supposed to serve (but again neither does the agent since in my config /server-status is *supposed* to return 404). The point is that if you tested your apache & iptables setup and http's up and bound to the port, the reasons it wouldn't answer requests are pretty much limited to DOS on the server or on the connection. And since the resource agent isn't really monitoring those either, the only practical difference is that my check has fewer breakable pieces. Dimitri _______________________________________________ Linux-HA mailing list Linux-HA@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems