From a custom oneagent plugin:
if (status=='ERROR'):
self.results_builder.report_error_event(
title = "Scheduled Job Failure - from code",
description = "At least one of the scheduled jobs reports failed",
properties = {
"job": jobDetail['name'],
"lastRun": jobDetail['lastRun'],
"nextRun": jobDetail['nextRun']
},
entity_selector=ExplicitPgiSelector(pgi_id=pgi_id)
)
Nice... this works and opens a problem. I even see the details...
But, whenever the error is gone and this event is not sent every minute anymore, this problem stays open.
When does it automatically closes?
Or is there a way that I can close it. Since I have full control in the plugin I know exactly when this error is gone.
Solved! Go to Solution.
According to this documentation:
You can define problem timeout. After this time this problem will be marked as timeouted. You can refresh the problem using ID returned from API if you need.
Sebastian
Based on my experience it is closed automatically. So you have to push the events every time the plugin query method code is called.