c# - Create SCOM alert with SDK -
I am writing a SCOM inbound connector and want to make the program alerts. I have worked on how to ask and solve alerts from using SDK, but in reality I have not been able to make it far enough to make them.
Certainly one way to do this needed?
Edit:
The document clearly states that such a thing is possible:
You perform an operation in the Operations Manager from an external management system You can use inbound connectors to insert events, and alert data.
I have now found a solution to this problem. I do this for those who are interested.
Use SDK in the normal way. This amount to call InsertCustomMonitoringEvent as shown in the example.
Write a rule in the management pack that uses Microsoft.SystemCenter.SdkEventProvider and the author System.Health data source .GenerateAlert. Rules should target the objects that you generate for events.
Add a condition identification module for the rule that filters on the EventLevel property. This means that you must have 3 copies of the rule for alert, alert and error alert. This allows you to map EventLevel = 1 -> Severity = 2 (error), EventLevel = 2 -> Severity = 1 (warning), EventLevel = 4 -> Severity = 0 (informative).
You may have to add a filter to the publisher name of the event to map to the correct target object, using some specific key properties of $ target $.
In this place you will definitely generate both events and alerts with the same content, but at least you get the method of creating alerts using SDK. They did not even add Microsoft. System Center SDKAlertprovider type data source I do not know ... it makes life very easy.
Comments
Post a Comment