cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Plugin: closing problem reported via report_error_event

Bert_VanderHeyd
Advisor

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.


2 REPLIES 2

According to this documentation:

https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/environment-api/events/post-ev...

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


Julius_Loman
Leader

Based on my experience it is closed automatically. So you have to push the events every time the plugin query method code is called.