Script to check Apache

1 view
Skip to first unread message

Deepan

unread,
Apr 17, 2008, 3:47:52 AM4/17/08
to chao...@googlegroups.com
Hi All,
I am looking for a script to check if Apache is up
and running, if not the script should send an
email automatically. The script has to be run from
a different machine (not from the machine that
runs apache). So it has to query for a http
address and if it receives any other reply that
200 OK, it should send the email. Can you guys
suggest on how to go about ? Should I use curl ?
or wget ? or ping ? I can handle the email part
and cron part. If you guys have a similar script
please share it if possible.
Regards
Deepan
Sudoku Solver: http://www.sudoku-solver.net/


Madison

unread,
Apr 22, 2008, 9:07:50 PM4/22/08
to CHAOS706.ORG
I would definitely check out Monit. I haven't had a long time to read
everything on this. But, from what I have read you could configure
this on a server to check Apache. It seems it checks the PID for
everything and if it goes down, you can configure it to email you, and
restart the service or many other options. Let me know what you guys
think about this, I find it kind of cool :-).

http://www.tildeslash.com/monit/index.php

Matt

unread,
Apr 24, 2008, 11:21:18 PM4/24/08
to chao...@googlegroups.com
I've been thinking about setting up something like this using php
scripts, if i get a working solution i'll post it.
Reply all
Reply to author
Forward
0 new messages