Wednesday, August 24, 2011

Stale/Gray objects in Operations Manager

Occasionally you'll have grayed out agents in your Monitoring view in SCOM.  This can be due to the fact that a server was decommissioned before you had a chance to properly uninstall the agent and delete it from the Administration pane.  Even after you delete it from the Administration pane the object may still appear grayed out.  For this, I turned to SQL Management Studio.


First I run this query against the OperationsManager DB:
SELECT * FROM dbo.[BasemanagedEntity] where FullName Like '%computername%'

This shows me all instances that still reside in the DB for that computer.  Scroll over the the IsManaged and IsDeleted column.  You'll often, not always, notice a mixture of 1's and 0's.  Ideally if you want this server deleted IsManaged = 0 and IsDeleted = 1.  All it takes is one of the items in the IsDeleted column to show 0 for the object to show in the console in a gray state.


Which leads us to the SQL query to remove these from the console:

USE [OperationsManager]
UPDATE dbo.[BaseManagedEntity]
SET
[IsManaged] = 0,
[IsDeleted] = 1,
[LastModified] = getutcdate()
WHERE FullName like '%computername%'



Now IsManaged = 0 and IsDeleted = 1.  Refresh your SCOM Console and...



No more gray agent :)

The query to run the data purging Stored Proc is as follows:


DECLARE @GroomingThresholdUTC datetime
SET @GroomingThresholdUTC = DATEADD(d,-2,GETUTCDATE())
UPDATE BaseManagedEntity
SET LastModified = @GroomingThresholdUTC
WHERE [IsDeleted] = 1
UPDATE Relationship
SET LastModified = @GroomingThresholdUTC
WHERE [IsDeleted] = 1
UPDATE TypedManagedEntity
SET LastModified = @GroomingThresholdUTC
WHERE [IsDeleted] = 1
EXEC p_DataPurging

I believe this runs each night but just in case you want to force it.  Should only take a few seconds.


If that doesn't fix it, follow this guide: http://blogs.technet.com/b/kevinholman/archive/2008/09/29/agent-pending-actions-can-get-out-of-synch-between-the-console-and-the-database.aspx

Failed to create process due to error '0x80070002 : The system cannot find the file specified. ', this workflow will be unloaded.


I recently was receiving this message on one of my monitored DC's....

Event Type: Error
Event Source: Health Service Modules
Event Category: None
Event ID: 21400
Date: 8/24/2011
Time: 9:08:02 AM
User: N/A
Computer: SERVERNAME
Description:
Failed to create process due to error '0x80070002 : The system cannot find the file specified.
', this workflow will be unloaded.

Command executed: "C:\WINDOWS\System32\cscript.exe" /nologo "C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\84\DiscoverVMMSelfService.vbs" {E68CED9E-FB3F-B856-E3D5-F3A91FCA395B} {72BEBFB5-0B16-F3BA-8B9A-281D81DBA0C3} SERVERNAME
Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 1\84\

One or more workflows were affected by this.

Workflow name: Microsoft.SystemCenter.VirtualMachineManager.2008.SelfService.DiscoveryRule
Instance name: SERVERNAME
Instance ID: {72BEBFB5-0B16-F3BA-8B9A-281D81DBA0C3}
Management group: SCOMManagementGroup

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

>>>

Turns out the issue was that cscript.exe was not in C:\WINDOWS\SYSTEM32.  Another issue could be that  Windows Server Support Tools are not installed to C:\Program Files\.

Tuesday, August 2, 2011

getting vmware components to show up in service manager

if you have quest's qmx xtensions for vmware monitoring, it's easy to get that information into service manager so you can report on those components.

once the scom ci connector is setup, you'll need to import the sealed eXcSoftware.nonWindows MP (mine is version 7.0.0.23).  once that is imported you'll need to import the Network Device Library MP.  once that is imported you can then import the unsealed QMX.VMWare MP (mine is version 7.0.0.19).  they must be done in this order.


once the MPs are imported, you'll need to allow those classes:
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.WindowsProxyComputer
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.AVAILABILITY
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.CONFIGURATION
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.CPU
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.DISK
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.FAN
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.MEMORY
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.NETWORK
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.POWER
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.PROCESS
add-scsmallowlistclass -ClassName eXcSoftware.nonWindows.nonWindowsObject.SECURITY
add-scsmallowlistclass -ClassName QMX_Monitor_VMWare_OpsMgrMP.Group

open the scom ci connector > click on management packs and refresh.  type in your account password for the connector and eXcSoftware.nonWindows and QMX_Monitor_VMWare_OpsMgrMP should now show up.  put a checkbox next to those and click 'ok'.

keep in mind, if you use the free version of QMX for VMware then ONLY your vCenter host will show up (not the ESX hosts or guests).  in my case i'm also monitoring some IronPort's so those show up as well.  if you want all the ESX hosts to show up then you need to get paid licenses for EACH ESX host ~ costly.