Unsupported content This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

get-alert-by-name operation


The get-alert-by-name operation retrieves alerts that are identified by the specified name.

The following table describes the <items> XML and request elements for the get-alert-by-name operation:

Adapter request elements for the get-alert-by-name operation

The following figure illustrates a sample adapter request for the get-alert-by-name operation: 

Sample adapter request for the get-alert-by-name operation

<scom-request>
 <operation-name>get-alert-by-name</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <alert-search-criteria>
       <criteria-expression>
         <key>Name</key>
         <value>Health Service Heartbeat Failure</value>
         <operator>equals</operator>
       </criteria-expression>
     </alert-search-criteria>
   </command-parameters>
 </command-request>
</scom-request>


The following figure illustrates the adapter response for the sample request: 

Sample adapter response for the get-alert-by-name operation

<scom-response>
 <metadata>
   <status>success</status>
   <count>1</count>
 </metadata>
 <commands-output>
   <command-output>
     <metadata>
       <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
       Startup.ps1;get-alert -criteria {Name = 'Health Service Heartbeat Failure'}</command>
       <execution-milliseconds>5266</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>4</count>
     </metadata>
     <output>
       <item>
         <Id>d1353257-34e2-474f-8147-f69d334db452</Id>
         <Name>Health Service Heartbeat Failure</Name>
         <Description>The Health Service on computer win1stdvm.neuron.com failed 
           to heartbeat.</Description>
         <MonitoringObjectId>3681a974-d602-3a3e-e284-fab68cb0c3ae</MonitoringObjectId>
         <MonitoringClassId>a4899740-ef2f-1541-6c1d-51d34b739491</MonitoringClassId>
         <MonitoringObjectDisplayName>win1stdvm.neuron.com</MonitoringObjectDisplayName>
         <MonitoringObjectName>ee6d2ae3-bbdb-8658-94d3-26161d711828</MonitoringObjectName>
         <MonitoringObjectPath>Microsoft.SystemCenter.AgentWatchersGroup
          </MonitoringObjectPath>
         <MonitoringObjectFullName>Microsoft.SystemCenter.HealthServiceWatcher:
         Microsoft.SystemCenter.AgentWatchersGroup;ee6d2ae3-bbdb-8658
          -94d3-26161d711828</MonitoringObjectFullName>
         <IsMonitorAlert>True</IsMonitorAlert>
         <ProblemId>b59f78ce-c42a-8995-f099-e705dbb34fd4</ProblemId>
         <MonitoringRuleId>b59f78ce-c42a-8995-f099-e705dbb34fd4</MonitoringRuleId>
         <ResolutionState>255</ResolutionState>
         <Priority>High</Priority>
         <Severity>Error</Severity>
         <Category>StateCollection</Category>
         <Owner />
         <ResolvedBy>System</ResolvedBy>
         <TimeRaised>2/16/2009 7:13:37 AM</TimeRaised>
         <TimeAdded>2/16/2009 7:13:37 AM</TimeAdded>
         <LastModified>2/17/2009 10:38:55 AM</LastModified>
         <LastModifiedBy>WIN2STDVM\Administrator</LastModifiedBy>
         <TimeResolved>2/16/2009 7:27:38 AM</TimeResolved>
         <TimeResolutionStateLastModified>2/16/2009 7:27:38 AM
          </TimeResolutionStateLastModified>
         <CustomField1 />
         <CustomField2 />
         <CustomField3 />
         <CustomField4 />
         <CustomField5 />
         <CustomField6 />
         <CustomField7 />
         <CustomField8 />
         <CustomField9 />
         <CustomField10 />
         <TicketId />
         <Context><DataItem type="Microsoft.Windows.EventData"time="2009-02-
         16T12:27:26.0000000+05:00" sourceHealthServiceId="ADB901FE-08F4-490E-
         722F-D65430015064"><EventOriginId>{280B0F70-8AE8-4136-9350-
         5A3EDD31BB63}</EventOriginId><PublisherId>{431AD5B9-DD73-ADE6-7A14-
         B407799A13DC}</PublisherId><PublisherName>OpsMgr Connector</PublisherName>
          <EventSourceName>OpsMgr Connector</EventSourceName><Channel>Operations
          Manager</Channel><LoggingComputer>WIN2STDVM</LoggingComputer>
         <EventNumber>20020</EventNumber><EventCategory>0</EventCategory>
          <EventLevel>0</EventLevel><UserName>N/A</UserName><RawDescription>
           <![CDATA[The health service %1 running on host %2 and serving 
           management group %3 with id %4 is available.]]>
           </RawDescription><LCID>1033</LCID><Params><Param>{EE6D2AE
          3-BBDB-8658-94D3-26161D711828}</Param><Param>win1stdvm.neuron.com</Param>
            <Param>CATNoida</Param><Param>{AE1FCF8A-8088-31D8-93EC-
          90FE77A32D44}</Param></Params><EventData/><EventDisplayNumber>20020
           </EventDisplayNumber><EventDescription><![CDATA[The healthservice {EE6D2AE3-
          BBDB-8658-94D3-26161D711828} running on host win1stdvm.neuron.com andserving
           management group M1 with id {AE1FCF8A-8088-31D8-93EC-90FE77A32D44} is
          available.]]></EventDescription></DataItem></Context>
         <ConnectorId />
         <LastModifiedByNonConnector>2/17/2009 10:38:55 AM</LastModifiedByNonConnector>
         <MonitoringObjectInMaintenanceMode>False</MonitoringObjectInMaintenanceMode>
         <MonitoringObjectHealthState>Success</MonitoringObjectHealthState>
         <ConnectorStatus>NotMarkedForForwarding</ConnectorStatus>
         <RepeatCount>0</RepeatCount>
         <NetbiosComputerName />
         <NetbiosDomainName />
         <PrincipalName />
         <SiteName />
         <MaintenanceModeLastModified>1/1/1900 12:00:00 AM</MaintenanceModeLastModified>
         <StateLastModified>2/16/2009 7:27:38 AM</StateLastModified>
         <Parameters>{win1stdvm.neuron.com}</Parameters>
         <ManagementGroup>M1</ManagementGroup>
         <ManagementGroupId>ae1fcf8a-8088-31d8-93ec-90fe77a32d44</ManagementGroupId>
       </item>
        ...
     </output>
   </command-output>
 </commands-output>
</scom-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*