ObjectServer: Generic clear and nco_postmsg
AlexSimpson 0600020130 Comments (2) Visits (9149)
Thank you for the post. Very helpful!
I am new to Netcool/Omnibus. I am planning to call nco_postmsg from a PERL script. If my application is running slow or if it is down, the script will then post an alert to Event List. Something similar to your command line example:
Next time the script runs and the application is up, the alert will need to be automatically cleared. I tried lowering the Severity to zero using nco_postmsg. But the severity doesn't change only the count goes up. I am able to change the Summary and I am thinking using that with a trigger I should be able to set the Severity to clear.
What is the best way to accomplish this?
I thought I'd answer this request using a blog post as it highlights some pretty nifty ObjectServer functionality called Generic Clear, which automatically matches problem type events with corresponding resolution type events and then clears both events. Plus it's available right out of the box!
The generic clear functionality is provided by the generic_clear trigger which can be found in the $OMNIn order for generic_clear to work, the Node, AlertKey, AlertGroup and Manager fields of the problem and resolution events must be identical.
Also the Identifier must be different otherwise the insert will be deduplicated, which is also cool functionality of the ObjectServer but not what we want here. Finally the problem event should have Type=1 and the resolution Type=2
It would also be good practice to set the Severity of the resolution event to 1 (Not 0)
Will be cleared by...
This works because the default Node, AlertKey, AlertGroup and Manager fields all match.
By default the generic_clear trigger works every 5 seconds, so it won't be long before the events are cleared. Once cleared another trigger delete_clears will come along and remove the events. All of this functionality is available by default without having to perform any additional conf