Patch Trending SiteBuilder - Protirus/patchtrending GitHub Wiki

{CWoc} Patch Trending SiteBuilder

https://www.symantec.com/connect/downloads/cwoc-patch-trending-sitebuilder


[END OF "SUPPORT" NOTICE]

Hello everyone, after close to 5 years maintaining various tools around Symantec Connect this legacy is turning to be more of a burden than anything else.

It's still is a great set of tool and they all have their use, but as such I'm not going to maintain them anymore.

The source code for this tool may still change over time, and can be found on Github: https://github.com/somewhatsomewhere?tab=repositories

[/END OF "SUPPORT" NOTICE]

Welcome to the {CWoC} Patch Trending SiteBuilder (v15) download.

Content:

Features Prerequisites Usage Screen shots The landing page (1) The landing page (2) The landing page (3) Global view (1) Global view (2) Global view (3) Bulletin view Updates per bulletin view Release notes Sample site Features

The Patch Trending site builder generates static web-site to visualize Patch Compliance Trending Data stored on a Symantec_CMDB database. It has the the following attributes:

A landing page showing: global compliance graphs a bulletin search function link to custom compliance views a dynamic page (html + javascript) to quickly access compliance per bulletin static pages to show updates details per bulletins Custom compliance view, which is a set fully custom pages to show groups of bulletins graphs Troubleshooting pages showing "bottom-10-compliance" by bulletin and "top-10-vulnerable" bulletins, and (from v10) 2 pages to show top 10 movers (by installed count i.e up and vulnerable count i.e. down). Top

Prerequisites

There are no SQL prerequisites anymore. Run PAtchTrending-8.1.exe /install to install the required stored procedure.

Run "patchtrending-8.1.exe /collectdata" to collect the data. This is the command that should be run daily.

Top

Usage

Here is the complete list of valid invocations. For additional details please check the command line help message below or via "patchtrending-81. /?".

sitebuilder
patchtrending-8.1 /?
patchtrending-8.1 /install
patchtrending-8.1 /upgrade
patchtrending-8.1 /version
patchtrending-8.1 /write-all
patchtrending-8.1 /collectdata
patchtrending-8.1 /buildsite

The site layout file format use comma separated value (with or without spaces) with the first entry being the page name and following entries being bulletins to be added on the page. If the bulletin name is invalid no page will be generated.

A sample site-layout page is attached with the executables zip.

Here is the command line help message:

Welcome to the Patch Trending SiteBuilder. Here are the currently supported command line arguments:

/buildsite

    This option is required if you want the tool to output the Patch 
    Trending site, based on the SiteConfig.txt file.

/collectdata

    Run the trending procedure for each site that is enabled on the
    siteconfig.txt.

/collectionguid=

    When this option is used the Patch Trending site will be generated for
    the provided collection guid.

/install

    This command line installs the pre-requisite stored procedures to the
    Symantec CMDB and terminates.

/upgrade

    Upgrade the database objects and _data_ from the previous schema to the
    latest version which adds a CollectionGuid in various location.

/write-all

    This command line will prevent static html and css  files from being 
    written to disk. This allows you to customise the site look and feel
    to better suit your needs.
    

/? || /help

    This command line prints out this help message and terminates.

/version

Configuration files names and content:

SiteConfig.txt:

    The site config file contains a a list of line seperated sites that
    should be built upon /buildsite invocations, or for which data will be 
    collected upon /collectdata invocations.
    
    The root site is created under the working directory, whilst other
    sites will be created in a directory named using the site-name field.
    
    Here's a sample file with explanation of each fields:

Lines started with # are not process

Fields descripitions:

enabled (1 | 0), collectionguid, site-name (comma not allowed), site-description, root-site (only one allowed)

1, 01024956-1000-4cdb-b452-7db0cff541b6, AllComputers2, All computers with the Software Update plugin installed, 1 1, 01024956-1000-4cdb-b452-7db0cff541b6, AllComputers, All computers with the Software Update plugin installed, 0 1, b677c36f-8cf8-4c57-aa6f-f11948e128c7, Windows-Servers, All windows servers, 0 1, 66167acf-2484-4244-92fb-a2ffaa5aebd2, Windows-Desktops, All Windows Desktops, 0 0, 3faa8b67-250b-42ad-8186-fe2f49a9e707, Windows-64-bit, All Windows 64-bit systems, 0 1, 8afb27a1-5dc7-43ca-a88c-8391252f5b7b, Windows-32-bit, All Windows 32-bit systems, 0

SiteLayout.txt:

microsoft-2015-april, ms15-031, ms15-032, ms15-033, ms15-034, ms15-035, ms15-036, ms15-037, ms15-038, ms15-039, ms15-040, ms15-041, ms15-042 microsoft-2015-march, ms15-018, ms15-019, ms15-020, ms15-021, ms15-022, ms15-023, ms15-024, ms15-025, ms15-026, ms15-027, ms15-028, ms15-029, ms15-030 microsoft-2015-february, ms15-009, ms15-010, ms15-011, ms15-012, ms15-013, ms15-014, ms15-015, ms15-016, ms15-017 microsoft-2015-january, ms15-001, ms15-002, ms15-003, ms15-004, ms15-006, ms15-007, ms15-008 microsoft-2014-december, ms14-080, ms14-081, ms14-082, ms14-083, ms14-084, ms14-085, ms14-086, ms14-087, ms14-088, ms14-089, ms14-090, ms14-091, ms14-092, ms14-093, ms14-094, ms14-095, ms14-096, ms14-097, ms14-098, ms14-099 microsoft-2014-november, ms14-064, ms14-065, ms14-066, ms14-067, ms14-068, ms14-069, ms14-070, ms14-071, ms14-072, ms14-073, ms14-074, ms14-075, ms14-078, ms14-079 microsoft-2014-october, ms14-056, ms14-057, ms14-058, ms14-059, ms14-060, ms14-061, ms14-062, ms14-063 microsoft-2014-september, ms14-052, ms14-053, ms14-054, ms14-055 Top

Screenshots

Note that you are more than welcome to submit sample data to be included on this page on on the mini-site. This would allow us to spotlight standard trends and how well the software performance (Patch Management Solution) in certain environments. If you want to submit data, please send a direct message to Ludovic Ferre on Symantec Connect or email me (ludovic underscore ferre at symantec.com).

Note! The below sample is an image - but the tool mini-site contains live graphs (using the google API and Javascript) and a complete sample site: 

The landing page (1): global compliance + compliance by computer

The landing page (2): global compliance + inactive computers

The landing page (3): global compliance + compliance by computer + inactive computers

Global view (1):

Global view (2):

Global view (3):

Bulletin view:

Updates per bulletin view:

Top

Release Notes

Release 17

Note that version 17 is available for 8.0 and 8.1. If you want to run this in 7.6 or 7.5, please use the Github version and run the build.bat

This is the last and final release of the Patch Trending tool. Note that the DB schema is not compatible with previous versions and will require you to start afresh (i.e. delete all the stored procedures and tables created by the tool, unless the /upgrade feature works for you - but it proved so problematic that the version 17 had been in production a number of year before being pushed out here to all users).

We have a few key features now integrated into the tool:

Installation of the SQL stored procedure is now fully automated (/install) Execution of the stored procedure to collect the data is also automaed (/collectdata) Now, going back to the potential issues with /upgrade. If it doesn't work you'll have to stored your existing data somewhere else in the CDMB (rename the table) and possibly restore the data once the DB schema has been upgrade. It's not all that hard after all :D.

Here is some SQL code to help you start from scratch (note that this will delete all existing trending objects and the contained data):

drop table TREND_InactiveComputerCounts drop table TREND_InactiveComputer_Current drop table TREND_InactiveComputer_Previous drop table TREND_WindowsCompliance_ByComputer drop table TREND_WindowsCompliance_ByUpdate

drop table TREND_InactiveComputerCounts_old drop table TREND_InactiveComputer_Current_old drop table TREND_InactiveComputer_Previous_old drop table TREND_WindowsCompliance_ByComputer_old drop table TREND_WindowsCompliance_ByUpdate_old

drop procedure spTrendInactiveComputers drop procedure spTrendPatchComplianceByComputer drop procedure spTrendPatchComplianceByUpdate

Release 15

This release contains a major codefix, a minor codefix and two important new features and a minor CLI change:

Code fix (1): Modified the getbulletin.html page to ensure it loads charts properly under various Internet Explorer versions (tested on Version 8, 9 and 10) Code fix (2): Modified getbulletin.html to verify whether trending data exists or not for the requested entry. If not the message 'No data is available...' is displayed. Feature (1): Added command line option /write-all to prevent the following static pages from being over-written with each site builder invocation (i.e. they will only be overwritten if you invoke 'sitebuilder.exe /write-all'):

inactive-computers.html compliance-by-computer.html getbulletin.html webpart-fullview.html menu.css help.html javascript/helper.js You will notice that this feature include the menu.css. This will allow you to customise the look and feel of the site without loosing your work in between all execution. The same is true for the html pages, as you can now customise them further without the risk of loosing them.

Feature (2): Added a new html page name 'webpart-fullview.html'. This page is a copy of getbulletin.html without the site navigation. It is designed to be used inside the SMP console right-click actions inside a virtual window. CLI change: Added a standard message to display all valid option when invoking the executable with the help paremeter (/? or --help) Release 14

Adding the stored procedure code inside the site builder to simplify the installation process. The command line invocation is simple: 'sitebuilder.exe /install'.

Note! This will reset the stored procedures to default if they were customized.

Release 13

Added some information in the help section. Also generalized the menu to all pages and changes some of the pages linking. One important feature is that the site layout file is now optional, as the site navigation does not depend on customised pages. Also fixed a fair few problems.

Release 12

Version 12 is here with massive amount of changes. A full release note article will be published soon, but here's a short list of additions / improvements: all dates are not ISO based and displayed on the graphs using the MMM dd (for example 2013-07-14 is displayed Jul 14). We have a new site layout that lists all Microsoft bulletins by month, all the way to January 2009, we now have a site map, headers (linked or not) on all stub pages, a navigation tool, a help center (empty for now), we filter out superseded / inactive updates / bulletins from the site, we added a Compliance by Computer page that use a range selector and we have used the same range selector in the bulletin / update page (getbulletin.html).

Release 11

Added Inactive computer trending pages. One page is added to the custom compliance view, and if the data exist a graph is added to the landing page, beside the compliance by computer graph if you have this trending enable, or on its own (see the 2 screenshots added above).

Release 10

Added two troubleshooting pages to list the top 10 bulletins with most changes up (net increase in installed updates)  and down (net increase in vulnerable count). Also took some times to re-order the html pages generated. In this manner the browser will display the html content before it tries to build up the graphs in javascript. Finally I added page title to all generated html pages for additional clarity on the site.

Release 9

Fixed the landing page search function. It will now only redirect to the getbulletin.html page if we can find data for the user input (bulletin name).

Release 8c

Added compliance by computer graphics. This is a single graphs that shows on the landing page if you have enabled Compliance by Computer trending reports (awaiting release here on Connect). The graphs is of Candlestick type and shows data as illustrated above. With enough trending done you will see single line going thru the boxes. This is because we display the historical low, histroical high and changes since the previous data capture.

Note that you can use this version without having the Compliance by Computer report running, as this is an optional add-on.

Release 6c

Fixed a problem with Internet Explorer support. The pages now render properly for IE 8.0 and above. It may work with IE 7 but was not tested yet.

Release 6b

Switched the compliance data to be computed from the installed versus applicable datasets, thus reducing the amount of SQL queries executed by half.

Release 6

Introduced vulnerable count on the Installed vers Applicable graphs. This gives us 3 lines (curves) that are easy to comprehend as you can see from the sample above.

Release 5b

Corrected some performance issues from the previous build and added instrumentation. The site builder now logs entry in the Altiris Logs and will indicate the count of html and js pages generated as well as the count of SQL queries it ran. During the performance issue troubleshooting we considered using a single Databasecontext entry but this was a wrong lead. The problem was database performance as the use of code based stop watch indicated. This was fixed by a non-clustered index on the table to keep track of data by updates.

Release 5

Refactored the graph per update generation. Added the link to the bulletin update page on the bulletin view and on the various aggregate pages.

Release 4

Introduced the Updates per bulletin pages. This pages are crafted for all the bulletins found in the trending table, and each page is named after the bulletin (escaped by replacing dot and hyphens with underscore.

Release 3

Introduced the global compliance graphs on the landing page. This makes the first look at the site very powerful, as we get compliance levels for the entire estate.

There were no prior release (or production use) of the tool.

Top

Sample site:

A complete, fully dynamic, sample site is now available: you can jump to it right now!