exploiting web publishing

Upload: zafrin-memon

Post on 09-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Exploiting Web Publishing

    1/26

  • 8/7/2019 Exploiting Web Publishing

    2/26

  • 8/7/2019 Exploiting Web Publishing

    3/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks

    Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    3

  • 8/7/2019 Exploiting Web Publishing

    4/26

    Introduction

    Web-based reporting is the information delivery

    standard

    Out-of-the box advantages over paper publishing:

    Timeliness - delivery can be virtually instantaneous

    Universal accessibility - no need to predefine recipients

    Dynamic - content can be modified at any time Interactive access - users can select subsets of data

    Environmentally friendly - saves trees!

    4

  • 8/7/2019 Exploiting Web Publishing

    5/26

    Introduction

    But, merely converting existing paper reports to web

    format (e.g. HTML or GIF files) is NOT sufficient:

    The increased exposure to increasingly sophisticated internetcontent has raised user expectations of usability

    The volume of performance reports in a distributed

    environment with hundreds of servers requires:

    An efficient user interface for navigating to specific content

    A method for identifying exceptions & thresholds

    A method for drilling down to increasing levels of detail

    A help facility to define & explain reports & metrics

    5

  • 8/7/2019 Exploiting Web Publishing

    6/26

    Introduction

    Assumptions:

    You dont have the luxury of assigning or hiring an experienced

    web application developer to design and implement aperformance reporting application

    The volume of your data & capabilities of your

    hardware/software preclude dynamic report generation

    You have a basic understanding of programming principles

    You have some experience with SAS programming You have some experience with VBScript programming (optional)

    6

  • 8/7/2019 Exploiting Web Publishing

    7/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks

    Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    7

  • 8/7/2019 Exploiting Web Publishing

    8/26

    Environment

    400+ monitored NT servers:

    File (54), Print (46), Domain Control (61), SMS (41),

    MSExchange (80), Shared Apps (47), RAS (16), LotusNotes (14), SAP (17), Misc Apps (24)

    22 HP-UX servers & 14 Sun Servers

    Performance Data Repository is SAS IT Service Vision

    Data collectors are NTSMF (DataCore Software) & Measureware(HP)

    Hardware: HP-UX K430, 4 CPUs, 768 MB memory, 13 GB

    disk space

    8

  • 8/7/2019 Exploiting Web Publishing

    9/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks

    Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    9

  • 8/7/2019 Exploiting Web Publishing

    10/26

    Frame-based pages for reports

    The frame wars are over

    Frames provide an excellent UI structure for report retrieval

    Form with selection criteria in one frame

    Report output in second frame

    User navigational interaction is kept to a minimum

    Sample frameset syntax:

    Sample form syntax:

  • 8/7/2019 Exploiting Web Publishing

    11/26

    Frame-based pages for reports

    Best practices:

    Establish a strict naming pattern for report files, to minimizecomplexity of server scripts. Example:

    servertype.servername.reporttype.interval.outputtype Use the report output frame to display useful information when the

    page is first displayed, e.g. a high-level summary report or a helppage that explains report contents or selection criteria.

    Minimize the screen real estate used by the report selection frameto maximize the viewing area for reports.

    Include a link to the site home page & to a help page in the reportselection frame.

    If you have multiple report framesets, include links to them in thereport selection frame (use javascript routines to createdropdowns).

    11

  • 8/7/2019 Exploiting Web Publishing

    12/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    12

  • 8/7/2019 Exploiting Web Publishing

    13/26

    Exception reporting / hyperlinks

    Exception Report Design

    Large number of servers in a distributed environment

    makes exception reporting imperative.

    Try to design exception reports so that all exceptions

    appear on a single web page.

    Highlight exceptions that exceed thresholds (e.g. by

    color-coding) so that they stand out clearly.

    Provide hyperlinks to detailed reports that provide

    additional data on exceptions (length, severity,

    potential causes, etc.)

    13

  • 8/7/2019 Exploiting Web Publishing

    14/26

    Exception reporting /hyperlinks

    SAS HTML Data Set Formatter

    SAS HTML Data Set Formatter converts SAS data into html tables.

    Invoked via %ds2htm macro call.

    Specify input SAS data set, output html file, variables to display in table &optional formatting parameters.

    Example: %ds2htm(htmlfile=abc.exceptions.20001231.html,

    data=mysas.exception.data,

    var=server1 metric1 server2 metric2 server3 metric3,

    clsize=1, vsize=1, caption=Server Exception Report) Complete documentation at

    http://www.sas.com/rnd/web/intrnet/format/index.html

    14

  • 8/7/2019 Exploiting Web Publishing

    15/26

    Exception reporting /hyperlinks

    Embedding hyperlinks

    Build SAS variables formatted into html hyperlink syntax.

    Syntax is text string.

    Set length of SAS variable to a large value (e.g. 90).

    Concatenate literal strings to variables, e.g.:

    cellval= || servname || ;

    If a SAS macro variable needs to be followed by a period, you need to

    insert an extra period, e.g. %pfx.. Use the SAS trim function to remove trailing blanks.

    15

  • 8/7/2019 Exploiting Web Publishing

    16/26

    Exception reporting /hyperlinks

    Highlighting thresholds

    Same method as embedding hyperlinks - build SAS variables that

    contain html syntax for specifying color properties. Syntax for specifying font color is

    Test threshold value when building variables:

    if thresh=0 then exval = put(val,7.2);

    else exval = || put(val, 7.2) || ;

    The SAS putfunction formats numeric variables as character

    strings.

    If you dont assign a , the default font color for that

    page is used.

    16

  • 8/7/2019 Exploiting Web Publishing

    17/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    17

  • 8/7/2019 Exploiting Web Publishing

    18/26

    Server health reporting

    Server Health Report Design

    Green light, yellow light, red light paradigm:

    Green = Normal range, no action required Yellow = Exceeds normal range, but may be acceptable

    Red = Extreme range, should be investigated

    Metrics for availability, processor utilization, available memory, &disk space.

    Analyze your own historical data to determine thresholds & be

    prepared to tune & adjust if necessary. If you have a lot of redlights, either youre in serious trouble or your thresholds are notset correctly!

    Metrics are hyperlinks to detailed reports; column headings are

    hyperlinks to metric definitions (javascript popups).

    18

  • 8/7/2019 Exploiting Web Publishing

    19/26

    Server health reporting

    Coding techniques

    Due to cell-coloring logic & javascript popups, we cant use the

    %ds2htm macro - so we use standard SAS put statements instead.

    Output file is .asp, to allow server-side includes.

    Include syntax:

    Select/when statements are used to test metric values, determine

    what color cells should be, & build variables.

    Syntax for hyperlinking to a javascript function:

    text string Javascript function definition must be placed above the function call!

    19

  • 8/7/2019 Exploiting Web Publishing

    20/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    20

  • 8/7/2019 Exploiting Web Publishing

    21/26

    Server configuration queries

    Server Configuration Query Design

    Be able to answer questions such as:

    What are the hardware/software configurations of a class of servers?

    Are there any servers that havent been upgraded to Service Pack n?

    Which servers are configured with over 1 GB of memory?

    Can use flat file or database table.

    Use form input boxes to allow text or numeric input.

    Pre-fill with values that retrieve all servers IF thats practical.

    Allow case-insensitive input.

    Disregard leading or trailing blanks.

    21

  • 8/7/2019 Exploiting Web Publishing

    22/26

    Server configuration queries

    Form Processing Coding Hints

    Form input statement syntax:

    Text: input type=text size=n maxlength=n name=fieldname

    Numeric: input type=number size=n maxlength=n value=nname=fieldname Processing form input in Active Server Pages / VBScript:

    To read values:

    x=Request.Form(fieldname)

    To eliminate trailing/leading blanks & convert to upper

    case:x=Trim(Ucase(Request.Form(fieldname)))

    To test for numeric input:

    if not IsNumeric(x) then ...

    22

  • 8/7/2019 Exploiting Web Publishing

    23/26

    Server configuration queries

    File Processing Coding Hints

    To open a file for processing:

    SetSobj=Server.Create.Object(Scripting.FileSystemObj

    ect)

    Set

    Sfil=sobj.OpenTextFile(ServerMapPath(your.file))

    To read data from a file:

    SrvTemp=sfil.ReadLine

    SrvVar=Split(OneRec,,,-1,1)

    To test for presence of a character string:

    if Instr(1,SrvVar(0),SrvString,1) > 0 then ... 23

  • 8/7/2019 Exploiting Web Publishing

    24/26

    Server configuration queries

    File Processing Coding Hints

    To close a file:

    Sfil.Close Next two statements free memory & system resources - very

    important!

    Set Sfil=Nothing

    Set Sobj=Nothing

    To send all the generated output to the browser:

    Response.Flush

    Needed only if Response.Buffer=True was set.

    Response buffering is recommended in most cases

    to optimize network transmission.24

  • 8/7/2019 Exploiting Web Publishing

    25/26

    AGENDA

    Introduction

    Environment

    Using frame-based pages for report retrieval

    Exception reporting with embedded hyperlinks Server health reporting using color-coded table cells

    Server configuration reporting with query capability

    Summary

    25

  • 8/7/2019 Exploiting Web Publishing

    26/26

    Summary

    Internet publishing of performance data has

    some intrinsic advantages.

    With a little thought & effort, its possible todesign reports & report interfaces that

    enhance

    the user experience.

    You dont need to be a professional web

    developer - even performance analysts

    can do it!26