Paul,

 

Here is a template we use.   No server names on the “lights”, but 
clicking on one brings up details.

You need to create a few 10x20 pixel jpg files – each of just a solid 
color and put them in the html output location:

 

RUNNING.jpg   - Green

DOWN.jpg   - Red

MAINTENANCE.jpg   - Yellow

UNAVAILABLE.jpg – cyan

UNCHECKED.jpg  - purple

 

 

 

<html>

<head>

<meta http-equiv="refresh" content="40"> 

</head>

<body><center><a href='http://{URL2SASERVERHERE}:4310/status'>[LIST] </a>-

<sa_currentlongdate> - <sa_currentlongtime> 

<A href="#" 
onclick="javascript:keywindow=window.open('key','ITStatusKey','width=600,height=280,toolbar=No,location=No,scrollbars=yes,resizable=Yes');

keywindow.document.write('<table border=1 colspacing=2 width=100%>');

 

keywindow.document.write('<TH> </TH><TH>Status</TH><TH>Description</TH></TR>');

keywindow.document.write('<TR><TD><img src=RUNNING.jpg width=10 
heigth=20></TD><TD>UP</TD>');

keywindow.document.write('<TD>System CHECK was performed. No problems 
detected.</TD></TR>');

 

keywindow.document.write('<TR><TD><img src=DOWN.jpg width=10 
heigth=20></TD><TD>DOWN</TD>');

keywindow.document.write('<TD>Check was performed. Problems 
detected.</TD></TR>');

 

keywindow.document.write('<TR><TD><img src=MAINTENANCE.jpg width=10 
heigth=20></TD><TD>MAINT</TD>');

keywindow.document.write('<TD>System was NOT checked due to maintenance 
flag.</TD></TR>');

 

keywindow.document.write('<TR><TD><img src=UNAVAILABLE.jpg width=10 
heigth=20></TD><TD>UNAVAILABLE</TD>');

keywindow.document.write('<TD>System was not checked because it is dependent on 
another check which is DOWN, in MAINT or UNCHECKED.</TD></TR>');

 

keywindow.document.write('<TR><TD><img src=UNCHECKED.jpg width=10 
heigth=20></TD><TD>UNCHECKED</TD>');

keywindow.document.write('<TD>System was not checked yet.  Mostly likely it is 
not scheduled to run every cycle.  Status is UNKNOWN.</TD></TR>');

keywindow.document.write('</TABLE>');

keywindow.document.write('Click on specific indicator in main window to get 
additional information.<BR>Can also hover with mouse for tool-tip info.');

keywindow.document.write('<a onclick=javascript:window.close(); href=>click 
here to close</a><BR>');

return false;

">[key]</a>

<BR>

<sa_report>

 

<img src="<SA_STATUS>.jpg" width=10 heigth=20 

alt="<SA_prettyname> is <sa_status> since <sa_statuschangedate> 
<sa_statuschangetime>"

onclick="javascript:newwindow=window.open('',<sa_uid>,'width=500,height=400,toolbar=No,location=No,scrollbars=yes,resizable=Yes');

 

newwindow.document.write('<table border=0 colspacing=2 width=100%><tr><td 
align=center bgcolor=');

newwindow.document.write('<SAIF SA_STATUS IS UP>#00FF00</SAIF>');

newwindow.document.write('<SAIF SA_STATUS IS DOWN>#FF0000</SAIF>');

newwindow.document.write('<SAIF SA_STATUS IS MAINTENANCE>#c1c21c</SAIF>');

newwindow.document.write('<SAIF SA_STATUS IS UNAVAILABLE>#66bbFF</SAIF>');

newwindow.document.write('<SAIF SA_STATUS IS UNCHECKED>#800080</SAIF>');

 

newwindow.document.write('><sa_status>: <sa_prettyname></td></tr></table>');

 

newwindow.document.write(' <sa_prettyname> [<sa_hostname>] is <sa_status>.');

newwindow.document.write(' since <sa_statuschangedate> <sa_statuschangetime>. 
');

 

newwindow.document.write('<TABLE border=1 colspacing=2><TR><TH COLSPAN=3> Stats 
for server</TH></TR>');

<SAIF SA_CHECK NOT EXTERNAL AND SA_CHECK NOT 
SQL>newwindow.document.write('<TR><TD>Check response:</TD><TD COLSPAN=2> 
<sa_checkresponse></TD></tr>');</SAIF>

newwindow.document.write('<Tr><TD colspan=2>Total number of checks:</td><td> 
<sa_stats_totalcycles></td></tr>');

newwindow.document.write('<tr><td>Number of UP cycles: 
</td><td><sa_stats_upcycles></td><td>  <sa_stats_uptime></td></tr>');

newwindow.document.write('<tr><td>Number of DOWN cycles: 
</td><td><sa_stats_downcycles></td><td>  <sa_stats_downtime></td></tr>');

newwindow.document.write('<tr><td>Number of MAINT cycles:</td><td> 
<sa_stats_maintenancecycles></td><td><sa_stats_maintenancetime></td></tr>');

newwindow.document.write('</table>');

 

newwindow.document.write('<TABLE border=1 colspacing=2><TR><TH COLSPAN=2> Test 
Performance</TH></TR>');

newwindow.document.write('<TR><TD>Average Response Time</TD><TD> 
<sa_stats_avgrtrip></TD>');

newwindow.document.write('<Tr><TD>MAX Response Time</td><td> 
<sa_stats_maxrtrip></td></tr>');

newwindow.document.write('<tr><td>MIN Response Time</td><td> 
<sa_stats_minrtrip></td></tr>');

newwindow.document.write('<tr><td colspan=2>Host ID: <sa_hostid> - UID: 
<sa_UID></td></tr>');

newwindow.document.write('</table><CENTER>');

 

newwindow.document.write('<a onclick=javascript:window.close(); href=>click 
here to close</a><BR>');

 

newwindow.document.write('<i>Note:  This window does not 
refresh!</i></center>');

">

 

 

</sa_report>

</center>

</body>

</html>

 

 

 

-Tom

 

 

 

From: Servers Alive Discussion List [mailto:salive@woodstone.nu] On Behalf Of 
Goretti, Paul
Sent: Tuesday, January 06, 2015 7:56 AM
To: Servers Alive Discussion List
Subject: RE: [SA-list] Simple Web Output

 

Hi Erkan,

 

Many thanks for this!  I will have a look this afternoon.

 

Regards

 

Paul

 

From: Servers Alive Discussion List [mailto:salive@woodstone.nu 
(mailto:salive@woodstone.nu)] On Behalf Of Erkan Öztürk
Sent: 06 January 2015 12:31
To: Servers Alive Discussion List
Subject: RE: [SA-list] Simple Web Output

 

Hi Paul,

 

 

This is my template index html file.  If you use this template, you can see the 
Down server at top of the table as red colored row.

 

 

 

 

<html>

                <HEAD>

                <TITLE>Server Monitor</TITLE>

                <meta http-equiv="refresh" content="30">

             <meta http-equiv="content-type" content="text/html;charset=utf-8" 
/>

      

 <!--This section is zebra style table format. One rown is gray next one is 
white and so on --> 

               <style type="text/css">

                tr:nth-of-type(odd) { background-color:#F2F2F2;} 

                </style>

                

               <script type="text/javascript"> 

 

 

<!--This section is count down. Refresh html page every 30 second--> 

                function countdown(par){

                ctn = parseFloat(par);

                mytime=setTimeout('display_countdown()',1000)

                }

 

                function display_countdown() {

                var x = ctn ;

                document.getElementById('ct').innerHTML = x;

                ctn= ctn- 1;

                tt=countdown(ctn);

                }

 

                </script>

                

                

 

                </head>

                <BODY onload=countdown(30);>  

 

                                                                

                                <sa_report sort=status,onstatustime>

                                                <sa_groupheader>

                                                <center>

                                                <b><FONT FACE="verdana" 
size="4" color="#000000">

                                                <TABLE WIDTH="100%" BORDER=0>

                                                <TR>

                                                    

                                                                <TH 
WIDTH="25%">Your Header </TH>

                                                                <TH WIDTH="25%">

                                                                <script 
language="JavaScript">

                                                                                
                var dt = new Date();

                                                                                
                var dtd = dt.getDate();

                                                                                
                dtd = (dtd < 10)? "0" + dtd : dtd;

                                                                                
                var dtm = dt.getMonth()+1;

                                                                                
                dtm = (dtm < 10)? "0" + dtm : dtm;

                                                                                
                var dty = dt.getFullYear();

                                                                                
                var dth = dt.getHours();

                                                                                
                dth = (dth < 10)? "0" + dth : dth;

                                                                                
                var dtmm = dt.getMinutes();

                                                                                
                dtmm = (dtmm < 10)? "0" + dtmm : dtmm;

                                                                                
                var dts = dt.getSeconds();

                                                                                
                dts = (dts < 10)? "0" + dts : dts;

                                                                                
                document.write(dtd+"/"+dtm+"/"+dty+" "+dth+":"+dtmm+":"+dts);

                                                                                
                </script>

                                                                

                                                                (<span 
id='ct'></span>)

                                                                </TH>

                                                                <TH 
WIDTH="25%"><font color="blue" >Live servers: <sa_group_up_entries></font></TH>

                                                                <TH 
WIDTH="25%"><font color="red" >Dead servers: <sa_group_down_entries></font></TH>

                                                                

                                                                </TR>

                                                                </table>

                                                                <br><br></font>

                                                                </b>

                                                                

                                                                <TABLE 
WIDTH="100%" BORDER=0>

                                                                <TR>

                                                                                
<TH> Pretty Name </TH>

                                                                                
<TH> Check Description</TH>

                                                                                
<TH> Hostname</TH>

                                                                                
<TH> Check Response </TH>

                                                                                
<TH> Status </TH> 

                                                                                
<TH> Status Change Date</TH>

                                                                                
<TH> Status Change Time </TH>

                                                                                
<TH> Non Downtime </TH>

                                                                                
<TH> Downtime</TH>

                                                                </TR>

                                                </sa_groupheader>

                                                <sa_groupfooter>

                                                </TABLE>

                                                </sa_groupfooter>

                                <!&#8212;Below line is up/down coloring -- >

                                                <TR bgcolor="<saif sa_status is 
down>FF0000</saif><saif sa_status is up>FFFFFF</saif>">

                                                                <TD ALIGN=LEFT  
  WIDTH="16%">       <FONT face = "verdana" SIZE=2> <sa_prettyname></TD>

                                                                <TD ALIGN=LEFT  
  WIDTH="16%">       <FONT face = "verdana" SIZE=2> <sa_checkdescription></TD>

                                                                <TD ALIGN=LEFT  
  WIDTH="16%">       <FONT face = "verdana" SIZE=2> <sa_hostname></TD>

                                                                <TD WIDTH="16%" 
SIZE=1 ><FONT face = "verdana" SIZE=2> <center><sa_checkresponse></center></TD>

                                                                <TD WIDTH="16%" 
SIZE=1 ><FONT face = "verdana" SIZE=2> <center><sa_status></center></TD>

                                                                <TD WIDTH="5%" 
SIZE=1 ><FONT face = "verdana" SIZE=2> 
<center><sa_statuschangedate></center></TD>

                                                                <TD WIDTH="5%" 
SIZE=1 ><FONT face = "verdana" SIZE=2> 
<center><sa_statuschangetime></center></TD>

                                                                <TD WIDTH="5%" 
SIZE=1 ><FONT face = "verdana" SIZE=2> 
<center><sa_stats_nondowntime></center></TD>

                                                                <TD WIDTH="5%" 
SIZE=1 ><FONT face = "verdana" SIZE=2> 
<center><sa_stats_downtime></center></TD> 

                                                </TR>

 

                                                

                                                </sa_groupheader>

                                </sa_report>

                                <br>

                </body>

                <footer>

                                <p>These Controls  running by 
<strong><sa_said></strong> 

                                

                </footer>

</center>

</html>

 

 

 

 

 

 

 
--------------------------------------------------------------------------------





Erkan Öztürk
Sunucu Sistemleri Ve Sanallaþtýrma Baþuzmaný
Sistem Mühendisliði Bölümü

erkan.ozt...@borsaistanbul.com (mailto:erkan.ozt...@borsaistanbul.com)
T. +90 212 298 24 32
F. +90 212 298 25 00 

 

From: Servers Alive Discussion List [mailto:salive@woodstone.nu 
(mailto:salive@woodstone.nu)] On Behalf Of Goretti, Paul
Sent: Tuesday, January 06, 2015 1:11 PM
To: Servers Alive Discussion List
Subject: [SA-list] Simple Web Output

 

Hi all,

 

I'm trying to create a simple output from SA that shows the following:

 

 



SERVER 1  


                                                                                
Server1 is up

 

 



SERVER 1  

 


                                                                                
Server1 is down

 

 

 

Basically I'd like to present a simple to read up or down status on a large 
screen.  There will probably be 300 or so checks and I want to make it simple 
and obvious to see quickly which server is down.  I'm no CSS guru but maybe 
someone else has done this???

 

Appreciate any thoughts

 

 

Paul Goretti

 

ICT Officer - Infrastructure

 

3457

 

East Renfrewshire Council

Main St

BarrHead

G78 1SY

 

Your Council, Your future

 

  

To unsubscribe send a message with UNSUBSCRIBE in the subject line to 
salive@woodstone.nu (mailto:salive@woodstone.nu)
If you use auto-responders (like out-of-the-office messages), make sure that 
they are not sent to the list nor to individual members. Doing so will cause 
you to be automatically removed from the list.



To unsubscribe send a message with UNSUBSCRIBE in the subject line to 
salive@woodstone.nu (mailto:salive@woodstone.nu)
If you use auto-responders (like out-of-the-office messages), make sure that 
they are not sent to the list nor to individual members. Doing so will cause 
you to be automatically removed from the list. 

This email has been scanned. 

  

To unsubscribe send a message with UNSUBSCRIBE in the subject line to 
salive@woodstone.nu (mailto:salive@woodstone.nu)
If you use auto-responders (like out-of-the-office messages), make sure that 
they are not sent to the list nor to individual members. Doing so will cause 
you to be automatically removed from the list.

To unsubscribe send a message with UNSUBSCRIBE in the subject line to 
salive@woodstone.nu
If you use auto-responders (like out-of-the-office messages), make sure that 
they are not sent to the list nor to individual members. Doing so will cause 
you to be automatically removed from the list.

Reply via email to