T
T
Timur Batyrshin2013-01-03 22:59:43
linux
Timur Batyrshin, 2013-01-03 22:59:43

Recommend lightweight HTTP monitoring

Please advise lightweight HTTP monitoring.
You need to monitor several HTTP locations (HTML/JSON/XML/etc) and display it all beautifully on one page.
Not SaaS.

The main criterion is to set up to monitor 2-3 locations from scratch in no more than half an hour (without prior acquaintance with this program).

It is desirable, but not necessary, and not to the detriment of the main criterion above:

  • Ability to check responses to POST requests.
  • Checking for a specific HTTP status code being returned, not just 200/not 200 (400,401,403,404,409,500 are used exactly and you want to distinguish between them).
  • A small number of features is a plus. Or alternatively a small number of default enabled features.


I’ll clarify why this is needed: there is no time to set up normal monitoring yet, but I want to track some minimum (working / not working) right now.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
DevMan, 2013-01-04
@erthad

sitemonitoring.sourceforge.net
Truth does not know how to POST, but it can distinguish between HTTP codes, it is simple and free.

S
Setrino, 2013-01-04
@Setrino

If you are on a Mac there is a wonderful tool - Integrity

S
Sergey, 2013-01-04
@bondbig

Not that lightweight, but:
www.zabbix.com/documentation/en/2.0/manual/web_monitoring/example

T
tryvia, 2013-01-16
@tryvia

Approximate logic, with a status notification to the mailbox.
You will need libwww-perl.
Building some kind of html table can be built based on the following.

#/bin/bash
html=/var/www/servers_state.html
serverlist=(ip1 ip2 ip3 ip4)
while true
do
echo '<table width="40%" border="0" cellspacing="0" cellpadding="5" >' > $html
for ip in "${serverlist[@]}"
do
state=$(HEAD localhost $ip |sed -n 1p)
echo "<tr><td>$ip</td><td>$state</td>/tr>" >> $html
if ( "$state" != "200 OK" )
then
echo "Something is wrong with $ip" |mail -s "Invalid responce from $ip" [email protected]_domain.com
fi
done
echo "</table>" >> html
sleep 60
done

This script will run continuously and will check the servers from the list every 60 seconds. It will build html and send an email if something breaks.
Perhaps I made some spelling mistakes. But the general logic boils down to the fact that some third-party tools are not necessarily needed to check the status.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question