Patch Management Solution

 View Only

Adding Patch Trending to Your Symantec Management Platform Step by Step Guide 

Nov 12, 2013 03:44 PM

[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]

Table of content:

Introduction:

If you look around Connect for Patch Trending you will find a number of downloads, articles or even blog post. These are the result of a customer driven process that allowed the tool set to grow organically to something sizable.

This document aims to be the only place you need to go through to get up and running with the tool.

Top

Unpacking:

The installation pack is available from the Site Builder download page, but here is a quick link (at version 15):

https://www-secure.symantec.com/connect/sites/default/files/Patch Trending Package.zip.

Unpack the package into a location of your choice:

1_unpack.png

Top

Installing:

Note! If your SMP is _not_ installed using the default drive and path you'll need to customise the installation directory - see below for the details.

Open an elevated command prompt and go to your package directory to run "install.bat".

The installation process will:

  • Copy SiteBuilder-v14.exe to the destination folder
  • Copy SiteBuilder-v14.exe to SiteBuilder.exe in the destination folder
  • Copy site-layout.txt to the destination folder
  • Copy web.config to the destination folder
  • Import 5 items into the SMP database

The destination folder by default is: "C:\Program Files\Altiris\Notification Server\Web\PatchTrending\". This allow you to navigate to the generated site via the link http://localhost/altiris/ns/patchtrending/.

2_install.png

Top

Console items:

The SMP console will now have the following items at the root of the "Job and Task" folder:

  • Run SiteBuilder (Patch Trending)
  • RunOnce SiteBuilder (Install SQL code)
  • TRENDING Compliance by computer
  • TRENDING Compliance by update
  • TRENDING Inactive computer

3_SMP-console.png

Top

Run once:

The SiteBuilder executable contains all the required stored procedure to trend compliance by update, compliance by computer and inactive computers. To add the procedures into the db (or rest them) the site builder must be invoked with the command line option "/install".

This is done by running the task "RunOnce SiteBuilder (Install SQL code)".

4_RunOnce.png

Top

Scheduling:

Next you need to schedule the 4 remaining tasks to run daily. The trending tasks (that run the SQL) are best run at the end of the day (so you collect and display data for the day on which the collection is done) and the Site Builder task must run once the trending task completed.

5_DailySchedule.png

Here is an sample scheduling table:

Task Name Schedule
TRENDING Compliance by computer
Daily 23:45
TRENDING Compliance by update Daily 23:49
TRENDING Inactive computer Daily 23:53
Run SiteBuilder (Patch Trending) Daily 23:57

Top

Custom destination:

If your Notification Server directory is not under the default drive and path you need to take a few additional steps from the above process to install the toolkit.

On the command line and before running install.bat you must set the installation directory in this manner:

set installdir="<desired destination folder>"

For example:

set installdir="C:\Program Files\Altiris\Patch Trending"

or

set installdir="D:\Altiris\Notification Server\Web\Patch Trending"

2_install_custom.png

Once the items are imported in the SMP console, you need to modify the 2 tasks that run site builder with your custom path:

6_CustomSiteBuilder.png

Top

Conclusion:

With the data collection and site builder scheduled to run you should be able to see some results after a couple of nightly execution (the first night should build up the site with empty graphs and the second night will bring in the data required to draw lines).

Here is the link you'll need to use to access the site builder landing page:

http://<your_smp_name>/altiris/ns/patchtrending

Note that if you have configured the IIS to listen to a different port the port number will have to follow the smp host name or fqdn, with a colon delimiter (i.e. http://<your_server>:8080 if you have changed the default port to 8080).

Top

References:

[1] {CWoc} Patch Trending SiteBuilder
[2] {CWoC} Patch Trending: Adding Patch Compliance Trending Capacity ...
[3] {CWoC} Patch Trending Stored Procedures
[4] {CWoC} Patch Trending: Adding a Compliance by Computer module
[5] {CWoC} Patch Trending: Inactive Computer Trending Report

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Mar 06, 2018 05:49 AM

I just wanted to say a big THANK YOU for Ludovic's work over the years. Writing and supporting these community tools is largely a thankless task, and I for one have appreciated them immensely.

Kind Regards,
Ian./

 


 

 

Dec 08, 2017 08:27 AM

This a brilliant piece of work Ludovic. Brilliant.

Dec 08, 2017 04:24 AM

I think I've resolved my issue now by re-creating the scheduled task that runs the Site Builder using the Global Administrator Account instead of Windows "System". The site is now being re-created nightly and updating as expected. :o)

Dec 05, 2017 05:09 AM

Hi Ludo (remember setting this up for us a few years back?)

I need some help please...

This was working find for us but since some change (possibly one of our Admins having left and being removed from the console (whome I believe was the ID used to setu the PatchTrending site)..

It's not automatically updating the Site Pages when running the "SiteBuilder" tasks from the scheduled tasks overnight..  The only way to resolve this is to manually run the SiteBuilder-v15.exe on the GNS.

I've re-created the Jobs using the above commands (importexport2 /import "TRENDING Compliance by computer.xml") / etc then created the schedules as shown above but it didn't run last night...

So something fundementally wrong with executing the task through the NS.Scheduler.. Any thoughts?  Attached some Screenshots and Logs.

Thanks, Steve..

Jul 01, 2016 01:34 PM

I'm not sure this will help you 2 years later, but I'll post it for future readers. If using the non-standard install path with a drive other than C:\, you'll need to modify the RunOnce task to change the drive letter before adding the CD command for your install path. My script was failing after 1 second when I first ran it, but completed successfully after changing it to such:

REM Move to the running folder - by default we run under /Altiris/NS/PatchTrending
D:
cd "D:\Program Files\Altiris\Patch Trending\"
SiteBuilder.exe /install

 

Jun 03, 2016 01:56 PM

Hi,

Has anyone installed this on a 7.6 SMP from scratch?  I have an SMP on 7.6 HF7 and when I try to run sitebuilder.exe /install I get the following error:

 

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Altiris.NS, Version=7.1.8280.0, Culture=neutral, PublicKeyToken=d516cb311cfb6e4f' or one of its dependencies. The system cannot find the file specified. File name: 'Altiris.NS, Version=7.1.8280.0, Culture=neutral, PublicKeyToken=d516cb311cfb6e4f' at Symantec.CWoC.PatchTrending.SiteGenerator.Main(String[] args) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Any help would be appreciated.

Thanks

Jul 16, 2014 05:26 PM

Hi Ludovic,

The charts finally started populating data after a couple of days. I gave up on the custom right click action.

Everyone likes the patch trending portal here.

Thanks,

Tomasz

Jul 08, 2014 09:15 AM

Hi Ludovic,

After successful implementation in the lab I installed it in the production. However I have the following questions

  1. The data is collected but the main page http://localhost/altiris/ns/patchtrending/ does not draw the Compliance by Computer and Inactive Computers charts ?

    When I replace manually the index.html file with the index.html from the lab the all 4 charts are displayed, the two bottom graphs are still empty.

    After running the 'Run SiteBuilder (Patch Trending)' the file is overwritten and again only the two top charts 'Installed versus Applicable' and Compliance are rendered.
     
  2. Our Patching world is divided between clients and servers. Their have different policies. Is it possible to displaytwo separate sites for 2 diffrent filters, that is compliance for servers and compliance for clients ?
     
  3. The context menu righ click action for bulletin is not populated. Not sure what I am doing wrong. I checked it 3 times.

Many thanks in adance.

Tomasz

Jun 24, 2014 10:20 AM

Hi Ludovic,

I am trying to make it up and running, first in lab then in production.

Here is the feedback from my installation.

  • Install.bat does not detect installdir path and does not create a new folder. I cannot say why, I disabled echo and still nothing.

I created the folder manually

  • If you have a non standard location cd command without /d switch does not work in RunOnce SiteBuilder (Install SQL code) task.

I added /d swith and run the task again with success. My code is as follows:

REM Move to the running folder - by default we run under /Altiris/NS/PatchTrending
cd /d "e:\Program Files\Altiris\Notification Server\Web\PatchTrending\"
SiteBuilder.exe /install
 

  •  It fails to import the last item on the list. I do not know why.

AeXImportExport being run with command line:/import Patch Compliance trends
Failed to import folder [Patch Compliance trends]. The folder must have thisFolder.xml file in it.

So I imported it using the context menu into Jobs and Task view.

 

patch compliance trends.PNG

HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.

  • Resetting IIS would not make any harm too.

 

Apart from that great work.

Thumb up from me !

Tomasz

 

May 13, 2014 04:05 AM

I have seen those problems with the credentials being used in R7, but that was for the Task Services.

This was because the R7 release introduce a secure package credential store that was not there before, and part of the agents where not able to read this and would fall back to the computer domain account.

Can you confirm that you are on R7? Did you install the agent pointfix for R7 that solves the package access credential problems (7.1_SP2_MP1.1_V7_PF3366024)?

It seems unrelated, but we'll see!

May 07, 2014 04:38 PM

It doesn't, it gives the error :

C:\Windows\system32>REM Move to the running folder - by default we run under /Altiris/NS/PatchTrending
C:\Windows\system32>cd "F:\Program Files\Altiris\Patch Trending\"
C:\Windows\system32>"F:\Program Files\Altiris\Patch Trending\SiteBuilder-v15b.exe"
We cannot execute anything as the prerequisite table TREND_WindowsCompliance_ByUpdate is missing.

 

I can however run the sitebuilder.exe from a command prompt on the server and that does work.  I'll set up a scheduled task similar to what PHoward had to do.  Thanks for your help!

May 07, 2014 03:36 PM

Here is version 15b for test purposes:

https://www-secure.symantec.com/connect/sites/default/files/SiteBuilder-v15b.zip

Can you check if this helps at all?

May 07, 2014 02:43 PM

I looked in the logs on the SQL server and I'm seeing a "Login failed for user 'DOMAIN\SERVERNAME$'"  I have redacted the actual domain and server name but why is it trying to login with the local system account to the DB?  Our SQL is off box, shouldn't it be attempting to connect using the Altiris application credentials we have configured?

May 07, 2014 04:21 AM

Hello Dgott20,

The probl;em phoward was having related to the security mechanism in place on the tool that check the running account is member of the Symantec Administrator role.

For some strange reason this check fails when running from the Taskon his (and probably your) server. I did a build that removed this check, but he still had issues running from the Task inside the SMP, then because the acocunt couldn't access the database for some more odd reasons.

We ended up running the task from the Windows Scheduler has both he and I couldn't invest too much time looking into this.

I'll fish out the new build for you and will post it here later on today.

May 06, 2014 05:51 PM

What did you do to resolve the issue that PHoward was having?  I'm having the same problem.

May 06, 2014 03:22 AM

You are almost there but not quite ;-).

There's no need to modify the stored procedure. Rather you should modify the SQL task that runs daily on the SMP to add the collection guid.

Here is what the task SQL task should look like now:

exec spTrendPatchCompliancebyComputer

And what you want it to look like:

exec spTrendPatchCompliancebyComputer @collectionguid = '<your collection guid>'

Just make sure the same scope is used in the Compliance by Update procedure as well, so we gather data consistantly.

May 05, 2014 01:53 PM

Ludovic, just to be clear, I need to modify the:

spTrendPatchCompliancebyComputer

And modify the @collectionguid as uniqueidentifier ?

 

Do I need to modify the other Trend SP's?

 

Thanks

Apr 30, 2014 08:24 AM

Thanks, will try today.

Apr 30, 2014 06:28 AM

Hello cpark,

Thanks for your feedback. It's much appreciated :D.

You sure can change the 'target'. There is an optional parameter named @collection in the trending SQL. Just use the filter guid you want and your patch trending will work for the desired set of computers.

Note that we do work with a filter - not a target there.

Apr 29, 2014 06:53 PM

This is so awesome...

Any way to change the targetted computers?  Meaning I only want to see the windows 7 endpoints?

Feb 20, 2014 03:30 AM

Hello PHoward,

It looks like you have not installed the stored procedures into the database, or may be not into the Symantec_CMDB as previously indicated [1].

What do the data gathering task look like? If they worked then we have an issue with sitebuilder not getting to the right database, else it's just a matter of putting the procedures in the right location ;).

PS: If you need hands on help (this is kind of dragging now) please contact me via direct message and we'll work something out.

[1] https://www-secure.symantec.com/connect/articles/adding-patch-trending-your-symantec-management-platform-step-step-guide#comment-9819721

Feb 19, 2014 02:29 PM

C:\Windows\system32>REM Move to the running folder - by default we run under /Altiris/NS/PatchTrending
C:\Windows\system32>cd "C:\Program Files\Altiris\Notification Server\Web\PatchTrending\"
C:\Program Files\Altiris\Notification Server\Web\PatchTrending>SiteBuilder.exe
We cannot execute anything as the prerequisite table TREND_WindowsCompliance_ByUpdate is missing.

Feb 18, 2014 12:49 PM

Yes, I started the 3 tasks and the sitebuilder to run this evening.  I will update tomorrow with results.

Feb 18, 2014 11:11 AM

Yes, you can try. I still doubt it'll work, but we shall see.

PS: did you schedule the data gathering procedures? The tasks that will run the stored procedures against the SQL database.

Feb 18, 2014 09:58 AM

Done...Did you want me to try and run the "Run Sitebuilder (Patch Trending)" Task?

Feb 18, 2014 04:49 AM

Hello again phoward74,

I am double checking this. In the mean time what you should to is insert the SQL procedures manually (from the management studio).

They are available in a download:

https://www-secure.symantec.com/connect/downloads/cwoc-patch-trending-stored-procedures

This should get you past Step 1. Once the procedures are in place they should work without problem in the SQL tasks.

However I foresee that the sitebuilder will most likely have the same issues connecting to the database... so you'll be able to get grid based report in your console, but not the full site yet.

But we can work on that whilst data is collected on your server (it takes a few days before the charts get really interesting).

Feb 17, 2014 04:12 PM


The Service Acct is an SA and we use it to access the DB.  When we set everything up, we the account SA and didnt change it.  If that needs to be changed to owner we can.

Feb 17, 2014 03:56 PM

Alright. It sounds like your setup is a little specific. Do you use a SA acocunt to access the DB? It's rather strange, because I get the database context from the built-in provider...

Feb 17, 2014 03:24 PM

I was in the NS and ran than from the service account we have set that is a Symantec Admin.  I tried from my account which is also a Symantec Admin with the same results.  The service account has access to the SQL DB, but mine does not.

Feb 17, 2014 03:17 PM

Hum... can you check that the task runs under a privileged account (the appid)?

There's no reason for the task context ot to have access to the DB, or the connection to not work.

Feb 17, 2014 03:14 PM

C:\Windows\system32>REM Move to the running folder - by default we run under /Altiris/NS/PatchTrending
C:\Windows\system32>cd "C:\Program Files\Altiris\Notification Server\Web\PatchTrending\"
C:\Program Files\Altiris\Notification Server\Web\PatchTrending>SiteBuilder.exe /install
Dropping spTrendPatchComplianceByUpdate... Failed to construct DatabaseContext object. Connection to database failed

Feb 17, 2014 03:01 PM

Hello phoward74,

-1 indicate an error in all cases.

Can you change the task so it captures the output? This will allow you to check the ouput.

Alternatively you can run "site-builder.exe /install" from the command line (as Administrator) and send me the output here.

Feb 17, 2014 10:05 AM

When I run the "RunOnce Sitebuilder (Install SQL code)" Task, it fails with a Return Code : -1.  It only runs for about 3 seconds, and in the Log Viewer there is no errors.  It states completed.  Is this a false error, or did it really not run?

Nov 26, 2013 08:02 AM

Hello Vinayak,

You can manage the SMP and other servers via Patch Management, no problems. Just make sure you get some Server licenses first ;).

Nov 26, 2013 07:15 AM

Hi ,This is good article for  patch managment.

Can you help me with document for patching of  Symantec Notification server  itself ?

 

Regards 

Vinayak Patil

Nov 23, 2013 08:13 PM

Thank you. Could be useful for when management decides to come around and ask us what we do. In truth, it is our job to make sure they don't know what we do for if they do we may be doing a poor job of it.

Nov 20, 2013 01:09 PM

Thank you for sharing this, very valuable to business to show patch trending

Nov 14, 2013 10:05 AM

I am trying to update the article with additional information, but it's not workring for now.

In the mean time here is the extra data I wanted to put in:

Installing:

Note! If your SMP is _not_ installed using the default drive and path you'll need to customise the installation directory - see below for the details.

Open an elevated command prompt and go to your package directory to run "install.bat".

The installation process will:

  • ...

The destination folder by default is: "C:\Program Files\Altiris\Notification Server\Web\PatchTrending\". This allow you to navigate to the generated site via the link http://localhost/altiris/ns/patchtrending/.

Conclusion:

With the data collection and site builder scheduled to run you should be able to see some results after a couple of nightly execution (the first night should build up the site with empty graphs and the second night will bring in the data required to draw lines).

Here is the link you'll need to use to access the site builder landing page:

http://<your_smp_name>/altiris/ns/patchtrending

Note that if you have configured the IIS to listen to a different port the port number will have to follow the smp host name or fqdn, with a colon delimiter (i.e. http://<your_server>:8080 if you have changed the default port to 8080).

Related Entries and Links

No Related Resource entered.