In OpsMgr 2007 we had the option to create a RSS Feed for Alerts using the Operations Web Console.
Selecting the RSS button would return the following RSS Feed info.
In System Center 2012 Operations Manager (OM2012) we don’t have that option anymore. But this is not really an issue, because with a little bit of PowerShell magic, we can create our own OM2012 Alert RSS feed with all the Alert information we want. And that is exactly what I did when I saw an internal question about this feature missing in OM2012.
Environment information:
Pre-requisites:
What is PowerShel PipeWorks?
PowerShell Pipeworks is a Framework for making Sites and Services with Windows PowerShell. Read more about Pipeworks here.
Installation steps for creating an OM2012 Alert RSS feed
1. Download PowerShell PipeWorks Module. 2. Copy Module to Management Server where you have installed:
3. Unblock PipeWorks.1.0.2.6.zip file before extracting (you can also use the PowerShell v3 unblock-file Cmdlet if you have PowerShell v3 installed)
4. Extract the PipeWorks Module to your default PowerShell Module folder. You can check the default folders where PowerShell is looking for PowerShell modules using the following PowerShell command:
I personally have created a D:\PowerShell\Modules folder to store the PipeWorks Module and added that path to my psmodulepath variable. You can add a new Module Path using the following Command in PowerShell:
5. Create an IIS Application Pool for PipeWorks Change the Identity of the Application Pool to use the OM2012 SDK Account (Microsoft System Center Data Access Service account).
6. Add PipeWorks Application
Enter Alias and Select previously created Application Pool. Enter Physical Path where to store the later to be created OM2012 RSS Alert files. Create Folder PipeWorks (C:\inetpub\wwwroot\PipeWorks) if that folder does not exist.
And configure the OM12_SDK Account to connect as configuration.
And finally Test Connection.
7. Use PipeWorks Module to create an OM2012 Alert Web Service, which we can use as an RSS Feed. a. Open PowerShell ISE b. Load PowerShell PipeWorks Module in PowerShell ISE.
c. Create the following Function in the PowerShell ISE:
function Get-MySCOMAlert { <# .Synopsis Shows SCOM Alerts .Description Shows SCOM Alerts for OM2012 .Example Get-MySCOMAlert .Example Get-MySCOMAlert -ResolutionState New .Example Get-MySCOMAlert -ResolutionState Closed #> [CmdletBinding()] param ( [Parameter(Mandatory=$True, ValueFromPipeline=$True, ValueFromPipelineByPropertyName=$True, HelpMessage='What is the ResolutionState of the Alerts you want to filter on?')] [string[]]$ResolutionState, [int]$First=50 ) process { if(!(Get-Module OperationsManager)) { Import-Module OperationsManager } #To convert string ResolutionStates to integers switch ($ResolutionState) { New {[int]$ResolutionState = 0} Closed {[int]$ResolutionState = 255} default {return "$($ResolutionState) is unknow ResolutionState"} } #end Switch Get-scomalert -ResolutionState $ResolutionState | sort -Property TimeRaised -Descending | select Severity, Priority, Name, TimeRaised -First $First } #end Process }
We can test the Function by selecting the function and hitting F8 Running the following command: Get-MySCOMAlert -ResolutionState "New" -First 2 returns the latest 2 OM2012 Alerts with ResolutionState New.
d. Convert Function to PipeWorks Web Service by running the following PipeWorks Command:
e. Check the Web Service in your Web browser by running the following command from the PowerShell ISE
You should see something like this:
You can now test the Get-MySCOMAlert Web Service by entering a ResolutionState and First (number of Alerts you want to return) Result:
8. Retrieve RSS feed URL. Now we have created the Get-MySCOMAlert Web Service we can add some parameters to retrieve the RSS Feed for the OM12 Alerts.
This will return the RSS Feed for all OM2012 Alerts with a ResolutionState of new and only shows the last 2 new Alerts.
Have fun and let me know some other cool things you have created using PowerShell PipeWorks!!
DISCLAIMER: THIS PROGRAM SOURCE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY REPRESENTATION OR CONDITION OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO CONDITIONS OR OTHER TERMS OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE USER ASSUMES THE ENTIRE RISK AS TO THE ACCURACY AND THE USE OF THIS PROGRAM CODE OR RESULTING EXECUTABLE CODE
We have published a new blogpost on the System Center: Operations Manager Engineering Team Blog about SQL Server Collation Requirements.
“There has been quite a bit of confusion over the requirements for SQL Server collation for the various components of System Center. We didn’t make a coordinated effort here to make this as easy as it could and should be. The documentation has conflicts within itself in some cases. We will be cleaning up the documentation over the next few days so that it is consistent and clear. Since the documentation is still component focused, we want to take this opportunity to provide a holistic view of the SQL Server collation requirement across the suite. This will hopefully clear things up and over time it will become even clearer as we make changes in the product itself to be consistent on this requirement.”
Read more here.
Our Private Cloud team published a blog post about building a cloud with PowerShell!
“Windows Server 2012 introduces vastly improved Windows PowerShell support with over 2,300 cmdlets to manage just about everything in the platform. This means you can now use Windows PowerShell to automate all of the IT tasks around cloud datacenter management, starting from deploying your cloud infrastructure servers, through on-boarding virtual machines onto that infrastructure, and ending with monitoring your datacenter environment and collecting information about how it performs. Practically everything is automatable!”
We already knew everything is automatable using PowerShell :-)
Yesterday we published a new KBArticle about Operations Manager Maintenance Mode.
It explains everything you want to know about Maintenance Mode.
What is Maintenance Mode? Maintenance mode is a feature in Operations Manager to suspend monitoring of an object during regular software or hardware maintenance activities like Software Update installations, Hardware replacements, etc.
We have released CU6 for System Center Operations Manager 2007 R2.
Cumulative Update 6 for Operations Manager 2007 R2 includes all previous cumulative updates for Operations Manager 2007 R2 and includes all cross-platform updates.
To download Cumulative Update 6 for Operations Manager 2007 R2, go to the following Microsoft Download Center website:
Download Cumulative Update 6 for System Center Operations Manager 2007 R2 (http://www.microsoft.com/downloads/details.aspx?FamilyID=694147f8-9691-4833-97af-0de918c60141)
Cumulative Update 6 for Operations Manager 2007 R2 resolves the following issues:
System Center Operations Manager 2007 R2 Cross Platform Monitoring Management Packs (http://www.microsoft.com/downloads/details.aspx?FamilyID=b15fef5c-e331-4006-8913-be376bb0e0c1)
My blogpost on the formatting changes for System Center Operations Manager 2012 in Update Rollup 1 has been published on the PowerShell Magazine website.
Take a look at my blogpost if you are interested in the PowerShell formatting changes that have been implemented after the release of UR1. Read more