
|
View Full Version : Server Status
Vortech 05-24-2001, 11:07 PM Well i seen this and fell in love. Looking for some thing like this to add to our site as it is getting ready for a redesign. ( http://www.hostrocket.net/v1/body_network_info.html ) I am not sure if theres is live or real time. But what i would like is. some one to make this for use.
We want it to pull from a mySQL database with the info we put in and display it like theres does. To let users know if our servers are up or down. It would need to ping the servers to see if they are up thats it. If they are down then show down in red if up show up in green.
So it would be basic 4 tables for this part and display and check the servers. If not to hard if a server goes down have it e-mails us to a set e-mail telling us what server went down.
We use BB right now but i really don't like it to much and users can't see if a server is up or down. Plus its not the best looking thing. Any other ideas to make this better would be great as well.
Thats about it. If some of you could send me a price for this and how long it would take would be great.
E-Mail info@vortechhosting.com
Annette 05-24-2001, 11:14 PM You might want to drop Marty a note (tlcwe.com). We had him write one for us that we embedded into client control panels. Works like a champ.
Woody 05-24-2001, 11:32 PM I'm interested. What programming language do you want it in? Fee free to e-mail me at awoodward@codinggurus.com or contact me at the ICQ/AIM in my sig.
Walter 05-25-2001, 04:31 AM I think there are some hosts who would be interested if this script is designed properly and easy to integrate. Sell the script for a small amount!
allera 05-25-2001, 08:15 AM It's easy to program exactly what you want in PHP. You can even have service checks (see if httpd, named, mysql are all responding) in addition to the pings.
Seach http://php.resourceindex.com for something similar to what you need, then modify the code to fit your needs.
tcmonica 05-25-2001, 10:48 AM why not try checking out http://www.thecgisite.com (which is currently down because they are moving to another server..try in like a day or so.)
:cool:
Vortech 05-25-2001, 04:11 PM PHP would be fine then its easy to run on winodws or linux. The reason i wanted to just ping is so it could work and check all the server NT and Linux. Just need some thing simple like the link above andit send a e-mail if it goes red or down fro 5 min.
Marty 05-25-2001, 04:23 PM Thanks for the props, Annette.
Vortech,
I have sent you an email. This would fairly simple and not costly. Let me know if you are interested.
Hey,
I was just taking a look at the source code for the HTML on the hostrocket page. It looks like its not real time. Here is a bit of the code:
<TD WIDTH=190 STYLE="background-color: rgb(223,223,223);">
<P><SPAN STYLE="font-size: 10pt;">host.hostrocket.com</SPAN></P>
</TD>
<TD WIDTH=113 STYLE="background-color: rgb(223,223,223);">
<P><B><SPAN STYLE="font-size: 10pt; color: rgb(0,204,0);">Online</SPAN></B></P>
</TD>
<TD WIDTH=83 STYLE="background-color: rgb(223,223,223);">
<P><SPAN STYLE="font-size: 10pt;">500 mhz</SPAN></P>
</TD>
<TD WIDTH=187 STYLE="background-color: rgb(223,223,223);">
<P><SPAN STYLE="font-size: 10pt;">512 ram 18gb storage</SPAN></P>
It kinda looks like the ONLINE part is just mannually entered if the server is up or down. But I still will look through the PHP sources to find the real time script...cause it would be a neat feature.
Jim
mkaufman 05-25-2001, 04:43 PM Um..PHP, Perl etc. never show's it's source code to it's client so you wouldn't know.
ezpzhosting 05-26-2001, 12:21 PM yes, but php and perl have .php or .cgi, that page is only standard html
allera 05-26-2001, 12:25 PM A perl program can output to an .html file. The program just runs in the background, or via cron, and it spits out an .html file after it runs.
In fact, it doesn't have to be perl at all, it could be a c program running in the background or via cron as well. :)
Then again, they could be manually doing the page as well. Who knows. :D
Inspa.net 05-26-2001, 12:43 PM Take a look Here (http://www.inspa.net/cgi-bin/info/). If anyone want's the source code, put a post in here and I'll make it available.
Not sure if it's what you guys are specifically after, but it may be a good starting point.
Rich
Vortech 05-26-2001, 07:11 PM That is very cool but i just want some thing like above. Simple and shows all the servers and a little info. Have it keep all this info in a mySQL database ping the hosts at a set amount of time. If it goes down just sends us a e-mail with the host name and its down. Just needs to send one mail then stop sending them.
If any one wants to make this let me know ICQ # 101505159 or e-mail me info@vortechhosting.com. I don't seen this small thing taking to long to make. Just let me know a price. Just needs to look just like the one above but also send a e-mail to me if it can't ping it.:D
Woody 05-26-2001, 08:34 PM Vortech:
I'm making one tonight. I'll e-mail you the link of it when I have finished it. If you want it, I'll send you the source code, if not I'll post the download here for everyone to have.
It will be programmed in perl with a MySQL backend. If people request it, I will make a flat file version as well.
Vortech 05-26-2001, 09:58 PM Let me know or post a link to would love to check it out.:D
Jedito 05-26-2001, 10:33 PM how about this?
http://servercheck.i-3.de/
and This
http://phpsysinfo.sourceforge.net/
Woody 05-26-2001, 11:47 PM I thinka l he wanted is a simple script like what he posted. None of the other things that those have.
My script is almost done and it will be released to everyone for free. I will post it here when it is done.
cimshimy 05-27-2001, 08:41 PM <?
# Add a line for each machine and port you want pinged.
# $ping1, $ping2, $ping3, etc.
#
# Put your template at the very bottom, and use <? echo $pingX; ?> in place
# of the status of that port + machine, where X = the corresponding number.
#
# You can edit the values of "$a" and "$b" from "up" and "down" to whatever you want.
$ping1 = pg("yourmachine", 80);
$ping2 = pg("othermachine", 53);
function pg($addr, $prt) {
$a = "up"; $b = "down.";
$pg = fsockopen($addr, $prt, $errno, $errstr, 1);
$pg ? $result = $a : $result = $b;
return($result);
}
?>
<!-- EDIT BELOW -->
yourmachine - port 80 - <? echo $ping1; ?> <br>
othermachine - port 53 - <? echo $ping2; ?> <br>
This will ping them whenever someone goes to the page, but hey, it's more accurate.
<?
# Change this to the output file for the status page.
$output = "demo.html";
# Add a line for each machine and port you want pinged.
# $ping1, $ping2, $ping3, etc.
#
# Put your template at the very bottom inside "$template", and use $pingX in place
# of the status of that port + machine, where X = a number from the variable.
$ping1 = pg("yourmachine", 80);
$ping2 = pg("othermachine", 53);
function pg($addr, $prt) {
$a = "up"; $b = "down.";
$pg = fsockopen($addr, $prt, $errno, $errstr, 1);
$pg ? $result = $a : $result = $b;
return($result);
}
?>
<!-- EDIT BELOW -->
<?
$template = "
yourmachine - port 80 - $ping1 <br>
othermachine - port 53 - $ping2 <br>
";
$fp = fopen($output, "w");
fputs($fp, $template);
$fp = fclose($fp);
?>
This one will output the template into the file of your choice. A crontab entry like "0,5,10,15,20,25,30,35,40,45,50,55 * * * * lynx -dump http://your/server/here/status_thing.php" will run the script every 5 minutes using lynx.
Andrew
Domenico 05-28-2001, 03:10 AM Thanks Woody! I am interrested in the flat file version as well...
Woody 05-28-2001, 03:18 PM Alright, well it is pretty much done. An e-mail has been sent out to a few people that requested it. I'll post the download link here in a few minutes.
Jedito 05-28-2001, 03:30 PM Yeah Yeah :)
Vortech 05-28-2001, 03:31 PM Hey Woody,
Do you have a link for a demo of it yet. I tryed to get you on ICQ but did not see you on there. I check my mail but did not see any thing.. :)
Just let me know. Info@vortechhosting.com
Domenico 05-28-2001, 06:53 PM Bring up the download link...
Woody 05-28-2001, 09:41 PM Hehe, Didn't forget about you guys.
@vortech
Hmm, I just sent you an icq with the demo link. I'll resend the e-mail with the source code now.
@everyone else
Sorry about not posting the link. It had been kind of long day. If anyone wants to put up a download for it on there server get in contact at me at awoodward@codinggurus.com or the aim/icq in my sig. If you are interested in getting the program now, icq/e-mail/aim me.
|