Here's the hack, apologies to Dave Habben.
It adds a link back to the topview page, It refreshes. Look for the spot to alter for the name of your WUG machine.
I blatantly copied Dave's stuff and repeated the test looking for downed service.
Note that the counter for down time for a service WILL ALWAYS BE ZERO.
It's attached as down.txt, rename to down.asp, put in the web directory and then create a link from topview to it.
I do that in the mainpage prefix file.
Jay
At 11:53 AM 2/27/2003 -0600, you wrote:
Jay,
Can you share your "hack" so we can see how you plugged it in?
-----Original Message----- From: Jay Drew [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 3:33 PM To: [EMAIL PROTECTED] Subject: Re: [WhatsUp Forum] Return codes of <%DEVICE% STATE>
The syntax is a little off, but you got me on the right track. Got it hacked in, it doesn't have the down time capability that the lost pings do, but it gets me very close.
Thanks.
Jay
At 03:11 PM 2/26/2003 -0500, you wrote: >Just to check could you do something like: > ><%IF% (%GREATERTHAN% (MONITOR_DOWN_COUNT,0))> > > The device has a service down > ><%endif%> > >I havn't check my syntax... >~Brian > > >----- Original Message ----- >From: "Jay Drew" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, February 26, 2003 2:47 PM >Subject: [WhatsUp Forum] Return codes of <%DEVICE% STATE> > > > > Someone have the codes that get returned for the <%DEVICE% STATE> tag? > > > > I am trying to improve (butcher) the table version of the Scrolling Marqee > > that Dave Habben made (and a nice piece of work it is). > > > > The problem is the <IS_DEVICE_UP> doesn't cover services. I'd like to >hack > > his test to so a missed ping or service test is considered down. > > > > I've figured out that 0 = UP, 7 = Not Tested, 6 looks like a failed >service. > > > > Thanks. > > > > Jay Drew > > [EMAIL PROTECTED] > > > > > > Please visit http://www.ipswitch.com/support/mailing-lists.html > > to be removed from this list. > > > > An Archive of this list is available at: > > http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/ > > > > >Please visit http://www.ipswitch.com/support/mailing-lists.html >to be removed from this list. > >An Archive of this list is available at: >http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list.
An Archive of this list is available at: http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list.
An Archive of this list is available at: http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
<!-- Original file by Dave Habben. Additional hacks to add service (w/o counters) by Jay Drew -->
<HEAD>
<TITLE>Name of Your WUG Machine Here - Down Page</TITLE>
<META http-equiv=REFRESH content="<%APPLICATION_SETTINGS% WEB_REFRESH_RATE>">
</HEAD>
<table border>
<tr >
<td bgcolor="#c0c0c0" bordercolor="#c0c0c0"> <a href="default.asp">Top View
</td></a>
</table>
<table cellSpacing=0 cellPadding=3 width="98%" bgColor="#c0c0c0" border=2>
<tr>
<td align=left colSpan=2>
<table width="100%" border=0>
<tr>
<td>Down Devices</td>
</tr>
</table>
</td>
</tr>
<tr>
<td vAlign=top width="98%">
<table cellspacing="2" cellpadding="0" width="100%" bgcolor="#c0c0c0" border="0">
<tbody>
<tr>
<td width="12%"></td>
<td width="23%"></td>
<td width="15%"></td>
<td width="25%"></td>
<td width="25%"></td>
</tr>
<tr>
<th align="left">Map</th>
<th align="left">Device</th>
<th align="left">Down Time</th>
<th align="left">Info2</th>
<th align="left">Notes</th>
</tr>
<%START_LOADED_MAP_LIST%>
<%START_DEVICE_LIST%>
<%IFNOT% IS_DEVICE_UP>
<TR>
<TD><a href="map.asp?map=<%URL_ENCODE% (%MAP% FILENAME)>">
<%MAP% NAME> </A></TD>
<TD>
<%IF% (%LESSTHAN% (%DEVICE% CURRENT_DOWN_COUNT, 2))>
<a href=device.asp?map=<%MAP%
FILENAME>&device=<%DEVICE%
UNIQUE_ID>><FONT COLOR=GREEN><%DEVICE%
DISPLAY_NAME></FONT></a>
<%ELSEIF% (%LESSTHAN% (%DEVICE% CURRENT_DOWN_COUNT,
4))>
<a href=device.asp?map=<%MAP%
FILENAME>&device=<%DEVICE%
UNIQUE_ID>><FONT COLOR=YELLOW><%DEVICE%
DISPLAY_NAME></FONT></a>
<%ELSE%>
<a href=device.asp?map=<%MAP%
FILENAME>&device=<%DEVICE%
UNIQUE_ID>><FONT COLOR=RED><%DEVICE%
DISPLAY_NAME></FONT></a>
<%ENDIF%>
</TD>
<TD>
<SCRIPT LANGUAGE="JavaScript">
var downtime = "<%DEVICE% POLL_FREQUENCY>"*"<%DEVICE%
CURRENT_DOWN_COUNT>"*"<%MAP% POLL_INTERVAL>"
if (downtime > 3599) {
var downtemp = downtime/3600;
var downhours = Math.floor(downtemp);
var downtemp = downhours*3600;
var downminutes = downtime-downtemp;
var downminutes = Math.floor(downminutes/60);
}
else {
var downhours = 0;
var downminutes = Math.floor(downtime/60);
}
if (downhours == 0)
document.write(downminutes + " min")
else
document.write(downhours + " hr : " +
downminutes + " min")
</SCRIPT>
</TD>
<TD><%DEVICE% INFO_LINE_2></TD>
<TD><%DEVICE% NOTES></TD>
</TR>
<%ENDIF%>
<%IF% IS_DEVICE_UP>
<%IF% (%GREATERTHAN% (%DEVICE% MONITOR_DOWN_COUNT,0))>
<TR>
<TD><a href="map.asp?map=<%URL_ENCODE% (%MAP% FILENAME)>">
<%MAP% NAME> </A></TD>
<TD>
<%IF% (%LESSTHAN% (%DEVICE% CURRENT_DOWN_COUNT, 2))>
<a href=device.asp?map=<%MAP%
FILENAME>&device=<%DEVICE%
UNIQUE_ID>><FONT COLOR=GREEN><%DEVICE%
DISPLAY_NAME></FONT></a>
<%ELSEIF% (%LESSTHAN% (%DEVICE% CURRENT_DOWN_COUNT,
4))>
<a href=device.asp?map=<%MAP%
FILENAME>&device=<%DEVICE%
UNIQUE_ID>><FONT COLOR=YELLOW><%DEVICE%
DISPLAY_NAME></FONT></a>
<%ELSE%>
<a href=device.asp?map=<%MAP%
FILENAME>&device=<%DEVICE%
UNIQUE_ID>><FONT COLOR=RED><%DEVICE%
DISPLAY_NAME></FONT></a>
<%ENDIF%>
</TD>
<TD>
<SCRIPT LANGUAGE="JavaScript">
var downtime = "<%DEVICE% POLL_FREQUENCY>"*"<%DEVICE%
CURRENT_DOWN_COUNT>"*"<%MAP% POLL_INTERVAL>"
if (downtime > 3599) {
var downtemp = downtime/3600;
var downhours = Math.floor(downtemp);
var downtemp = downhours*3600;
var downminutes = downtime-downtemp;
var downminutes = Math.floor(downminutes/60);
}
else {
var downhours = 0;
var downminutes = Math.floor(downtime/60);
}
if (downhours == 0)
document.write(downminutes + " min")
else
document.write(downhours + " hr : " +
downminutes + " min")
</SCRIPT>
</TD>
<TD><%DEVICE% INFO_LINE_2></TD>
<TD><%DEVICE% NOTES></TD>
</TR>
<%ENDIF%>
<%ENDIF%>
<%END_DEVICE_LIST%>
<%END_LOADED_MAP_LIST%>
</tbody>
</table>
</td>
</tr>
</table>
