Popular Post zag Posted February 4, 2010 Popular Post Posted February 4, 2010 I started a topic in the windows forum on server monitoring software and nothing really fitted the bill. I tried out My little Server monitor but it seemed a bit over complicated for my needs. So I wrote my own little ping app that looks sexy Let me know if anyone wants any improvements.monitor.zip 18
benaus Posted February 4, 2010 Posted February 4, 2010 Thanks for that. Also if you run this on a linux/bsd server, change the part where it says ... //check target IP or domain $pingreply = exec("ping -n $count $value"); if ( substr($pingreply, -2) == 'ms') to say //check target IP or domain $pingreply = exec("ping [b]-c[/b] $count $value"); if ( substr($pingreply, -2) == 'ms') This is now running on a monitor which rotates between a few different scripts. Thanks again.
zag Posted February 4, 2010 Author Posted February 4, 2010 Cool, glad it was some use. I forgot to add the server graphic. Just download the attached picture and pop into a folder called "images" in the root.
Chuckster Posted March 25, 2010 Posted March 25, 2010 How do I get this to work from the server end so that it's accessible via the intranet?
zag Posted April 9, 2010 Author Posted April 9, 2010 As long as its on an internal IP it should work fine. All it does is ping the machine so make sure its pingable and it will work.
glennda Posted November 23, 2010 Posted November 23, 2010 I have just set this up but all i get is down and timeout in the right hand coloum? is there anything special i have to install as atm i have just got apache and php5 Toby
Guest Guest Posted November 23, 2010 Posted November 23, 2010 ^ Can your webserver resolve the hostnames (from the cli)?
glennda Posted November 23, 2010 Posted November 23, 2010 ^ Can your webserver resolve the hostnames (from the cli)? yeah never had any problems with dns from it - also tried via ip i have got it right and it used the $host[1] = "server name"; for the lookup?
glennda Posted November 23, 2010 Posted November 23, 2010 just tested on a seperate web server and all i get is it failing?
glennda Posted November 23, 2010 Posted November 23, 2010 ignore me, im being an idiot! sitting at home being ill isnt doing me well - i hadn't changed the -n to -c as shown in post 2
Chris_ Posted November 24, 2010 Posted November 24, 2010 I'm having trouble getting this to work. I just get timeout for everything. I'm using IIS6 and PHP5.
glennda Posted November 24, 2010 Posted November 24, 2010 try via ip address and see if it works if so then its your dns lookups which are failing.
Chris_ Posted November 24, 2010 Posted November 24, 2010 try via ip address and see if it works if so then its your dns lookups which are failing. I get timeout when I use the IP address also. I am able to ping both the hostnames and IP addresses successfully from the server that I'm trying to run the server monitor on.
zag Posted November 24, 2010 Author Posted November 24, 2010 Sorry not heard of that problem before, if you can ping it from a cmd prompt it should work in the php script. Might want to check any firewalls or ports that are open
Chris_ Posted November 24, 2010 Posted November 24, 2010 I'll try on on another server and see if I have better luck. Thanks for providing a useful little tool though
glennda Posted November 24, 2010 Posted November 24, 2010 sounds like something is blocking the php's ping request. I have never used php and iis so not sure why its doing that. but with apache after i stopped being a moron it just worked.
zag Posted November 25, 2010 Author Posted November 25, 2010 Just for the record, I run it on IIS 7.5 fine
Chris_ Posted November 26, 2010 Posted November 26, 2010 Is there any specific IIS settings or permissions that need to be changed for this to work?
zag Posted November 26, 2010 Author Posted November 26, 2010 Is there any specific IIS settings or permissions that need to be changed for this to work? Yes you probably need to allow script and application rights in the site properties.
Chris_ Posted November 26, 2010 Posted November 26, 2010 Yes you probably need to allow script and application rights in the site properties. I've given the site permission to run script executable permissions and still nothing. Might end up having to set up another physical server
zag Posted November 26, 2010 Author Posted November 26, 2010 Try it on your work pc, that's what I do. Its pretty simple to install IIS on xp or windows 7 with the php platform installer.
Chris_ Posted November 26, 2010 Posted November 26, 2010 (edited) Just installed IIS and PHP using the Microsoft Web Platform installer on my XP work PC. I got the same results. Everything returns timeout. Installed WAMP server and it seems to be working. Although it says that there is undefined variables on line 7 and 42 of index.php Edited November 26, 2010 by Chris_ 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now