+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
Internet Related/Filtering/Firewall Thread, System Status Page? in Technical; No idea where this has to go, move if needed. I am looking to make a webpage that would be ...
  1. #1
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45

    System Status Page?

    No idea where this has to go, move if needed.

    I am looking to make a webpage that would be hosted internally that is a "System Status" page, very much like whats at the top here: Mojang | Support Center so staff can get at a glance the status of things like: Network Status, Email System, VPN. Preferably something I can control from the office, I don't need it automated as that's a bit overkill for what I want.

    I found this, don't know if its relevant: Stashboard: The open source status dashboard. I have knowledge of HTML and web design but thats my limit so Python is way over my head!

    Somebody please help!

    Matt

  2. #2

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,921
    Thank Post
    860
    Thanked 1,431 Times in 984 Posts
    Blog Entries
    47
    Rep Power
    614
    Why not just do a flat HTML page on your intranet and edit the code when necessary? We have a traffic light on our helpdesk page and when something is iffy, I shuffle the comments brackets around and change the lightbulb to orange (usually whilst making the Red Dwarf joke).

    I just leave the relevant HTML file open in Notepad++ all the time, edit when needed and hit Ctrl+S. Change made. Easy.

  3. #3
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45
    That was my first thought. I might start trying to code that when i get home. Its been a while since i built something from scratch.

    I was wondering if there are any pre-made things out there.

    Thanks!

  4. #4

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,921
    Thank Post
    860
    Thanked 1,431 Times in 984 Posts
    Blog Entries
    47
    Rep Power
    614
    I'd say that if you're not shoving it front-and-centre, no-one is going to go out of their way to look at it - stick it on your main intranet page then it'll actually get seen!

    I don't think you need to go over the top and list lots of systems - we just have a single red/orange/green lightbulb PNG image and anytime it's not green, I write a brief comment as to why.

  5. #5
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45
    Quote Originally Posted by sonofsanta View Post
    I'd say that if you're not shoving it front-and-centre, no-one is going to go out of their way to look at it - stick it on your main intranet page then it'll actually get seen!

    I don't think you need to go over the top and list lots of systems - we just have a single red/orange/green lightbulb PNG image and anytime it's not green, I write a brief comment as to why.
    I am planning to put this on the main page of our helpdesk so when they go to make complaints that they can't email pictures of LOL cats to their friends they can see i'm dealing with it

    Could you possibly post the code for your traffic light page?

    Im just going to put basic systems eg: Servers up and active, email, VPN.

    Matt

  6. #6

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,799
    Thank Post
    272
    Thanked 1,134 Times in 1,030 Posts
    Rep Power
    349
    Search the Forum for PHP server monitor - another open source software but requires more setting up is Zabbix.

  7. #7
    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
    See my sig

    servers.png
    Last edited by zag; 16th April 2013 at 04:08 PM.

  8. #8

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,921
    Thank Post
    860
    Thanked 1,431 Times in 984 Posts
    Blog Entries
    47
    Rep Power
    614
    Quote Originally Posted by fairm010 View Post
    Could you possibly post the code for your traffic light page?
    Literally just this (goes in a block on our Spiceworks page)
    Code:
    <!--
    <h2>System Status: Critical</h2>
    <p>
    	<img align="left" src="http://ws0:9675/portal/logo/redLight.png" alt="Red Light" />
    	One of our new file servers has just developed a problem; logging out and in again will switch you onto the backup server and you will be able to continue
    </p>
    -->
    <!--
    <h2>System Status: Warning</h2>
    <p>
    	<img alt="Amber Light" align="left" src="http://ws0:9675/portal/logo/amberLight.png" />
    	The email server is currently powered down for a hardware replacement; it should be up again by 16:45.
    </p>
    -->
    
    <h2>System Status: Normal</h2>
    <p>
    	<img alt="Green Light" align="left" src="http://ws0:9675/portal/logo/greenLight.png" />
    	All systems working fine.
    </p>
    (now you know the last two major problems we had here as well)

    The three images are attached, not that they're much special.
    Attached Images Attached Images

  9. #9

    unixman_again's Avatar
    Join Date
    Nov 2011
    Posts
    678
    Thank Post
    26
    Thanked 137 Times in 104 Posts
    Rep Power
    134
    Here's a bit of code I came up with the other day which might help
    PHP Code:
    <?php
    /*
    # check server status (replaces servers alive)
    # relies on https://github.com/geerlingguy/Ping
    # relies on http://www.leefindlow.com/projects/server-status/
    */

    require_once('Ping.php');
    include(
    'ServerStatus.class.php');

    # servers to check
    #                                    hostname                  function                   services to check  
    $cfg['servers'][0] = array('host' => 'sisko''description' => 'Main Website''ports' => '80,143,3306');
    $cfg['servers'][1] = array('host' => 'odo',   'description' => 'Moodle',       'ports' => '80,3306');
    $cfg['servers'][2] = array('host' => 'kim',   'description' => 'Media',           'ports' => '80');

    # services table
    #                                     service                 port                   service description
    $cfg['services'][0] = array('name' => 'Web Server',    'port' => 80,     'description' => 'Web server, such as Apache');
    $cfg['services'][1] = array('name' => 'SSH',        'port' => 22,     'description' => 'Secure SHell service is running for remote access');
    $cfg['services'][2] = array('name' => 'MySQL',        'port' => 3306,    'description' => 'MySQL database server');
    $cfg['services'][3] = array('name' => 'SMTP',        'port' => 25,    'description' => 'Mail server (SMTP)');
    $cfg['services'][4] = array('name' => 'FTP',        'port' => 21,    'description' => 'FTP server running to allow file transfers');
    $cfg['services'][5] = array('name' => 'Telnet',        'port' => 23,    'description' => 'Telnet server running to allow (unsecure) remote access');
    $cfg['services'][6] = array('name' => 'POP',        'port' => 110,    'description' => 'Mail server (POP)');
    $cfg['services'][7] = array('name' => 'IMAP',        'port' => 143,    'description' => 'Mail server (IMAP)');

    $ping = new Ping('127.0.0.1');                                                            // initialise ping
    $ss = new ServerStatus();                                                                // initialise server status
    $detail false;
    $detail $_GET['detail'];
    ?>

    <style type="text/css" media="all">
    .resultstable{border-collapse:collapse;}
    .resultstable td,.resultstable th{
        padding:10px;
    }
    .resultstable tr:hover .name,.resultstable tr:hover .description{
        background-color:#ddd;
        -webkit-transition:all 0.8s;
    }
    .host{background-color:#768da9;}
    .bg-red{background-color:#F33;}
    .bg-green{background-color:#3F3;}
    </style>

    <table class="resultstable">
    <tbody>

    <?php
    foreach($cfg['servers'] as $server) {
        
    $ping->setHost($server['host']);                                                    // check server is up
        
    $latency $ping->ping('socket');
        echo 
    '<tr>';
        echo 
    '<td class="host">' $server['host'] . '</td>';
        echo 
    '<td class="host">'.$server['description'].'</td>';
        if (
    $latency) {
            echo 
    '<td class="bg-green">Up</td>';
        } else {
            echo 
    '<td class="bg-red">Down</td>';
        }
        echo 
    '</tr>';
        if (
    $detail) {
        if (
    $latency) {                                                                        // server up, check services
            
    $ports explode(',',$server['ports']);
            foreach(
    $ports as $port) {
                foreach(
    $cfg['services'] as $service) {                                        // locate each service in table
                    
    if ($port == $service['port']) {
                        echo 
    '<tr>';
                        echo 
    '<td class="name">' $service['name'] . '</td>';
                        if (
    $ss->checkServer($server['host'], $service['port'])) {
                            echo 
    '<td class="bg-green">Ok</td>';    
                        } else {
                            echo 
    '<td class="bg-red">Fail</td>';
                        }
                        echo 
    '<td class="description">' $service['description'] . '</td>';
                        echo 
    '</tr>';
                    }
                }
            }
        }
        echo 
    '<tr><td colspan="3"><hr></td></tr>';
        }
    }
    ?>

    </tbody>
    </table>

  10. #10
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45
    @zag That is brilliant, ive wanted something like that for myself to quickly see the status of things, thankyou!
    @sonofsanta That is exactly what I want, ill use that. Thankyou!

  11. #11
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45
    @zag Ive got that setup and working. Does it refresh automatically? If a server was to go down would it pick it up straight away or would a refresh be needed?

  12. #12
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45
    Right! After some headbanging and HTML lessons ive knocked this up!

    Its a combination of both Zag's code and Sonofsantas code. I think its quite good!

    Capture.PNG

    Tell me what you think!

    Matt

  13. #13
    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
    Quote Originally Posted by fairm010 View Post
    @zag Ive got that setup and working. Does it refresh automatically? If a server was to go down would it pick it up straight away or would a refresh be needed?
    No its doesn't refresh automatically, but someone posted some code in the original thread to do that.

    Looks great

  14. #14
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,134
    Thank Post
    47
    Thanked 146 Times in 128 Posts
    Rep Power
    45
    Thanks Zag, I've already put some in. Thanks for the great bit of code!!

  15. #15
    Mcshammer_dj's Avatar
    Join Date
    Feb 2007
    Location
    Portsmouth
    Posts
    928
    Thank Post
    35
    Thanked 160 Times in 129 Posts
    Rep Power
    93
    I use skipole here and it really is simple to use and gives a similar ability to monitor

    skipole-monitor - A simple network monitor with built in web server - Google Project Hosting

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. PHP/HTML Script to show system status.
    By danrhodes in forum General Chat
    Replies: 5
    Last Post: 9th March 2013, 06:20 PM
  2. Alternatives to tracking repair status on student system
    By nereik23 in forum How do you do....it?
    Replies: 0
    Last Post: 12th July 2012, 02:40 AM
  3. Replies: 0
    Last Post: 13th March 2011, 04:13 PM
  4. Front page layout - school status slipped
    By speckytecky in forum EduGeek Joomla 1.5 Package
    Replies: 6
    Last Post: 9th December 2009, 09:12 AM
  5. Replies: 10
    Last Post: 10th October 2005, 06:46 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
  •