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

Custom Plugin: closing problem reported via report_error_event

Bert_VanderHeyd
DynaMight Pro
DynaMight Pro

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

skrystosik
DynaMight Guru
DynaMight Guru

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


Regards, Sebastian

Julius_Loman
DynaMight Legend
DynaMight Legend

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


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts