Archive

Posts Tagged ‘SCOM’

Just a few things

March 3rd, 2010 jpavleck No comments

So my current contract has ended and while I have some spare time I’m going to be focusing fiercely (Well, fiercely for me anyway) on “Project KONOP”, the OpsMgr Web Service. I’ve even been so bold as to take the liberty in registering SCOMWS.com to host it.

And a new project, still unfinished – SystemCenterSearch.com. Hoping to make it a very basic ‘portal’ for all things system center – but mainly centered on the most recent issues, most common problems and solutions, and a simple search that looks through all of the system center websites for your query.

And for you Redditors out there I’ve made two new sub-reddits. /r/SystemCenter – dedicated to all things System Center related and /r/SCOM – dedicated to just OpsMgr stuff (Of which we know I’m kind of partial to).

So just a quick note to let you know what I’m working on. Now, I’m back to working on website front-ends and building a web service using a 5 year old book from MS Press heh.

More Web Service Fun

January 10th, 2010 jpavleck No comments

Or you could also title this “How to talk your company into buying you a high end gaming rig for your desktop”

So I’ve been playing with this web service I’m writing for OpsMgr. I was doing a bunch of practical things with it, that you’d normally want to do with it – but then I thought screw that, let’s do something fun with it.

I like to play Team Fortress 2. I like to monitor things. Why not put them together?

Well friends, once you’ve made a web service that talks to the system, it’s fairly trivial to write something to take that information and put it somewhere else.

Let me demonstrate (And yes, you probably do want to click and view the larger version of this)

Team Fortress OpsMgr

Stay Tuned…. Video coming soon.

Categories: Fun, SCOM, SDK Tags: , , ,

No longer an MVP

January 3rd, 2010 jpavleck No comments

Alas, with the ending of my 12th month as a Microsoft Most Valued Professional, ends it, period. I didn’t get renewed.

Just as well though.

I could go on a slight diatribe about it all, but I’ll just keep it bottled in.

Until then, let me tell you, writing a web service is a lot harder than I thought – I might be eliciting the help of the community at some point. And yes, I am still slowly trudging along with it. It’s mainly been redesign redesign redesign. Though I’m hoping to have something ‘soon’.

Categories: Community, SCOM Tags: , , ,

How to monitor everything

October 4th, 2009 jpavleck 4 comments

Operations Manager has always been a fairly powerful tool. Even in it’s MOM2000 and MOM2005 variations it has a lot to offer. Sadly, in all the organizations I’ve been to, it’s never been utilized to it’s fullest.

I want to help change that.

Do you have a ‘batch’ server at your organization? You should. A batch server is a general all purpose scripting machine. It’s one you use to automate a lot of tasks that you don’t want to have a dedicated machine for, but are more important then you’d want to trust to run on your regular workstation. It doesn’t need to be anything particularly powerful – my batch server is a small Dell pizza box with now outdated hardware: Pentium 4 3.4Ghz CPU, maxed out at 2GB of ram, with an 80GB hard drive. Up until recently it ran Windows 2000 – it now runs Server 2008 standard.

A lot of the stuff I’ll be writing about will have a batch server in mind. I run these scripts there, and use OpsMgr to interact with the data. You’d be amazed at how much more you can accomplish and automate things with a simple ‘throw away’ desktop.

To start out, let’s get OpsMgr to record some stock prices. This will be a powershell script, that I’ll be running on our batch server. Read on to see how I do it.

Read more…

Back in the saddle again

September 28th, 2009 jpavleck 2 comments

Sorry for my lengthily  hiatus folks. I honestly never meant to leave you stranded! There was a lot going on, and most of it wasn’t OpsMgr related, so I neglected you, fair reader. But my 33rd birthday was on the 26th and with it I vowed to not do it to you all again, so I am back!

Hopefully in a day or 2 I’ll have a new post for you – How to get other information into OpsMgr.

What do I mean by other information? Well, in my test scenario, that will be the current stock price for a symbol – we’re going to use MSFT.
There are many many ways to get information directly into SCOM. I’m going to use what *I* think is the easiest method – and that’s a PowerShell script that queries for the given symbols last price and then writes that into a custom performance counter.

To prepare for it, make sure you’re running the most current version of PowerShell 2.0 (Which is CTP3, if you’re on Windows 7 though, you’re fine). If you have UAC enabled, you’ll also need to run this script in an elevated prompt.

I was hoping to have the post out for you today – but an extended power outage at home ended that dream.

So in short: I’m back.

Categories: Pavleck.NET Tags: , ,

Health Service Script events 1 & 1000 on Domain Controllers

February 13th, 2009 jpavleck 2 comments

This particular issue happens a lot on Domain Controllers, and especially DCs that you’re running as a gateway server. In the OpsMgr event log, you’ll receive a lot of events from the Health Service Script source with event IDs 1 and 1000.

OpsMgr Event ID 1000 Warning from Health Service Script

OpsMgr Event ID 1000 Warning from Health Service Script

The text of the alert is:

Event Type:    Warning
Event Source:    Health Service Script
Event Category:    None
Event ID:    1000
Date:        2/13/2009
Time:        12:18:16 PM
User:        N/A
Computer:    BADDC01
Description:
AD Database and Log : The script ‘AD Database and Log’ failed to create object ‘McActiveDir.ActiveDirectory’.
The error returned was: ‘ActiveX component can’t create object’ (0×1AD)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

and

OpsMgr Event ID 1 Warning from Health Service Script

OpsMgr Event ID 1 Warning from Health Service Script

the text of which is:

Event Type:    Warning
Event Source:    Health Service Script
Event Category:    None
Event ID:    1
Date:        2/13/2009
Time:        12:18:09 PM
User:        N/A
Computer:    BADDC01
Description:
AD Op Master Response : The script ‘AD Op Master Response’ failed to create object ‘McActiveDir.ActiveDirectory’.  This is an unexpected error.
The error returned was: ‘ActiveX component can’t create object’ (0×1AD)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Cause: For whatever reason, the Active Directory helper object is not being installed as part of the active directory management pack.

Solution: Install the helper object OOMADs.msi. This can be found in 1 of 2 places.
First, look in the install directory of OpsMgr on the server with the issue – typically that would be C:\Program Files\System Center Operations Manager 2007\HelperObjects

If it’s not there, then you can also find it on the install media under \HelperObjects\<ARCH> (Where arch is amd64, i386 or ia64).
Restart your agent, and it should clean itself up.

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: , ,

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

It’s bound to happen: How to handle alert storms

October 6th, 2008 jpavleck 2 comments

No matter how careful you are. No matter how many times you’ve checked your parameters and state conditions. No matter how many times you tested it out of production.

It happens.

Some misconfigured rule – or even an event that happens much differently in a production environment then in test – begins firing off alerts.  Maybe you don’t notice it right away – perhaps you haven’t setup notifications for this particular rule.

But then, one day you start getting emails from your RMS with scary event IDs like 2115 (Data source not receiving a response), 25017 (Backlogged event processing) and 29202 (Inconsistent database state).

So you decide to investigate, and open up the Operations Console.

Only… wow, it’s running a lot slower then it normally does. Insanely slow.
You click onton Monitoring > Active Alerts – and then wait. And wait some more. As our once friendly green progress bar seems to start taunting you. So you lock the desktop and go chat up that new girl they hired. Wow, she’s pretty amazing right? Funny and smart as a whip, too.

Feeling happy and content after working your suave IT skills on her, you literally float back to your desk and unlock your desktop. Wasn’t there something bothering you before? Oh well, must have not been all that important. You peek up from your cube and catch a glimpse at her, then move those eyes down and see your still open Operations Console. The evil green bar still chugging away. But then you also see why…

A rogue rule quickly causes the alert count to soar to over 140,000

A rogue rule quickly causes the alert count to soar to over 140,000

And your nemesis, the green progress bar, it still keeps going. That number is rising faster then your blood pressure right now.

Must be a bug, eh? Ok, well, we’ll just check it via SQL to be sure – so you open SQL Studio and run

SELECT Count(*) FROM Alert

And then your informed, without any gentleness of a WWII nurse as depicted in the movies, that you have a lot of open alerts.

Over 250,000 alerts according to SQL

Over 250,000 alerts according to SQL

Wow! You better fix this!
And you better do it on the RMS, because it’s taking forever from your desktop.
You already have a general idea of which rule did it – that active alerts panel should be filled with it. So your first stop is to get back to authoring panel and either disable that rule or setup some proper alert suppression. Then we just have to deal with cleanup.

You turn, as always, to our friend PowerShell to help us out. Surely the easiest and most obvious solution to this problem is to run

$alerts = Get-Alert | Where-Object {$_.Name -match "MyRule"}
ForEach($alert in $alerts) {
$alert.ResolutionState = 255 # Close the alert
$alert.Update("")
}

Then just wait for the nightly alert grooming to happen to nudge it along with a SQL exec p_AlertGrooming

Only, when you try to do it, you get an OutOfMemory exception.

Out of memory!

Out of memory!

Now what to do?! The console is crippling slow – if you had to close the alerts that way your company would have gone bankrupt during the Dot Com Re-Burst of 2799! And when you try with PowerShell, you’ve run out of memory!

That’s where I was, until I talked to an unnamed friend((If you want to be named, just let me know. Better to err on the side of caution and all that)) from MS that really helped me out. That, combined with hindsight, allows me help you out as well!

How To Clean Up an Alert Storm

  1. Try the console. We’re going to assume it’s running slower than <Insert joke about large celebrities in the 1980s doing something they’re known for>, so we’ll move on.
  2. Try the Command Shell. $alerts = Get-Alert |? {($_.ResolutionState -eq 255) -or ($_.Name -match “Rule name if you know the naughty one”)}  – Running out of memory still?
  3. Try the same command, only instead of piping it to Where-Object, use the builtin filter object.
    $alerts = Get-Alert -criteria ‘WHERE ResolutionState = 0 AND Name LIKE ”%Rule Name%”’
  4. Still OOM? Try running both of those commands on the RMS, or another management server. Pick one with the most amount of memory, and hope for the best.
  5. Still receiving Out of Memory exceptions? Let’s stop using the OS to manage our memory. Open RegEdit and navigate to HKLM\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Config Service – change the value of Should Manage Memory from False to True. Stop and restart the config service.
  6. Now try your command again. It will take some time, but it will complete. Now lets try running the whole script to fix this:
    $alerts = Get-Alert | Where-Object {($_.ResolutionState -eq 255) -and ($_.Name -match "MyRulename")}
    ForEach($alert in $alerts) {
    $alert.ResolutionState = 255
    $alert.Update("")
    }

    (Alternately, you can use the Resolve-Alert cmdLet, but from testing it’s not quite fast enough to keep up with the next step)

  7. Now when you ran step 6, it probably gave you a lot of errors when attempting to update the alert. That’s because there’s a small window of freshness to your alert object, and if you don’t update it within that window it becomes stale and unable to be used. To fix that, change the ForEach to look like this:
    ForEach($alert in $alerts) {
    $freshAlert = Get-Alert $alert.id
    $freshAlert.ResolutionState = 255
    $freshAlert.Update(”")
    }
    That will grab a fresh version of that alert and update it.
  8. But what if you have thousands upon thousands of alerts? The above solutions could conceivably take days to run. Don’t worry, there’s a way around that, too.
    Before I show you, please be noted that this METHOD IS NOT SUPPORTED BY MICROSOFT and use of this method could possibly BLACKLIST YOUR OpsMgr INSTALL. It is the answer given out occasionally though, much to the dismay of the product group, so use that information how you’d like.
  9. Connect to your operations manager database and run the following update. This one updates every rule, but you could narrow it down with an additional AND WHERE RuleName = “My Rule Name”
    UPDATE Alert
    SET ResolutionState = 255
    WHERE ResolutionState = 0 AND TimeResolved IS NULL
  10. When that’s completed, you’ll need to update the TimeResolved via:
    UPDATE Alert
    SET TimeResolved = ‘20-06-20 00:00:00.000′
    WHERE ResolutionState = 255 AND TimeResolved IS NULL

    < Make TimeResolved be some day in the past so it will groom them out.

  11. Either wait overnight until the grooming jobs kick off or run
    Exec p_AlertGrooming
  12. You’re done. Now don’t do it again!

[print_link]

The Alert Object’s Update method – bug, or intended feature?

September 24th, 2008 jpavleck 1 comment

I’ve talked about this before, calling it the hidden ‘nag mode’ inside of SCOM, but I really need to find out whether it’s intended or not.

Please see the following bug report I filed @Connect.

Essentially, if you grab an alert object via Get-Alert, then call the Update method, one of two things will happen depending on what parameters you fiddled with.

Open up the command console and grab an alert, something like $oneAlert = Get-Alert | Select -First 1
Now, change something in that alert, such as the resolution state ($oneAlert.ResolutionState = 111), then call $alert.Update(”") (Or comment it with $alert.Update(”Changed resolution state”)).

What happens?

As you expect, not much, just the alert resolution state was changed. Now grab another alert and call the update method alone ($alert.Update(”")) or with only a comment ($alert.Update(”Testing an issue”)).

What happens?

Whatever notification channel attached to that alert – usually email – will now fire again. So is it a bug, or not? If it isn’t a bug, then that’s excellent – we have more tools at our disposal and can now easily add that nag mode. If it’s a bug, that means it will be fixed, and as such shouldn’t be used.

There are additional bugs I need to file, regarding how a lot of the OpsMgr Commandlets, while stating they support the common parameters, actually don’t. And how the filter parameter should follow basic syntax and use “-Filter” instead of “-Criteria”. But that’s for another post.

PS: It’s my birthday on Friday. Perhaps you’d like to buy something from my wish list? Or at least enter the contest. The next 2 will have considerably better prizes, I promise!