15 Feb 2021 01:36 PM - last edited on 18 May 2023 01:58 PM by Michal_Gebacki
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
Solved! Go to Solution.
22 Feb 2021 04:09 PM
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
30 Jun 2021 04:21 PM
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.
30 Jun 2021 04:23 PM
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.
01 Jul 2021 12:25 PM
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
28 Oct 2022 04:20 PM
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.
28 Oct 2022 04:25 PM
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...