Friday, July 30, 2010
Author: Stefan Koell Created: Tuesday, September 09, 2008 1:58:59 PM
News and updates about code4ward, Royal TS and other geeky stuff...

Spent a couple of days in Port Angeles, Seattle and of course in Redmond. It was my first TAP meeting and I was really impressed. Meeting all those guys behind the scenes as well as meeting OpsMgr admins from all over the world was quite an experience. I also had the honor to sit next to Pete Zerger who runs SystemCenterForum.org and as we were talking we realized that we knew each other from our online life. Of course I am a regular visitor of his community site, there's tons of valuable information and my hacky script Set-NotificationForAlert.ps1 seems to be well known in the community.

Here some pictures and note that we got only 4 hours rain in 10 (!) days - which is quite impressive for that season:

Hurricane Ridge (Olympic National Park) feels almost like back home in Tyrol:

Seattle1 Seattle2

That's what I call a burger! (Actually it's called "Hungry Bear Burger") I picked up one of those on our way to Forks to see what a rainforest will look like:

Seattle3

Now to the Rainforest:

Seattle4 Seattle5

Yes, this is the Pacific:

Seattle6 Seattle7

Seattle Skyline in the Mist and of course the Space Needle:

Seattle8 Seattle9 Seattle10

Microsoft TAP Meeting:

Seattle11

Shopping Malls everywhere (somehow we were also lucky because there was a shooting one day before we went there, one 16 year old kid died):

Seattle12

back_soonThe next 2 weeks I'm in Redmond and Seattle. I'm attending the TAP meeting for the next OpsMgr release and some friends are attending a SQL server conference in Seattle. Anyhow, I have now the chance - for the first time - to see the MS campus and I am really excited about it. Of course, I am also looking forward to meet all the nice guys from the OpsMgr product team.

When I'm back I will continue the work on the release of Royal TS 1.6.0. The code is pretty much ready to roll.

One little teaser: Royal TS will sport a very flexible way to execute tasks (command line) on one or more connections. You will have access to almost all connection settings from these commands by using special variables. I'm sure you'll love it.

By default I will ship at least 2 pre-defined tasks: "ping.exe $Hostname$" and "ping.exe $Hostname$ -t"

For those who like to use a "Wake On LAN" helper tool, someone could easily implement a task like "wol.exe $PhysicalAddress$"; yes a new field to store the MAC address was added too Open-mouthed

Everybody can create new tasks and extend Royal TS. For example: starting the eventviewer or computermanagement MMC for the selection. Open a directory, file or URL. And many, many more.

image As maybe many of you observed as well, the Remote Desktop components shipped with Vista and XP SP3 (especially XP!) are not as stable that the previous versions. My personal experience includes sudden disconnects (when heavy graphics in the remote sessions are involved) as well as "stuck" sessions. These sessions are stuck when you try to gracefully disconnect a remote session. Somehow - and don't ask me why - the remote desktop component thinks it must try to reconnect, which never happens. The nice reconnect screen has a disabled or useless "Cancel" button. So, the session is "stuck".

Only remedy (now): Shutdown Royal TS and restart it.

Royal TS get's a new menu item "Force Disconnect" to destroy the ActiveX control itself by force and should only be used in that rare occasion.

Read More »

... but those who are may have received a conference guide like this:

image

How do you spell connect?

Thanks to David Allen for this.

Read More »

My new and shine web site just got the new blog module (3.05.00). So far everything's fine and I already post from Windows Live Writer without any plug-ins and stuff. smile_teeth

I got a lot of feedback lately, that Royal TS needs an import functionality. I completely agree, but I soon realized, that almost everyone has different requirements. So thinking through all possibilities and providing a powerful UI which can handle all different requirements would be very time consuming.

So I thought, providing a sample script which shows how this can be done should get you started...

Click here to get to the script.

As most of you already saw, code4ward got a complete new face. Here some facts about the relaunch:

  • Join The DotNetNuke Powered! ProgramThe new web page runs on the DotNetNuke platform. I never was a huge fan of DotNetNuke and if I could, I would still try to avoid using it. Don't get me wrong, I think it's a great platform with a great value and a huge and very professional community attached. I just really don't like dependencies...
  • The skin is a professional one, which was bought and customized. I am really happy with the look of the site.
  • Some of the graphics were made by a friend of mine who is a very talented designer with fresh and crazy ideas. Thanks Armin! Some other graphics came from iStockPhotos
  • The previous site (based on Community Server) was hosted on a machine at my place. My bad experience with my (lately very unstable) ISP forced me to move the site somewhere else. A friend of mine (Netmonic) offered me to host my virtual machine for a very low monthly rate. So in fact, this is quite new: Now I not only have to pay for power and an internet connection, I also must pay for hosting; not much but still.
  • The web site is now hosted on a Windows 2008 / IIS 7 machine running SQL Server 2008. Was quite a learning experience.
  • The download tracking and statistics code was self written. It's a C# HTTP Module using LINQ. I will soon release the code for that.

ComponentFactory is offering their Krypton Suite (Value: $299) for free to MVPs and .NET bloggers. Go, ckeck it out here: http://www.componentfactory.com/blog/?p=328

CheckServiceState Script CheckServiceState Script

If you ever wanted more control how to monitor windows services with Operations Manager 2007 you most likely realized, that you have to do it all by yourself with a custom script.

I had at least two major problems which forced me to use a custom script:

  • It seems that you cannot monitor the status of a service which has the startup type set to "Manual". (There is a parameter in the overrides dialog called "Alert only if service startup type is automatic" but it doesn't have any effect, the health state simply doesn't change)
  • When using templates to monitor a windows service you cannot override the monitor to only monitor a subset of services using a group. The group just doesn't show up in the list

So this is my approach to windows service monitoring:

First of all, let's set up a Windows Service monitoring using the standard Management Pack Templates Wizard. In this example: "Print Spooler". In the monitoring wizard select or create a destination management pack, here: "Windows Service Monitoring".

I use the template wizard because I can use the discovered service class to target my own script and I get all the other goodies (performance monitors, baseline rules, etc).

After a while the service you just configured to monitor will be discovered. Now let's setup a group:
Create a new group with a name like "Print Spooler Service Group" in the "Windows Service Monitoring" management pack. In this example I use explicit group members but you can also use dynamic membership of course. The beauty is, that your group can (and should) contain the discovered service instances:
bws1

Next, bring up the monitors the template wizard creates for us:
bws2

There you should see the (very inflexible and buggy) availability monitor:

bws3 

Right-click on the "Service Running State" monitor and select "Overrides > Override the Monitor > For all objects of type: Print Spooler". In the Override Properties, disable the monitor (check "Override" for the Parameter Name "Enabled" and change the "Override Setting" to "False").

Next, right-click on the "Availability" node and select "Create a monitor > Unit Monitor...". In the unit monitor dialog, select the "Scripting > Generic > Timed Script Two State Monitor" as monitor type and place it in the same Management Pack "Windows Service Monitoring".

In the General properties page we can now target the script to the "Print Spooler" class. Also be sure to disable the monitor by default (We enable it later using a group override).
bws4

Pick a schedule which makes sense to you (I recommend every 5 minutes but depending on your environment I suggest that you don't go below 2 minutes).

In the Script page, provide a script name, like CheckServiceState.vbs and paste the attached script into the script area.

The script takes 3 parameters (documented in the script) but for a standard scenario you can just use:
"$Target/Property[Type="MicrosoftSystemCenterNTServiceLibrary!Microsoft.SystemCenter.NTService"]/DisplayName$" "Running" "Auto"

Because we already target the print spooler class we can use a dynamic parameter to pass on the service name. Parameter 2 and 3 (which is optional) can be used to define the desired status and startup type. Please be sure to encapsulate each parameter in double-quotes - just to be on the safe side.

Next let's define the health expressions:
bws5 
bws6 
bws7

And finally the alert:
bws8

I suggest an alert description like:
The state of the monitored service '$Target/Property[Type="MicrosoftSystemCenterNTServiceLibrary!Microsoft.SystemCenter.NTService"]/DisplayName$' on '$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$' is invalid: $Data/Context/Property[@Name='AlertText']$

After you created your monitor, enable it using an override for the group we created earlier.

As last (optional) step I suggest to create a state view containing the Print Spooler instances and scoped to the group where we enabled the monitor.
bws9

Of course, it would be much better if that functionality and flexibility is provided by OpsMgr out of the box...

cheers

Once again, a little post to share with you guys about Operations Manager Tasks - this time using Powershell. First a little background story: Current version of Operations Manager 2007 (SP1RC) has still some nasty bugs and it seems that especially the events view doesn't get much attention from the product team.

The event view doesn't HTML-Encode the event description in the details pane. Which is bad if you have to look at events (published exceptions for example) with fragments of XML or HTML included. This information just doesn't appear in the preview pane.

So, the first thing which came to my mind is: Ok, then. How about some kind of console task which executes a quick Powershell command to dump out the event details using the Get-Event Cmd-Let.

Next Problem: You can create an event task and put a dynamic parameter $ID$ in it. However, starting the task using the actions pane on the right always passes the same ID (I guess the ID from the first event selected when the view gets loaded) to the task - regardless which event was selected!

Lucky me, there is a workaround: When you execute the task using the Actions menu in the console, the task will always get the ID from the selected event.

So, now the interesting stuff: How to setup such a task?

  • First create a console task for events using the authoring section in the console.
  • When defining the command, set the application to: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
  • Set the parameter to: -PSConsoleFile Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Console.psc1 -NoExit .\Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1;Get-Event -Id $ID$
  • Set the working directory to: C:\Program Files\System Center Operations Manager 2007
  • Finally, uncheck the "Display output when the task is run" checkbox

That's it. Enjoy...

       
 

Search Blog

       
         
 
You must be logged in and have permission to create or edit a blog.
Privacy Statement  |  Terms Of Use
Copyright 2010 by code4ward - Stefan Koell
Cloud Server hosted by | Web Design