For a list of most of the tags (not including some that have been added
in beta versions), you can look at the SA manual, also available online
here:

http://www.woodstone.nu/salive/doc/html/

The way you're trying to use the <sa_group_name> tag won't work because
the <sa_group_name> tag is only valid inside a group header.  Here's how
to modify the code to make it work (although I didn't test it):

  <sa_report sort=status>
<sa_group_header>
<%
'determine group from sa_group, and save it to a string
strGroupName = UCase("<sa_group_name>")
%>
</sa_group_header>
<%
'determine group from sa_group
If strGroupName = "BASINGSTOKE" THEN
        'Add to BS Counters
%>
        <SAIF SA_STATUS IS UP><%BSUP=BSUP+1%></SAIF>
        <SAIF SA_STATUS IS DOWN><%BSDOWN=BSDOWN+1%></SAIF> <% ELSE If
strGroupName = "DATACENTRE" THEN
        'Add to DC Counters
%>
        <SAIF SA_STATUS IS UP><%DCUP=DCUP+1%></SAIF>
        <SAIF SA_STATUS IS DOWN><%DCDOWN=DCDOWN+1%></SAIF> <% END IF




--------------------------------
Brent Ozar - UniFocus
--------------------------------
"Fall is my favorite season in Los Angeles,
 watching the birds change color and fall from the trees."
      David Letterman

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Quinn
Sent: Tuesday, October 28, 2003 7:42 AM
To: '[EMAIL PROTECTED]'
Subject: [SA-list] sa_group_name variable problems...

Afternoon all.

We are using ServerAlive 4.0.1376 and I have been drafted to update the
HTML-output template. I have searched the listserv and cannot find two
things....

1. a list of all the tags and what they represent 2. a solution to my
problem listed below....

        I am atempting to provide a summary at the bottom of the page to
list how many servers are up and how many are down at each of our two
sites.
For each loop through the sa_report I include the following...

  <sa_report sort=status>
<%
'determine group from sa_group
If UCase("<sa_group_name>") = "BASINGSTOKE" THEN
        'Add to BS Counters
%>
        <SAIF SA_STATUS IS UP><%BSUP=BSUP+1%></SAIF>
        <SAIF SA_STATUS IS DOWN><%BSDOWN=BSDOWN+1%></SAIF> <% ELSE If
UCase("<sa_group_name>") = "DATACENTRE" THEN
        'Add to DC Counters
%>
        <SAIF SA_STATUS IS UP><%DCUP=DCUP+1%></SAIF>
        <SAIF SA_STATUS IS DOWN><%DCDOWN=DCDOWN+1%></SAIF> <% END IF

        ...in order to add 1 to the relevant counter for use at the
bottom of the page. In other sections of my code directly below this
fields such as <sa_prettyname> are being correctly replaced by the sa
parsing engine, bit for some reason the <sa_group_name> variable is not
being replaced and is therefore stopping this from working.

Any suggestions on why it is not working?

My initial thoughts are that the group_name variable is not available
except in a groupheader? If this is the case how can I access the group
name from within each report element? Is there a manner other than this
in which a group-header can contain count information for up and down
servers? If not - may be a good feature to add!

I would appreciate any help you could suggest.

Kind regards,

Matt Quinn
------------------------------------------------------------------------
---------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.

If you have received this email in error please notify the originator of
the message. This footer also confirms that this email message has been
scanned for the presence of known computer viruses.

Any views expressed in this message are those of the individual sender,
except where the sender specifies and with authority, states them to be
the views of Electronic Media Ltd.


To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive


To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive

Reply via email to