The universal connectors syntax again changed somewhere between 3.2 and current 3.3 CU2
I am running a python script for a customer, which is creating CIs and sending them alerts via SOAP requests. After upgrading to 3.3CU2, my script was no longer working
While I managed to get the CI creation process working again, the alarming still is not functioning properly:
Sending an alarm will alert the correct CI, but a subsequent alarm to another CI will sort of 'move' the first alarm to the second CI, instead of producing a second alarm
Seems I am missing somthing to identify the alarm properly.
The event looks like this:
className = "Alert"
eventtype = "AddEvents"
name = "instanceID"
value = "myApp:myHostname"
name = "deviceID"
name = "severity"
value = 3
name = "situationMessage"
value = "myApp"
name = "eventDetail"
value = "OK - ActiveMQ Version - 188.8.131.52"
Any ideas what I am doing wrong?
Does anybody have a working example how to construct a correct event ?
The valid values "Severity" attribute are 'Normal', 'Minor','Major','Critical' and 'Fatal'.
Please use these values for alert publication.
Let me know if this helps.
but my alarm gets created with correct Severity, so "Severity=<integer>" does not sem to be a problem
just tested: "Minor/Major/..." does not work at all!
What is the result when generating an alert by running 'GCEventAddCmd.bat' command by passing arguments or input the .xml file?
yes, I tried that but the command behaves not as expected
In order to not clutter this thread, I have opened a new one for this
OK after this is resolved, I now tested with sending the alerts through the command-line
This behaves correctly, alerts are assigned to the correct CI and do not get cleared by subsequent alerts to other CIs
So there must be something wrong with the event created by my SOAP request
I already tried to include
in order to include different AlarmIDs for the differetn alarms, but this did not help
What am I missing?
The attributes are case-sensitive, can you change this to "MdrElementID", let me know if this works.
yes already tried it and this works
There were some mistakes in my attempts above
- The main problem was that the alarm now needs a unique identification, the MdrElementID. It was called AlarmID in previous versions and it was not necessary back then. If you miss it now, you do not create new alarms by repeatedly firing the event above, but just update the original one. This accounts for my observation of alarms wandering from CI to CI
- The old instanceID is now called AlertedMdrElementID
- As pointed out by Brahma, the names are case-sensitive, so there is a difference between Severity and severity
Severity is the new name and has values of 'Minor, Major, ...'
severity is the old name and accepts 0,1,2...
- deviceID is not necessary anymore
Confusingly, UC sometimes accepts both old and new syntax and converts it in the background, but this does not work always.
So a working example of settings for an Alert, as constructed in python, is:
name = "AlertType"
value = "Risk"
name = "MdrElementID"
value = "alarm:myHost:myCheck"
name = "AlertedMdrElementID"
value = "myCheck:myHost"
name = "Severity"
value = "Minor"
name = "Summary"
value = "myCheck"
name = "EventDetail"
value = "WARN - ActiveMQ old Version - 5.0"