+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 41
Web Development Thread, PHP Server Monitor in Coding and Web Development; I started a topic in the windows forum on server monitoring software and nothing really fitted the bill. I tried ...
  1. #1
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,762
    Thank Post
    897
    Thanked 416 Times in 350 Posts
    Blog Entries
    12
    Rep Power
    86

    PHP Server Monitor

    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.
    Attached Images Attached Images
    Attached Files Attached Files

  2. 15 Thanks to zag:

    AdamK (9th February 2010), benaus (4th February 2010), bladedanny (9th December 2010), bondbill2k2 (10th July 2012), Coopeh (4th December 2010), cscc (20th June 2013), Danlewis3 (1st April 2010), danrhodes (21st May 2010), dave.81 (22nd May 2013), denzal2k4 (5th January 2012), ICTNUT (12th October 2010), JJonas (25th January 2011), networkdemon (8th February 2010), Shielder (21st February 2013), skell (19th May 2011)

  3. #2

    Join Date
    Aug 2009
    Posts
    33
    Thank Post
    3
    Thanked 10 Times in 10 Posts
    Rep Power
    12
    Thanks for that.

    Also if you run this on a linux/bsd server, change the part where it says ...

    Code:
          //check target IP or domain
    	  $pingreply = exec("ping -n $count $value");
    	  if ( substr($pingreply, -2) == 'ms')
    to say

    Code:
          //check target IP or domain
    	  $pingreply = exec("ping -c $count $value");
    	  if ( substr($pingreply, -2) == 'ms')
    This is now running on a monitor which rotates between a few different scripts. Thanks again.

  4. #3
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,762
    Thank Post
    897
    Thanked 416 Times in 350 Posts
    Blog Entries
    12
    Rep Power
    86
    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.
    Attached Images Attached Images

  5. #4

    Join Date
    Jun 2008
    Posts
    718
    Thank Post
    118
    Thanked 64 Times in 52 Posts
    Rep Power
    31
    How do I get this to work from the server end so that it's accessible via the intranet?

  6. #5
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,762
    Thank Post
    897
    Thanked 416 Times in 350 Posts
    Blog Entries
    12
    Rep Power
    86
    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.

  7. #6

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    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

  8. #7

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    *bump*

  9. #8


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148
    ^ Can your webserver resolve the hostnames (from the cli)?

  10. #9

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    Quote Originally Posted by j17sparky View Post
    ^ 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?

  11. #10

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    just tested on a seperate web server and all i get is it failing?

  12. #11

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    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

  13. #12
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,762
    Thank Post
    897
    Thanked 416 Times in 350 Posts
    Blog Entries
    12
    Rep Power
    86
    Glad you got it working

  14. #13

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    Quote Originally Posted by zag View Post
    Glad you got it working
    Me being an idiot!

  15. #14
    Chris_'s Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    673
    Thank Post
    131
    Thanked 111 Times in 94 Posts
    Rep Power
    43
    I'm having trouble getting this to work. I just get timeout for everything. I'm using IIS6 and PHP5.

  16. #15

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,802
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    try via ip address and see if it works

    if so then its your dns lookups which are failing.

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. My Little Server Monitor
    By ICTNUT in forum Wired Networks
    Replies: 310
    Last Post: 20th March 2013, 03:51 PM
  2. Server monitor software?
    By zag in forum Windows
    Replies: 17
    Last Post: 30th July 2010, 01:43 PM
  3. Performance Monitor showing a stressed Server!
    By FragglePete in forum Windows Server 2000/2003
    Replies: 3
    Last Post: 5th May 2009, 03:35 PM
  4. Free SQL Server Monitor
    By ICTNUT in forum Windows
    Replies: 2
    Last Post: 8th August 2008, 04:04 PM
  5. free php server needed
    By callumtuckey in forum General Chat
    Replies: 20
    Last Post: 5th June 2007, 09:36 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •