SCOM Health Script/Audit

So, As part of my work at my company it’s my responsibility to perform bi-anual health check on all our SCOM clients.

Last year I’ve created a powershell script that checks and reports on the SCOM environment that it’s ran against. Things that the script put into an HTML file for me are things like

1. Uptime of the servers

2. Database last backup

3. Aggregations Behind on SCOM

4. Database free space on the ACS,DW,OPS and ReportServer databases.

5. Grooming Status

etc etc.

I’ve decided in the last month to start using the SCOM SDK with as to learn the SDK and refresh my programming knowledge, call it a challenge if you will.

So below is a screen shot of what the GUI looks like at this point, for now I’m just focusing on putting everything in listviews with some intellengence build into some of the list views, ie: turning the listview line red/yellow or green depending on the healthstate of the management server, turning the listview line red if the collation on the server/instance or on the database itself is wrong. The GUI will be enhanced and improved at a later stage, for now the information/data is the most important, after all the HTML file created by this application will be used instead of this GUI.



The user can then specify the saving location of the html file and save all information in the gui as an HTML file.

You specify the management server, for a SCOM 2007 environment you will specify the RMS, for SCOM 2012 SP1/R2 you specify any management server, you also specify the userid, password and domain of an domain account with sufficient permission to connect via the SDK, normally any account in the Operations Manager Administrators Role.

You can also specify a userid, password and domain to connect to the different databases, if not specified the account for the SDK connection will be used by the application to connect to SCOM.

The application picks up all the information required from the DatabaseServer name of the OPS db and DW from the registry and also using the SCOM SDK.

You will see that the Agent Properties and Agent Performance listviews are empty.

In the “Agent Properties” listview i will put the properties including “Proxy Enabled”, Port, Compression and Patch List. The idea is to check for hotfixes and UR/CU for the SCOM product and other properties. Grayed out agents will show gray and also colors to represent the health state of all other states, unintialized agents a.k.a unmonitored will show white in the GUI and HTML file.

The “Agent Performance” listview will show the last CPU and Memory performance counters for each and every agent for the last 7/4 hours.  In the HTML if the agent has not send either CPU/Memory in the last 7/4 hours the whole table row in the HTML file will show red so as to stand out in the report.

The SMTP server address, email address and port is retrieved from the SCOM notification channels, still have to think about multiple different SMTP servers and ports, which to use, maybe give the user a change to pick which one to use. The idea is to use this SMTP information to send the HTML report and Management Server alerts to me and to the SCOM engineers working on the account.

The large table OPS DB listview contains the largest tables in the OPS DB, any normal healthy environment will always have the performance and event tables as the largest tables in the DB, well at least that’s my best practise.

So there is still a huge amount of work involved in getting this application done, at the end of the day the hard work will be worthwhile for me as it makes my work and turn-around time less and quicker – I call this a win.

I will post new posts and screenshot in future.


3 thoughts on “SCOM Health Script/Audit

  1. Good stuff, how to I obtain a copy of this?

  2. Pingback: HASMUG 2014 |M1 – System Center News & Updates | Houston Area Systems Management User Group

  3. Hello,

    I’m also interested in some source files.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s