Archive

Archive for November, 2008

System Center VUG today & The new Google

November 21st, 2008 jpavleck 3 comments

Scott Moss shot me an IM a little bit ago to remind me about the System Center Virtual User Group that’s happening today (November 21st, 2008) at 1:00 PM Central time. Here’s the ClickToAttend.Com Link to the event – feel free to add this to your Google Calendar.

Speaking of Google!

Google is slowly rolling out new features for a select group of users. It’s a wiki-fied version of search with promote/demote buttons and a comment area. This will help you pick the more authorative links among a list – unless someone has hired an army to promote a malware site, which I wouldn’t put past the modern web.

Anyway, here’s a screen shot of what the new interface looks like, and a short video afterwords.

The new wiki-like features of Google search

The new wiki-like features of Google search

And a screencast!

Coming Soon: New Pavleck.NET Here Now: OpsMgr Wiki

November 20th, 2008 jpavleck No comments

As I add more and more things to this site, Wordpress ceases to be able to properly handle it all – it’s time to move up to a more suitable CMS. So upon the advice of fellow #powershell member Sepeck, I’m moving it all over to a nice and shiny Drupal install.
With a proper CMS, you’ll have a much easier time accessing all of the scripts, downloads, tips & tricks, and contests offered here – and I won’t have to fight with the system so much to get it to do what I want it to do. You’ll also find an awesome time saver; the combined OpsMgr Feed Aggregator – featuring all of the major players in the OpsMgr world on one page.  Like today, it would have been covered with a solid wall of “R2 beta is out!”.

Additionally, there is something that’s in enough of a ready state to show you. It’s in a fairly rough state right now as I steal time to clean things up, but I present to you the Pavleck.NET OpsMgr Wiki. It’s based on the wonderful Deki Wiki software, and I’m quickly falling in love with it. And thanks to some PoSh goodness by Jaykul, you can see the get-help for all of the Command Shell cmdlets. Right now I’m using the free version until I figure out just how active and used it is – the Pro version is only $99 though. Although that’s not the most expensive price in the world, it will take a little time for me to budget – unless you’d like to help. Any donations received go towards the improvement of this site AND awesome prizes to give away to you all! Feel like donating? Awesome! Please click the button below:


Everyone who donates at least $5 will receive a free Pavleck.NET lanyard. They aren’t here yet but they will be. And might I add, they do look quite stunning! Get rid of that company-logo’d cheapie with a high quality Pavleck.NET lanyard. 5/8″ thick, silkscreened logo onto the strong polyester. And it features a break away so you don’t kill yourself, and so you can pop those thumb drives off in 3 seconds. Donations of $10 or above will have a chance to see attached to that Lanyard a 4, 8, 16, or even a ginormous 32GB Corsair Flash Voyager USB drive! So open those eWallets ;) .

This is a lanyard to be proud of!

This is a lanyard to be proud of!

OpsMgr 2007 R2 Beta 1 Released!

November 19th, 2008 jpavleck No comments

A tad ahead of schedule, beta 1 of OpsMgr R2 is now out! Get yourself to Connect and grab it!

Here’s the email I just received:

The System Center Operations Manager team is excited to announce the availability of the Operations Manager 2007 R2 beta, which is ready for you to download through Connect today! Operations Manager 2007 R2 introduces key new and enhanced functionality, including:

Enhanced application performance and availability across heterogeneous platforms
. Delivers monitoring across Windows, Linux and Unix servers-all through a single console.
. Extends end to end monitoring of distributed applications to any workload running on Windows, Unix and Linux platforms.
. Maximize availability of virtual workloads with integration with System Center Virtual Machine Manager 2008.

Improved management of applications in the data center
. Delivers on the scale requirements of URL monitoring of your business.
. Meet agreed service levels with enhanced reporting showing application performance and availability.
. More efficient problem identification and action to resolve issues.

Increased speed of access to information and functionality to drive management
. Faster load times for views and results.
. Improved and simplified management pack authoring experience

The Operations Manager 2007 R2 beta integrates the functionality delivered within the Cross Platform Extensions Beta. New betas of the Interoperability Connectors will available shortly through the Operations Manager R2 Connect program.

Support for the R2 beta can be found through the following:

For general questions on the Operations Manager 2007 R2 beta, please use the existing newsgroups at http://technet.microsoft.com/en-us/opsmgr/bb839593.aspx

For questions relating to Cross Platform and the Interoperability Connectors, we are excited to launch the new forums available at:

Cross Platform Monitoring – http://forums.microsoft.com/TechNet/default.aspx?ForumGroupID=604&SiteID=17

Interop Connectors – http://forums.microsoft.com/TechNet/default.aspx?ForumGroupID=605&SiteID=17

Categories: SCOM Tags: , ,

Using the SDK to manipulate alerts

November 11th, 2008 jpavleck 1 comment

A quick disclaimer, I’m not a programmer. I’m a scripter. My code reflects that – meaning it has plenty of room for improvement. Not to mention, this is a learning aid and as such doesn’t need to be absolutely amazing. Now, on with the show.

When you’re dealing with custom alerts, and using something like the ResolutionState field to manipulate who gets what alert, you need to create a battle plan. A method of attack if you will.

One way I do this is to create my alerts with a naming convention of <Base Criteria><Sub Criteria> – My Alert.

If I wanted to create a large number of alerts for a specified department, I’d create my alert names with a base criteria of the department, like “Windows Admin Group”. I then use the subcriteria to specify what subgroup the notification should be sent to, or what particular object this alert is for. So my alert names would look something like “Windows Admin Group – CPU Usage – High CPU Usage on Special Server” or “Windows Admin Group – Exchange Admin – Low Memory Reported”. I’m using examples which you can already easily limit right now, but the methodology remains the same for custom events as well, like “Widget Support – DBA Support – The widget app has a sql fault! Oh no!”.

So, now we have the base criteria ready. And I’ll assume you’ve gone and setup the alert resolution states like I’ve shown you before. Now we’ll work on building an application that works with the SDK service to change these alert states. This method is extremely fast and robust; in testing I’ve been able to process 10,000 alerts to 15 different alert resolution states in under a minute – a time impossible to achieve via the powershell methods.

I’m building this app in VB.Net, and it’s not using much error checking. It’s fairly simple, but it’s easy to build upon and alter to your needs.
I’ve also created a domain user to authenticate to the SDK service, and added it to the OpsMgr admin group.

First we need to build the framework. Be sure to reference the 2 DLL files “Microsoft.EnterpriseManagement.OperationsManager.Common.dll” and “Microsoft.EnterpriseManagement.OperationsManager.dll” located in your <Install Dir>\System Center Operations Manager 2007\SDK Binaries folder.

Imports System
Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Imports System.Text
Imports System.Security
Imports Microsoft.EnterpriseManagement
Imports Microsoft.EnterpriseManagement.Administration
Imports Microsoft.EnterpriseManagement.Configuration
Imports Microsoft.EnterpriseManagement.Configuration.IO
Imports Microsoft.EnterpriseManagement.Monitoring

Module StateChanger

Sub Main()

First we’ll create a comment to use when we update the alert. This is optional, but it’s helpful to let others know how we’re doing this

Dim comment as String = "Resolution State Changed by my awesome StateChanger App!"

Then we’ll create another string to hold our search syntax for our base criteria. I’ll keep using “Windows Admin Group” here.

Dim baseCriteria as string = "Name LIKE ‘Windows Admin Group’ AND ResolutionState = 0"

Next, we’ll setup our connection the RMS. First we setup the user.

Dim mgSettings as New ManagementGroupConnectionSettings(RMS)

mgSettings.Domain = "YOURDOMAIN"
mgSettings.User = "UserName"

The password criteria is a tad annoying, as it uses SecureString. We can’t just blindly cast a string to SecureString, we have to do some work first.
So we first create a string with our user’s password in it.

Dim myPlainPassword as string = "GaurhothRox!"

Then we create a new SecureString object, and loop through our password Appending each character from our plain password to it. Voila, a securestring password. Woohoo!

Dim securePass as New SecureString()
For Each chr as Char In myPlainPassword
securePass.AppendChar(chr)
Next

NOW we can assign that to our password.

mgSettings.Password = securePass

Now we can actually connect to the RMS.

Dim mg As ManagementGroup = New ManagementGroup(mgSettings)

Now we search for all the alerts that match our base “Windows Admin Group” criteria with a res state of 0.
We first take the baseCriteria string and convert it to a MonitoringAlertCriteria object, then use that to fetch all the matching alerts.

Dim alertCriteria As MonitoringAlertCriteria = New MonitoringAlertCriteria(baseCriteria)
Dim alerts As ReadOnlyCollection(Of MonitoringAlert) = mg.GetMonitoringAlerts(alertCriteria)

Then we loop through all of those alerts, seeing if any of those match our sub-criteria. If any do, we’ll go ahead and change it’s Resolution state and update it, adding our comment to it.

If (alerts.Count > 0) Then ‘ Mae sure we actually have something to deal with!
For Each Alert As MonitoringAlert In alerts
If InStr(Alert.Name, "CPU Usage", CompareMethod.Text) = 0 Then
Console.WriteLine("Found a ‘CPU Usage’ alert – ID: {0}", Alert.Id)
Alert.ResolutionState = 10
Alert.Update(comment)
ElseIf InStr(Alert.Name, "Exchange Admin", CompareMethod.Text) = 0 Then
Console.WriteLine("Found an ‘Exchange Admin’ alert – ID: {0}", Alert.Id)
Alert.ResolutionState = 11
Alert.Update(comment)

End If
Next
End If
End Sub
End Module

There you go. You’ve just written your first SDK application. You can expand it as much as you want from there! Run it every 5 minutes or so, and there you go.

Categories: SCOM, SDK Tags: , ,

New Contest and a new utility: SCOM-CloseAll

November 3rd, 2008 jpavleck 7 comments

Greetings my fellow OpsMgr admins! I’m back from vacation with 100% more married then before! And I come bearing gifts!1

Yes, that’s right, it’s contest time again. This time I’m offering up 2 things: 1 autographed copy of System Center Operations Manager 2007 Unleashed. This is a fairly rare item as it’s one of less then a half dozen signed by all the authors. I had to do dirty dirty things to Cameron to get it. I’m not proud, but for my peeps I go the distance!

A copy of SCOM2007 Unleashed signed by all the authors

A copy of SCOM2007 Unleashed signed by all the authors

The second item is a little teaser prize package from the wonderful folks over at Sapien Technologies. Soon I’ll be posting a new contest with oodles of Sapien prizes – from the PrimalScript Universal Resource Kit to flying monkies and more! That entire contest/post will be centered around setting up PrimalScript as the development environment for us OpsMgr Admins. You’ll love it! This current package, however, isn’t as illustrious: It contains a Sapien portfolio, PicoPad, Post-It notes, a credit card sized flash drive and an awesome pen!

A little teaser of what's to come from Sapien

A little teaser of whats to come from Sapien!

Additionally I’d like to offer up some SDK app loving I’ve been baking all day!

I’m working on a neat console application that was initially called Alert Utility, and is now just called the OpsMgr Utility. It reports on a variety of things and allows you to interact with the system in a variety of ways.
I’m not much of a programmer, so I need to start out slow – so the first thing I whipped up is a little utility called SCOM-CloseAll. Simply put, it takes 2 arguments – your RMS and an optional comment to insert when you resolve the alert. It then connects to the SDK service on the RMS, retrieves all open alerts, then resolves them. And yes, it does ask if you truly want to do this. It’s in beta, so I’d love it if you all could test it out for me. This is a perfect solution to handle those pesky alert storms and another tool in the box.
Take a look at the screenshots then download it here.

Showing the initial startup of the Alert Closer

Showing the initial startup of the Alert Closer

Showing the progress bar indicating what % of alerts have been closed

Showing the progress bar indicating what % of alerts have been closed

  1. Even though no one bought me anything OR even got me a giftcard. I guess I’m the only one that does that stuff at other peoples sites heh []