Quantcast
Channel: Symantec Connect - Téléchargements
Viewing all articles
Browse latest Browse all 322

{CWoC} Software Delivery Execution Trending

$
0
0

Introduction

Depending on your environment Software Delivery Executions are taking place many times a day, ranging from a few hundred to ten's of housand. You can review the Software Delivery Execution per policy on the Symantec Management Platform via reports, however there is no easy way to evaluate how well or bad a deployment is going over time (or find out if any deployment is encountering issue).

This tool will provide you with access to such data. The aim here is simple: provide a quick and easy to browse web-site with hourly execution charts showing  success, errors and total counts over times.

Top

Design

I like to keep my design minimalistics, so not unlike Patch Trending [1] or aila2 [2], this tool is based on a back-end executable that must run on the server (using a Symantec Administrator account) and a web-front end that consumes the data generated by the back end.

In this specific tool, the back end is named "SWDExecTrending.exe" and produces a javascript file (in fact it outputs the data to stdout, and we save it by redirecting the output to a file) that is later consumed by a web-apge named "index.html". The javascript should be named "trending_data.js" and stored in the same directory as the index.html file.

The User Interface is a minimalistic web-page that consumes the javascript data and draw trending charts from the hourly tables. As usual it is based on the Google Chart API [3].

Top

Usage

SWDExecTrending.exe

SWD Execution Trending - JavaScript builder, version 1
Usage:

    Invoke this tool with no command line arguments. It will automatically read
    the content of EvT_AeX_SWD_Execution and will produce a JavaScript string
    to stdout.

    The javascript defines a global variable named object_count that matches the
    count of Policy Execution for which trending data was generated (100 max).

    Each policy execution trend data will match the following outline:

        var top_n = { // where n is the row id
            "name" : "",
            " stats" : {
                "hourly" : [
                    ["Date", "Total", "Success", "Error"],
                    [ ... ], // Hourly statistics for the Policy
                    [ ... ],
                    [ ... ]
                ]
            }
        }

    The policies are order by execution count in descending order, limited to
    100 at most. The SQL was adjusted to take care of special cases:

        * Data that indicates the Policy execution took place in the future
            is not included
        * Data going back more than 30 days is not included

    The first is to avoid computers that are operating with an invalid date
    from disrupting the trend graphs, the later is to avoid computers coming
    back from long period of inactivity from disrupting the trend graphs (this
    is especially needed for SWD policies such as the "Windows System Asses-
    -sment Scan" that is largely deployed and almost always running on
    computers.

    The program returns 0 if it produces any JavaScript output.
    The program returns 1 if it prints out command line help or version message.
    The program returns -1 if the user is not member of the Altiris Administrator group.

Top

Index.html

You can either use index.html directly (double-clicking it to open it with your favourite web-browser) or via a web page. We'll details the later use now.

As previously describe the index.html file must be located in the same directory as the trending_data.js file. You can put both of these in a folder, for example "C:\inetpub\wwwwroot\SWDTrending".

Then you need to make sure in IIS that index.html is accepted as a default document.

Once this is done you can navigate to http://localhost/swdtrending/ and you should be able to browse thru you SWD Execution trending site! If the page refuses to load make sure you can access it directly: http://localhost/swdtrending/index.html.

Top

Navigation

With a maximum of 100 charts to display it was ot possible to put all charts into a single page (well, it is possible but it would not be wise, as generating the charts in Internet Explorer is done in one pass and then rendering takes place) [4].

As such we need to use page navigation, and to keep the design as simple as possible and as fluid (i.e. with the need to scroll left and right to navigate I wanted to avoid down scroll on top of that) I have settle on a table view that by default contains 3 rows of 2 charts. This can be changed on the html code to 5x2, or even mopre if you are ready to tweak the Html and JS.

Here is how it look on the first page:

SWDTrending-sampleIII.png

Any page scroll to the right will generate a "Previous page" link on the top left of the page, and the "Next page" link will disappear once you reach the last avialbale page.

Top

Conclusion

You can now easily build a web page inside you SMP console to review SWD Execution trends for your day-to-day operations to find out if any deployment is going wrong. But this is not the end of it. I sure intend to expand this tool to provide a better landing page so you can select which policy to view, or which page to satrt with, and possibly integrate the tool as a context-menu entry inside the SMP copnsole.

Top

References

[1] Patch trending

[3] Google Chart API

[4] SWD Trending blog entry

Top


Viewing all articles
Browse latest Browse all 322

Trending Articles