06 Feb 2018
03:56 PM
- last edited on
19 May 2023
12:15 AM
by
Michal_Gebacki
The documentation only mentions metrics, but can a OneAgent plugin also be used to e.g. create custom error events?
Solved! Go to Solution.
Sure you can define an alerting section within the plugin json definition file in order to raise custom events for plugin metrics. Those events take part within the Dynatrace AI correlation and causation process.
See my blog post here:
https://www.dynatrace.com/news/blog/define-custom-events-via-custom-plugins-or-the-dynatrace-api/
In addition to @Wolfgang B. answer, I think it should be possible to use the Event reporting API available in OneAgent SDK directly from plugin code. See the package ruxit.api.events. Example code is in the notifications_openstack_plugin.py, but I'm not sure if this is supported or not.
Based on what I've seen, you should be able to send events of specific types (not alerts) that are attached to entities. But I think this API is not yet supported.