get-alert operation
The get-alert
operation retrieves alerts that are filtered by the specified search criterion.
The following table describes the <items>
XML and request elements for the get-alert
operation:
Adapter request elements for the get-alert operation
Element |
Definition |
Required |
---|---|---|
|
Specifies the operation name: |
Yes |
|
Specifies the parent element for the command elements |
Yes |
|
Specifies the duration after which the operation times out |
No |
|
Specifies the parent element for the command parameters |
No |
|
Specifies the parent element for defining the search criterion |
No |
|
Specifies the parent element for a single search criterion |
Conditional; required if the |
|
Specifies the alert attribute used in the search Note You can use the
|
Conditional; required if the |
|
Specifies the value of the attribute specified in the |
Conditional; required if the |
|
Specifies an operator
|
Conditional; required if the |
The following figure illustrates a sample adapter request for the get-alert
operation:
Sample adapter request for the get-alert operation
<scom-request>
<operation-name>get-alert</operation-name>
<command-request>
<timeout-secs>120</timeout-secs>
<command-parameters>
<alert-search-criteria>
<criteria-expression>
<key>Id</key>
<value>f0f02b87-5a8e-4553-bfbe-032a92945aa9</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 operation
<scom-response>
<metadata>
<status>success</status>
<count>1</count>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShel
l.Startup.ps1;get-alert -criteria {Id = 'f0f02b87-5a8e-4553-bfbe-032a92945aa9'}</command>
<execution-milliseconds>5001</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
<count>1</count>
</metadata>
<output>
<item>
<Id>f0f02b87-5a8e-4553-bfbe-032a92945aa9</Id>
<Name>The service cannot be started</Name>
<Description>Service started.</Description>
<MonitoringObjectId>795e5f5e-d5f8-8644-5d65-04a610255d1d</MonitoringObjectId>
<MonitoringClassId>d3d42c94-b72c-509c-f06d-2e0c866b4087</MonitoringClassId>
<MonitoringObjectDisplayName>MSSQLSERVER</MonitoringObjectDisplayName>
<MonitoringObjectName>MSSQLSERVER</MonitoringObjectName>
<MonitoringObjectPath>win2stdvm.neuron.com</MonitoringObjectPath>
<MonitoringObjectFullName>Microsoft.SQLServer.2005.AnalysisServices:wi
n2stdvm.neuron.com;MSSQLSERVER</MonitoringObjectFullName>
<IsMonitorAlert>False</IsMonitorAlert>
<ProblemId>22d3b2aa-c752-18aa-8d63-55e1e8a34450</ProblemId>
<MonitoringRuleId>22d3b2aa-c752-18aa-8d63-55e1e8a34450</MonitoringRuleId>
<ResolutionState>0</ResolutionState>
<Priority>Normal</Priority>
<Severity>Error</Severity>
<Category>EventCollection</Category>
<Owner />
<ResolvedBy />
<TimeRaised>1/19/2009 2:20:45 PM</TimeRaised>
<TimeAdded>1/19/2009 2:20:45 PM</TimeAdded>
<LastModified>2/11/2009 12:23:52 PM</LastModified>
<LastModifiedBy>System</LastModifiedBy>
<TimeResolved />
<TimeResolutionStateLastModified>1/30/2009 9:37:44 AM</TimeResolutionStateLastModified>
<CustomField1 />
<CustomField2 />
<CustomField3 />
<CustomField4 />
<CustomField5 />
<CustomField6 />
<CustomField7 />
<CustomField8 />
<CustomField9 />
<CustomField10 />
<TicketId />
<Context><DataItem type="Microsoft.Windows.EventData"time="2009-02-
11T17:22:36.0000005+05:00" sourceHealthServiceId="ADB901FE-08F4-490E-
722F-D65430015064"><EventOriginId>{ABC14232-8962-43A1-9778-
F4558781EB67}</EventOriginId><PublisherId>{A258EF78-F867-6F7A-4C70-
09CC3AE8658A}</PublisherId><PublisherName>MSSQLServerOLAPService</PublisherName>
<EventSourceName>MSSQLServerOLAPService</EventSourceName><Channel>Application</Channel>
<LoggingComputer>WIN2STDVM</LoggingComputer><EventNumber>1092681728</EventNumber>
<EventCategory>289</EventCategory><EventLevel>4</EventLevel>
<UserName>N/A</UserName><RawDescription><![CDATA[Service started.%0]]></RawDescription>
<LCID>1033</LCID><CollectDescription Type="Boolean">true</CollectDescription><EventData/>
<EventDisplayNumber>0</EventDisplayNumber>
<EventDescription>Service started.</EventDescription></DataItem></Context>
<ConnectorId />
<LastModifiedByNonConnector>1/30/2009 9:37:44 AM</LastModifiedByNonConnector>
<MonitoringObjectInMaintenanceMode>False</MonitoringObjectInMaintenanceMode>
<MonitoringObjectHealthState>Success</MonitoringObjectHealthState>
<ConnectorStatus>NotMarkedForForwarding</ConnectorStatus>
<RepeatCount>10</RepeatCount>
<NetbiosComputerName>win2stdvm</NetbiosComputerName>
<NetbiosDomainName>SYNAPSE</NetbiosDomainName>
<PrincipalName>win2stdvm.neuron.com</PrincipalName>
<SiteName />
<MaintenanceModeLastModified>1/1/1900 12:00:00 AM</MaintenanceModeLastModified>
<StateLastModified>2/11/2009 6:40:05 AM</StateLastModified>
<Parameters>{Service started.}</Parameters>
<ManagementGroup>M1</ManagementGroup>
<ManagementGroupId>ae1fcf8a-8088-31d8-93ec- 90fe77a32d44</ManagementGroupId>
</item>
</output>
</command-output>
</commands-output>
</scom-response>
Comments
Log in or register to comment.