Jaa


What is the state of a particular monitor for all of my objects?

I saw an interesting question today on one of the newsgroups. Basically the question was "How can I find out the state of a particular monitor across all the objects that I have". Unfortunately, a state view in the OpsMgr console doesn’t provide you this information. Instead it provides you the overall state of objects of a particular type (Logical Disks for example). However the SDK has a very convenient function to accomplish this. The attached script takes two parameters:

MonitorName - This is the name of monitor as it appears in the UI

TargetName - This is the name of the target/class as it appears in the UI.

Here is how you run the cmdlet:

1 - Open the OpsMgr CommandShell

2 - Type the following: C:\InstanceMonitorState.ps1 -monitorName:'Logical Disk Free Space' -targetName:'Windows Server 2008 Logical Disk'

Here is the output the you will see:

dc1.contoso.com;E: - Success - 9/11/2008 9:29:50 PM
dc2.contoso.com;C: - Success - 9/11/2008 8:24:17 PM
dc1.contoso.com;C: - Success - 9/11/2008 9:29:49 PM

 

InstanceMonitorState.zip

Comments

  • Anonymous
    September 11, 2008
    PingBack from http://www.easycoded.com/what-is-the-state-of-a-particular-monitor-for-all-of-my-objects/
  • Anonymous
    September 12, 2008
    Boris, your work is great as usual.I really think all of your awesome tools should be given more authority and included, say, in a Resource Kit where customer can find them more easily.The issue with blogs is that we are having so many of them and the information is scattered around the web, and difficult to find...
  • Anonymous
    September 13, 2008
    I completely agree with Daniele again a great PowerShell script for OpsMgr. I think quite some customers would love to have all your great tools (like MPviewer) and your scripts in one complete download like in the Resource Kit.Another way to have your scripts easier available would be to publish them on the PowerShell Code Repository. This Repository was online searchable from the PowerGUI editor. And is used by quite some OpsMgr admins imo.