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

Custom ActiveGate plugin - how to properly send events back to Dynatrace?

Jan_VanBelle
Participant

Hello all,

When scrolling through the API-documentation before writing a new python plugin, I noticed 2 different ways to report events back to Dynatrace:

The old way

grp = self.topology_builder.create_group(grp_id, grp_name)
dev = grp.create_device(dev_id, dev_name)
dev.report_error_event(title, desc, props)

 

The new way

xxx.event_error(title, desc, props)

Via the chat I got the message:

Result of both operations are basically the same - the only difference is that report_performance_event is called with results_builder context (the older method of reporting data, still supported), while event_performance is method called with entity context (newer approach)

I hoped it'd be a simple replace-thing, but when replacing dev.report_error_event with dev.event_error I get the message

AttributeError: 'Device' object has no attribute 'event_error'

 

Can someone help me out with this?

It's the 'new approach' but it's not mentioned in documentation or sample applications.

The reason why I'd like to find out is because we're having troubles with problems being closed every 30minutes.

So I'd like to find out if we have the same problem with the new way of reporting problems also?

 

Kind regards,

Jan

6 REPLIES 6

Mike_L
Dynatrace Guru
Dynatrace Guru

Hi Jan, I currently don't have the time to run any tests (I use report_error_event by the way). But it will not change the problem timeout. Make sure that you resend the same error before the timeout happens and the problem should stay open. If not please raise a support ticket.

Mike

Mike

Julius_Loman
DynaMight Legend
DynaMight Legend

Btw since 1.205 there are bugs with deduplication of events (should be resolved with 217, but my experience says it is not). I'd recommend using Events API instead.

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

Our tests of version 217 shows that's it's resolved and keeps a single problem open for the duration of us sending the same title+description at least once every 15 minutes.

Mike

Hi Mike,

just tried again with ActiveGate 1.217. No, it still does not work and I don't want to open a third support ticket for the same issue 🙂 I will stick with the Events API. 

Julius

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

Vanguard
Contributor

I would already be pleased if I could find the actual SDK Dokumentation Online, the link https://dynatrace.github.io/plugin-sdk/api/remote_python_apidoc.html is dead.

This is probably the best one instead of the link you posted: https://www.dynatrace.com/support/help/extend-dynatrace/extensions/development/extension-how-tos/top... 

Mike

Featured Posts