Tag Archives: VisualStudio Authoring Console Extensions

Extending HP network devices with CPU and Memory counters

25 May

Hi,

This blog I had prepared a long time ago but never published it. So now it’s the time to do it.  Since we all know that SCOM 2012 has build in network device monitoring we of course want to use it. This works perfectly , except I you are using devices that are not certified by SCOM. In that case you will not get the CPU and memory counter and Fan/PSU states. For example most of the Procurve network devices from HP are left in the dark. So..

The problem

We want to monitor also CPU and Memory usages from HP network devices.

The solution

I will keep it simple and clear. I will demonstrate the steps using VSAE and give you as bonus the MP at the end. I will use VSAE management pack templates just to illustrate the power of it.

The steps will be:

1. [Classes] create the memory and CPU classes

We just simple make use of on the memory and processor classes that are already present in the system center network library. So we create 2 classes based on that:

image

 

2. [Datasources] create the memory and CPU discovery datasources

Now we have to create the datasources for the discovery of the CPU and memory targets

image

The most important is that you set the device key correctly to the parent node. Otherwise the relationship between the new CPU / memory class and the network device node will not be set. And you will not see any CPU / Memory targets. This can sometime be a ‘error and retry’ process.

3. [Discovery’s] create discovery’s for the CPU and Memory targets

Now we have the discovery datasource we can create the 2 discovery rules for the CPU and Memory targets. We will use the VSAE discovery templates for this. Just simple add new ‘Discovery’ template and you add the 2 rules below.

image

Create the 2 new discovery’s and specify the correct datasources.

image

You specify the datasources we created above to the correct discovery rule. Fill in the correct OID to match the HP processor and Memory OIDs.

image

If you now import the MP will will see at a HP node the CPU and Memory classes created. So continue the the next step.

4) [Rules] create the memory and CPU collection rules

So now we can make the stuff we wanted to see. The Memory and CPU counters. So we just simple use the add new item ‘Rule (Performance Collection)’ template and make the 2 new rules. We are going to use the already build in performance collection rules for the network nodes.

image

image 

The most important is to specify the correct OID for the Memory and CPU counters at the datasource configuration. See below:

CPU: .1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0
Memory: .1.3.6.1.4.1.11.2.14.11.5.1.1.2.2.1.1.7 and .1.3.6.1.4.1.11.2.14.11.5.1.1.2.2.1.1.5

I am not going to do a deep dive on this. You can just simple reference to the downloadable project source at the end of this post to check the details out.

The results

Now you import the MP and you will see you most wanted performance counters !! Open the Network Summary Dashboards and Node dashboard for the CPU Usage to check it out.

SNAGHTML126f4134

And the ‘free Memory (Percent)’ performance view for the memory usage.

image 

And below the relation ship diagram.

image

The End

The next step could be to add monitors to alert on high Memory or CU usages. I am not going to give you this bonus because its better to get some VSAE practice you self’s… You can do this the same way you did with the collection rules. There is a template for monitors also.

Download VSAE project (for the diehards): http://sdrv.ms/11mkq9j

Download Management Pack example: http://sdrv.ms/11mku8S

Happy Scomming

Michel Kamp

Let SCOM check for Updated Management Packs

21 Apr

The challenge

Using the SCOM native console the import from the Microsoft Management Pack Catalog is a nice feature. I like also the feature to check and import updated MPs that you have already imported in your management group. But what I really miss and don’t understand : why did the product team removed the monitor that gives us a alert when a new MP version is in the MP catalog ?. This monitor was build in MOM 2005 but removed in the begin of SCOM 2007.

The solution

So since we are SCOM author diehards we are going to build our own MP update monitor. I am going to use VSAE to build it all. But wait even if you aren’t a SCOM author diehard it still worth reading this post because this time I will share the VSAE project and even the MP with you at the end!!!

Analyze

So I used my good old friend ‘Fiddler’ to backward-engineer what the scom console is doing when I press the ‘check for updated management packs’ button. It seems it sends a SOAP request to a webservice. The SOAP request contains a MP list of the MPs that you have already imported. The answer result of this request will be a MP list with the updated MP versions or an empty list if there aren’t any updates for you.

Building time

Below I’m going to give you a overview what I have done. You can look in the VSAE project for details on it. If you have any questions just let it know and I will help you out.

1) The datasource

So now we are going to make a datasource that runs a PowerShell script. This PowerShell script is simulating the webservice request.

Below a snippet of the code. (the full code is in the VSAE project). What I am doing here are 3 steps:

1) Build a SOAP request message that contains all my MP version meta data from all MPs that I have already imported in my management group.

2) I call the “ManagementPackCatalogWebService.asmx” and execute the method “FindManagementPacks”

3) as last step I check if there are any MPs returned and set the $Status flag according the result. And I return the scom property bag.

# step 1

$MPSoap = get_MP_List
$ret = Do-SOAPRequest -SOAPRequest $MPSoap -URL $MPCatalogURL -SOAPAction $SOAPAction

# step 2

## show MPs that have a Update
$MpList = $ret.Envelope.Body.FindManagementPacksResponse.FindManagementPacksResult.CatalogItem | where { $_.IsManagementPack -eq $true} | select-Object DisplayName

# step 3

## check MP returned

if ( $MpList.Count -eq 0)
{
$Status=”UPTODATE”
}
else
{
$Status=”NOTUPTODATE”
}

  # Create the property bags
$pb = $oAPI.CreatePropertyBag()
$pb.AddValue(“Status”,$Status)
$pb.AddValue(“MpList”,($MpList | Out-String))
$pb

The script above we are going to use in the datasource below

image

2) The Monitor

Now we are going to compose a 2 state UnitMonitorType that uses this datasource. The health state check is done with the “Status” value in the returned property bag.

image

Having this UnitMonitorType composed we can now use it in the real monitor KPI. See below for the KPI. The target is the Management server. I choose this target because I have only one MNG server in my test lab but if you have more it’s better to choose the RMS emulator target.

image

Now when the monitor is unhealthy it will generate an alert message constructed below:

image

 

The result

Building and importing the MP in your SCOM management group will show you the result below:

image

And of course a nice ALERT message also:

image

So now the part you are waiting for..

As promised I will share the VSAE project and the MP it self. Please notice that it is a show case alias prototype MP and so it is far from complete. For example not all display strings are applied and no knowledge is supplied. But that’s up to you to complete…. In my production version I have even build in a recovery/console task that also automatically imports the updated MPs.. Just a idea for you to work out…

MP download and VSAE project download: https://1drv.ms/f/s!Au2euLDFD_ovilTTrLl-XqSmd1tj

The End

Feel free to comment or contact me if you have any questions.

Happy SCOMMING

Michel Kamp

Get a grip on the DWH aggregations

24 Mar

 

The problem

If you run availability reports or performance reports with a aggregation type of daily or hourly the reports are empty. This problem is described a lot on the web. And I have also written a couple of blog post how to fix this issue. But as you know we are using scom to monitor stuff , so why not monitor this aggregation processing and alert if a processing delay is occurring. ? That’s our mission today….

Analyze

Using SQL enterprise manager and a SQL query on the data warehouse DB we can read out the aggregation processing. This query looks like this:

Select AggregationTypeId, Datasetid, (Select SchemaName From StandardDataSet Where Datasetid = StandardDataSetAggregationHistory.Datasetid) ,  COUNT(*) as ‘Count’, MIN(AggregationDateTime) as ‘First’, MAX(AggregationDateTime) as ‘Last’ From StandardDataSetAggregationHistory
Where LastAggregationDurationSeconds IS NULL
group by AggregationTypeId , Datasetid

The output will show us how many aggregations there have still to be processed /aggreationtype  (20=hourly , 30 = daily).

image

So in this case we have no problem. But I have seen scom environments where the state aggregations where so far behind that it was almost not possible to fix it. This bring up a point: especially the state aggregations are the tricky ones. If you have many ‘flipping’ monitors there will be a lot of state changes and so a lot of aggregations data to process. This process takes a lot of SQL CPU power and also disk space. In most of this cases it was the tempdb data space free or transaction log that was the root cause of the failure.

Solution

In scom we have for every aggregation an target. This target is named ‘Standard data set’. You can find it here:

image

If you compare the screenshot with the results on your scom console you will notice that you don’t have the green healthy state… And that’s why you are reading this post. So lets add this state.

I wanted to give every dataset that has to be processed a health state on how many aggregation it has still to process. So we make a monitor that executes for every data set the query above and if a threshold is hit the health state is changed. Also we will add a rule so that this aggregation behind count is put in a trend graph.

I have used VSAE for this , and I will not share the code but only the idea. Why not ? I believe you have to know what you are doing and by copy & pasting you don’t learn from it if you don’t have done it once from start till end.

The real work

Open a new VSAE project and add a empty MP fragment and a PowerShell fragment.

image

Then you make a datasource that reads the aggregation count. This is done using PowerShell and the SQL snapin.

image

The PowerShell script has as input the GUID of the dataset (property of the target) and as output a property bag with the aggregations count (daily and hourly). I made the script somewhat intelligent by reading out the registry where the data warehouse is located.

Now we use this datasource in a monitor module type to create a 3 state monitor. And since we have created a datasource module we can create also a rule that collects the aggregation behind for the trend graph. Yes know know this is easier to type as to do…

Below a snap of the datasource module

image

And below a snap of the monitor module type

image

and the monitor. Create one for hourly(not shown) an one for daily.

image

At last for trending we have to create a collection rule.

image

Notice that the monitor and collection rule are having as target the “Microsoft.SystemCenter.DataWarehouse.DataSet” alias “standard dataset” and notice the runas profile.

The result

When you have constructed the MP and build/deployed it you will see 2 extra monitors on the standard dataset targets as show above. Open the health explorer to see if all is ok.

image

Above dataset has had a problem. To see some details, view the performance counters and you will see the aggregations trend.

image

In this case the state hourly aggregations where way behind. So I followed one of my own blog posts to solve this one. Where I manually executed in a loop the state aggregation process to speed up the processing.

The End.

Yes I know this post is a bit ‘çloudy’ and not something you can download and import. But I hope by sharing the idea I triggered you to try it your self.

Happy SCOMMING!

Michel Kamp

Authoring SCOM Reports in VS 2010

14 Jan

Hi,

Short post on how to get you dev environment ready for authoring scom reports.

Challenge:

You have installed SCOM 2012 on SQL 2008. You want to author a custom report using Visual studio 2010. When you open visual studio you will notice that NO BI project template is shown. Normally you selected this project template and selected the new report project to make your custom report. How now to continue ?

Solved:

Grab a SQL 2012 ISO (YES 2012) and startup the setup.

1) Select installation:

SNAGHTML1045608b

2) New sql or add features

SNAGHTML104737a8

3) Select SQL features Install

SNAGHTML104bfe9e

4) Now the important step. Select the 3 options here. Most important is the “SQL Server Data Tools”. This features contains the VS BI project template.

SNAGHTML104f3ae3

5) Step though the install windows.

And now open Visual studio 2010 and create a new project. And what do we see ?

Yes the BI template Knipogende emoticon 

SNAGHTML1058011e

 

Now you can create the new SCOM reports. Notice also the NEW chart types !!!

image

 

Remember that if you use custom report code components you must copy the correct .dll assemble to the directory:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies

The End.

Happy Scomming

Michel Kamp

10 reasons NOT to use the Visual Studio Authoring Extensions VSAE

17 Jun

Hi this weekly post will be a short one all about the yet to be released VSAE.

Have you seen the title ?… Hmm what are you thinking now ? Not really something he would write … And you are correct its nonsense .. But I have your attention now , haven’t I…

Reason 1: SourceSafe integration

If you have read my previous post you know I really prio using SourceSafe for managing your management pack developments. And good news since the VSAE is a Visual studio project template is can be integrated out of the box with all VS supported SourceSafe systems. Just put the Solution to your SourceSafe system and every thing will be versioned. I use the good old VSS 2005 for this. But TSFS will also do the job.

image

Reason 2: MP object viewer

Yea! this feature is super. Normally you had to browse your MP by XML to view your project content. Or you use external tools for it. Now you will get it out of the box.In the View menu of the main VS window. Press Management Pack browser.

image

And you will see all the MPs in your solution/projects. Now you can browse it by type. You can even now browse SEALED mps at ease.

image 

Also when double clicking on the type. For example the discovery rule. You will be jumping directly to it in your MP.
BE AWARE THAT IF YOU DO THIS AT A SEALED MP YOU WILL BE REDIRECTED TO A READONLY VERSION OF THE MP FILE. YOU CAN’T EDIT IN THIS WINDOW. Sounds logical since it’s a sealed MP. But I had this confusion situation one’s when I clicked on my own sealed MP that I use as reference in a other MP. And was wondering why I couldn’t edit it since it was checked out by VSS…

Reason 3: Find references

You can now find at ease where you MP object is used. Just use the find references find feature. Select the MP object and right click “Find all references”

image

And you will get:

image

And of course you can double click to go to MP object ‘code’. ; – )

If you don’t see the window. Just press in the VS main menu: View –> Find MP Element Reference Results.

image

Reason 4: Simulating your workflows

Of course you will never used this , because your MPs are faultless. ;- ) The mine aren’t so I use this a lot. The Workflow simulator is integrated in VS now. Just select in the Management Pack Browser the , for example discovery , and right click “MP Simulator”. And that all.!!

image

In a separate windows the already known workflow simulator will popup.

SNAGHTMLafa5a676

Reason 5: Jump to referenced MP objects.

Very powerful feature. When you are working in your MP project at a MP object and are using for example a MP TYPE you can easily jump to this type by right click on the name and select “Go to Definition” (F12).

image

Reason 6: intellisense

If you have read my post on how to enable intellisense for OM07 MPs in VS this isn’t so new. But now it even does intellisense on references also.. this really speeds up the development time. cool

image

Remember: This intellisense is not always automatically showing up. Most of the time you must press SHIFT+Space. Example above, press the keys at the ! sign and you will prompted a dropdown list with the possible choices.  Notice that only the valid modules of type datasource are displayed. Well done Microsoft product team( s ) !

Reason 7: Build and deploy.

At the end we all have to import the MP into our dev environment to test it. Normally you will do a MP verify and then import it. You can use tasks for this in VS. I already blogged about this earlier. However in VSAE the MP is build of MP fragments and has to be compiled and build. Now the great time safer is that you can now specify the OM MNG group were this MP has to be imported after a successful build. You can even configure that the MP has to be sealed before import. And yes the version number is also incremented at build.

SNAGHTMLb111f46e

Even when the build gives errors back you will see it in the Error list window. And you can click on it to jump to the MP object. Wow never have to use CTRL+G again ; – ) 
Notice that this jump does not apply for target typo’s . I hope this will be fixed in the RTM release.

image

Reason 8: Management objects templates

You can now create/insert at ease new KPIs. Just press NEW-> Add existing Item and you can choose several KPI to create. I already blogged about this. The nice part is that you can even automate this so that you can create 100x rule at ones. I have to amid that I don’t use this templates a lot. I prefer to type it manually but sometimes I use this to get a sort of snap in fragments. Just create the KPI using the template and the look at the generated code behind and copy it. Be aware that if you change the code behind you will loose it at next build… I personally would liked if this generated code was also reflexed back against the template.

image

Reason 9: Convert your ‘old’ OM07 MPs.

Using the VSAE you can convert your OM07 MPs to the new VSAE project types. It very easy just use the “Project from existing Management Pack” , select the om07 MP and the references and a new project will be created in your solution. If you select multiply om07 MPs there will be created a new project for every MP. Very handy. The down site is however that it will put all the MP objects into one big MP fragment. I personally would liked to have seen this split-up by type or maybe converted to templates.

image

Tip: If you converted MP has images it will extract this images to resources and put them in the root of the project directory. You can create a new folder and drag them into here. Be aware that there is a little bug: The resource MP objects haven’t the images file extensions. So a build will fail. Just add the file extensions .jpg ect.. to it and it will run.

image

 

Reason 10: It just a must have.

I could continue to write about the tons of great features that are build in the VSAE but over 30min the soccer Europe 2012 game Netherlands->Portugal is going to start so I will warp it up and say:
use it use it use it use it . its no question why , just use the VSAE !

Happy scomming and till next week.

Michel Kamp

Part 2 : Get more value using Visio drill trough

3 Jun

Hi Quick Update. In part 1 I promised when I had time I would make a prototype of a OM 12 Widget that would show a Visio document and update the health states on it.

So , not that I had time but the coolness factor was to high , so I offered some hours on Sunday to get this working… yes you have read it correctly. I have it working !

Mission

Make a OM 2012 widget and load a Visio document in it. Then refresh the shape data according to the OM target health states. Just the way the official Microsoft Visio SCOM plug in it does.

Accompliced

So far I have it working as a prototype. Yes its stable but as every prototype not fool proof. See screen shots below.

SNAGHTML697f596f

The prototype works based on Visio documents you have made with the official Visio SCOM plugin. Just create the Visio document and drag the OM targets on it and save it. Then load it in to the widget , for now with File –> open. There is one rule: You must have Visio installed on the machine running the OM console.

You don’t have to have the official Visio SCOM plugin installed when you only view the Visio sheets in the Widgets. I have made a refresh feature that connects to the OM group and gets the health state data and refreshes the Visio shapes based on the outcome. But when you have the official Visio SCOM plugin installed you get a bonus. It works also in the widget with official refreshing. See screenshot below:

image

After getting a try timeout it shows the login form. Better would be that it takes the credentials you are using running the OM console . But … Again prototype facts.

SNAGHTML69895c3d

Conclusion

Sorry I really love being a nerd! (that’s what my wife says anyway) If you are honest you must admit this is really cool stuff!!. Since it will cost me for now to much time to finish a build I can share and because the VSAE is still under NDA and I maybe have plans with this. I will not share it for now. However I will try to convince the MS OM guys ( Dale , Marcin, Baelson hope you read this) to deliver this widget out of the box..

Happy Scomming and till next week!

Michel Kamp

Great resources on Visual Studio Authoring Extensions

28 Mar

Almost forgot to share. Don’t know if you authors know it already.

Remember you can also use this for making 2007R2 MPs!!

Visual Studio Authoring Extensions for System Center 2012 – Operations ManagerVisual Studio Authoring Extensions – Visual Studio Features
Visual Studio Authoring Extensions – Simple Templates
Visual Studio Authoring Extensions – Advanced Templates
Visual Studio Authoring Extensions – Example Management Pack

Don’t forget to look at my latest post on creating a MP with VSAE

Happy Scomming

Michel Kamp

Let “System Center 2012 Visual Studio Authoring Extensions” unseal your MP

22 Feb

Short post for al our reverse engineers.

You can use the System Center 2012 Visual Studio Authoring Extensions (VSAE) to unseal other vendors MPs.

This a really handy feature.

 

How to

1) Install the VSAE

2) open VS and create a new MP project

3) add you MP to unseal to the references

image

select the sealed MP

image

 

4) Right click on the just added reference and select View XML

image

5) and whala , look at the new document and you are done.

image

Happy Scomming!

Michel Kamp

[Solve] Forefront Unified Access Gateway (UAG) Management Pack Import Error

22 Feb

Problem:

You want to import the Microsoft Forefront Unified Access Gateway management pack. But you will be hit with an import error showing the message:

Forefront Unified Access Gateway could not be imported.
If any management packs in the Import list are dependent on this management pack, the installation of the dependent management packs will fail.
Database error. MPInfra_p_ManagementPackInstall failed with exception:
Database error. MPInfra_p_ManagementPackInstall failed with exception:
ManagementPack cannot be imported because it contains a Managed Type with the same name as an existing type: Teredo_Server_Class

 

Analyze:

Looking at the message it looks like the import is failing because there is a name conflict. Every class in SCOM must have a unique internal name. In this case there is already an management pack imported that defined a class with a name “Teredo_Server_Class” . So we are going to look what this MP is.

We are going to use PowerShell for this. Because in the SCOM console we can’t see the internal names , we only see the display names.

Open PowerShell and type:

PS D:\> get-SCCLASS -Name ‘*Teredo*’

DisplayName ManagementPackName Name Id
Teredo Server DirectAccess_Server Teredo_Server_Class 67886a42-d91d-1752-41e9…
Teredo Relay DirectAccess_Server Teredo_Relay_Class 78cd6ee6-f774-8811-dac9…

 

Got it ! This the Direct Access MP. Awake readers have noticed I used SCOM 2012 for this Knipogende emoticon

 

Solution:

Okay since we want also to monitor the direct access we can’t remove the Direct access MP. So we will have to unseal the Forefront Unified Access Gateway management pack and change the class names. Seal it again and import. This is not so complex as it sounds.

There are several tools on in the community that can unseal a sealed MP for you.  Just pick one. I however use the new System Center 2012 Visual Studio Authoring Extensions (VSAE) for this job.  How to do this I will blog after this post.

After done this. You open the unsealed MP with any plain text editor you have. I use Visual Studio (VS) for this. Next step is to do a global replace on the text below:

Search Replace with
IPHTTPS_Gateway_Class UAG_IPHTTPS_Gateway_Class
ISATAP_Router_Class UAG_ISATAP_Router_Class
Network_Security_Class UAG_Network_Security_Class
Router_6to4_Class UAG_Router_6to4_Class
Teredo_Relay_Class UAG_Teredo_Relay_Class
Teredo_Server_Class UAG_Teredo_Server_Class

 

Save the xml file. At this point you could import the unsealed MP into SCOM but keep in mind that every override you will be making that is using a target class for this MP will we stored in this MP. And also using any target form this MP in a DAM will fail. (or you will have to save this DAM into this MP also)

So best way is to seal this MP. Search on the web to do this or follow below:

1) Install the “System center Authoring Console 2007” software

2) Open the MP with the authoring console

3) And go to File –> Save as –> Sealed and Signed Management Pack

image

 

4) choose a location and save. Don’t change the file name!

5) Now you will have to assign the company name and the key file. This key file you will have to create before. (see http://msdn.microsoft.com/en-us/library/6f05ezxy(VS.80).aspx )

image

6) Press OK and you’re done

(of course you can also use the FastSeal.exe to do this all from a one-liner command line/PowerShell)

After this you can import the sealed MP into SCOM.

 

Drawbacks:

If you are going to use this solution you have to realize that if Microsoft is updating his “front Unified Access Gateway” management pack you will not be able to upgrade ! This because the seals don’t match. To solve this you can uninstall your version and import the MS one. Ore you can unseal the Microsoft one and do the seal trick again with your seal.

But I think MS is never going to release a updateable version of this MP because they would have to change the internal class names too. And if you do this the MP will loose its upgrade feature!! So you will always have to uninstall the MP first. So the conclusion is no real drawback!

 

The end:

Hope you enjoyed this post.

 

Happy SCOMMING….

 

Michel Kamp

SCOM Author Meets the REAL VS Authoring Extensions

19 Feb

Yhea! Now its time for the real stuff. In my last post I mentioned the Visual studio Authoring Extensions. And now I am going to give you a first quick hands on. We are going to build an management pack that will discover all your Symantec Agents and monitor the running state of it. When not running it will give an error and a unhealthy state. Pretty easy stuff for you reading this blog but its not the MP but the Authoring VS extensions that have the focus here.

Okay here we go.

First this. This blog post is based on a pre build and can contain other features that may or may not be present in the RTM build.

After installing the VS Authoring extensions we startup VS and select to create a new project.

image

Now select the Management Pack –> Operations Manager –>

You will see for now 2 project templates. We select the Core template and fill in a good name.

SNAGHTMLb67fb6a 

We have now a empty MP project. So next we have to think what we need to create for this MP.

1) Class type for the Symantec Agent

2) Discovery rule to discover the Symantec Agent

3) Monitor rule for the NT service Check of the Symantec Agent

4) Views to display the Symantec health state.

1 Class Type

As always we start at number 1. Go to add a project item for the class to create. Right click on the project and add –> New Item

image

Go to the XML templates and choose Class. And give it the correct name.

SNAGHTMLb742621

If you choose a item template out of the XML folder it will means that you will have to go type the old fashioned XML again. Ill think this will be replaced by an real class create template wizard soon. I hope so…

So said that we open the just created Class MP fragment. And we change the class internal / display name first. Next we change the base to “Windows!Microsoft.Windows.LocalApplication” because I like to use this predefined MS class. Oh do not to forget to set the Hosted to true. As a bonus we add a property “ProductVersion” as a string value.

image

And yes we have finished step 1.

2 Discovery rule

To create class instances for the class created in step 1 we need a discovery rule. Since the best way to discover the Symantec agent is the registry we are going to use a registry key discovery rule. So when a windows computer has the Symantec agent on it a new class instance Symantec agent will be created and the product version number will be filled in. The registry key to check for the agent service existence is “SYSTEM\CurrentControlSet\services\Symantec AntiVirus” and for the product version “SOFTWARE\Symantec\Symantec Endpoint Protection\SMC\ProductVersion”.

Again next we are going to add a project item. This time it will be a Discovery template.

SNAGHTMLb85baa3

Good for us it is a real template so (almost) no need for XML. 

SNAGHTMLb8889b4

Take a good look at what you are seeing now. On the left you will see all the objects created by the templates. In this case it will be one. But you can create more by pressing right click. On on right side we see the property window. And this is the most important one. All the wizard stuff we where having in the ‘normal’ authoring console is gone. You will have to use the property window to supply the values. It looks a bit more work but its not so bad at all because most of the properties have filled select lists behind it.

So we are going to specify the properties. After we fill in the common properties as: Display name , ID , Description, we start with the Module –> Datasource Type ID . Press on the … icon. And choose the filtered registry module type.

SNAGHTMLb914ec7

  Next is to specify the Module type configuration. Go to the “Data Source Configuration” and press on the (Configuration XML). And now we have to type in the registry configuration  by using XML. Hope this will be changed to a wizard later on. For now we will have to create the XML by hand. Good for us the is a XSL schema helping out. We are going to use the registry keys mentioned earlier in this module.

SNAGHTMLb9cd45b

Next we specify the class instance to create. This is a bit more click work but very self explaining.

SNAGHTMLba12316

The complete discovery properties will be at the end.

image

 

3 Monitor rule

Now the real core why we are making this MP. The monitoring check of the Symantec Agent service state. Again we add a new project item. This time we select the Templates –>  Monitor (unit) template.

SNAGHTMLba843b1

 

And again we have to specify the properties. After the general ones we set the Target for this monitor.

image

Select the Class we have created in step 1.

SNAGHTMLbb2beaa

Now we have to specify the Monitoring module type to use.

image

And we select the NT service monitor module type.

SNAGHTMLbb6af20

Next the parent monitor for the heath rollup

image

SNAGHTMLbb76a92

And also important the instance states to use.

image

SNAGHTMLbb868ed

But the most important is of course the configuration of the module type.

image

And again we have to type XML with XSL schema help. We will have to know first the NT service name. Lets use PowerShell to get this name instead to the SC command.

SNAGHTMLbbba16a

So the name will be “Symantec AntiVirus”. So the XML configuration will be:

SNAGHTMLbbd333d

The complete final properties list will be:

SNAGHTMLbc0339b

 

Now the MP is operational , you could now build and import it , but some end user view would be nice too.

4 Views to display

We are going to create 2 state views in a folder.  One showing all Agent states and one showing only the unhealthy ones.

And yes , I know what you are thinking …. we are going to add a new project item Knipogende emoticon

We start with creating a folder to hold the views.

SNAGHTMLbc684a7

We have to specify the folder in XML:

image

Now we have the folder we are going to create the views. Templates –> View (Custom)

SNAGHTMLbc8ec3f

 

this time we have to use the properties to specify the view configurations. We fill in the common ones.

image

And we specify the View configuration and View Folder.

For the second view showing the unhealthy ones  we have to specify the View Configuration as below:

image

SNAGHTMLbcf8e67

 

And yes yes we are ready to build !!!!

Simply press F6 to build. Now after a successful build go to the management pack created.

image

The MP file location will be :

image

and the MP (unsealed) file will be here:

SNAGHTMLbd21800

At this point you can test the MP with the already super tool Authoring Console with the Work flow simulator. If all is okay you can do the last step.

Last step is to import the MP into the SCOM MNG group. An no we don’t have to do this by hand!! We can do it from out of VS too.

Go to the project properties and select the “Management Group” tab.

image

Add a new MNG connection.

After testing the connection you can simply press F5 to build and deploy the unsealed MP to the MNG group.

If you want a sealed one you must specify in the build tab a certificate.

SNAGHTMLbd82c4b

So simple as this it is….

So now you have created your first MP with the new VS authoring Extensions. But WAIT what did we forget !!!! Check-in the solution into Visual Source Safe … really use a Source Safe system to safe your live some day!!!

Next time I will blog more about this super cool new authoring tool. I think I am going to take you guys on the how to create a dashboard widget tour….

Hope you liked this blog and …..

Happy Scomming.

Michel Kamp