Originally posted by claudius
Hi there
I'm looking for a monitoring solution. I like to get informed when a service is not available. For example &www.watchmyserver.com& has a solution like this but the drawback is that you just get informed if the server is not ping able. But sometimes it's not the whole server which is going down. I would like to watch services like HTTP, SMTP, FTP, CPOP, etc.
Does anybody knows a good program or a good website which supports that? If this program is just sending an email it's also ok cause I can forward this to our SMS-Gateway.
Thanks a lot!
Here's a solution I dreamed up one saturday with nothing to do. It's free, secure and uses what you already have.
Steps:
go to whm and make a copy of a cpanel theme like monsoon or whatever has server stats.
name the copy "service" or whatever you like
make an account with a dedicated IP and use the new cpanel theme with username "service" and password "service"
go into : /usr/local/cpanel/base/frontend/service
(if you named it " service" and modify the index.html file to only display the server stats.
here's what I do:
###########
<META HTTP-EQUIV="REFRESH" CONTENT="30">
<br>
<center>
<script language="JavaScript">
s_date = new Date();
var weekDay = "";
selectMonth = new Array(12);
selectMonth[0] = "January";
selectMonth[1] = "February";
selectMonth[2] = "March";
selectMonth[3] = "April";
selectMonth[4] = "May";
selectMonth[5] = "June";
selectMonth[6] = "July";
selectMonth[7] = "August";
selectMonth[8] = "September";
selectMonth[9] = "October";
selectMonth[10] = "November";
selectMonth[11] = "December";
if(s_date.getDay() == 1){
weekDay = "Monday";
}
if(s_date.getDay() == 2){
weekDay = "Tuesday";
}
if(s_date.getDay() == 3){
weekDay = "Wednesday";
}
if(s_date.getDay() == 4){
weekDay = "Thursday";
}
if(s_date.getDay() == 5){
weekDay = "Friday";
}
if(s_date.getDay() == 6){
weekDay = "Saturday";
}
if(s_date.getDay() == 7){
weekDay = "Sunday";
}
if(s_date.getDay() == 0){
weekDay = "Sunday";
}
var setYear = s_date.getYear();
var BName = navigator.appName;
if(BName == "Netscape"){
var setYear = s_date.getYear() + 1900;
}
document.write(weekDay + ", " + selectMonth[s_date.getMonth()] + " " +
s_date.getDate() + ", " + setYear);
</script>
<div id=Clock align=Center style="font-family Ariel; font-size: 14; color:RED"> </div>
<script language = "JavaScript">
function tick() {
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
switch(intHours){
case 0:
intHours = 12;
hours = intHours+":";
ap = "A.M.";
break;
case 12:
hours = intHours+":";
ap = "P.M.";
break;
case 24:
intHours = 12;
hours = intHours + ":";
ap = "A.M.";
break;
default:
if (intHours > 12)
{
intHours = intHours - 12;
hours = intHours + ":";
ap = "P.M.";
break;
}
if(intHours < 12)
{
hours = intHours + ":";
ap = "A.M.";
}
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
timeString = hours+minutes+seconds+ap;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 100);
}
window.onload = tick;
</script>
<h2>SERVER STATUS HOSTGROUP SNOOPY 2</h2>
<table align=center border=1 class=tdshade2>
<cpanel Serverinfo="servicestatus()">
</table>
<br><br>
<cpanel include="stdfooter.html">
####################
change the stdfooter.html to your liking.
last not least, put a shortcut on your desktop like this:
http://service:service@yourip:2082/frontend/service/index.html
it'll refresh every 30 sec and gives you all the stats you need.
Advice: do not use this new cpanel theme you created for any other accounts
Hope this helps!
Tom