14 Jan 2025
03:43 PM
- last edited on
15 Jan 2025
07:17 AM
by
MaciejNeumann
Hello,
I create custom events from Log Lines (ingested from a DB table into dynatrace Log) using Log Monitoring -> Events Extraction. These events I want to list in Unified analysis page -> eventsCard of a generic custom device created by a extension v2 - custom topology. According to dynatrace unified-analysis-reference I have to use a EntitySelectorTemplate that somehow connects the (generic) entity type (created in the extenstion v2) to the custom event.
Do I need to implement this in the custom topology of the generic type and/or custom event? If so how can I create the relationship between entityType and event (for the entitySelector)?
Thank you so much for your kind assistance.
P.S. I also found this but I am having trouble to use this for my use case: https://docs.dynatrace.com/docs/ingest-from/extend-dynatrace/extend-topology/events-entity-extractio...
Solved! Go to Solution.
15 Jan 2025 09:59 PM
This is rather complicated but to help get started, first I'd verify there is some way of associating that log event with the entity you're trying to attach it to if that doesn't exist and can't be added somehow this won't be possible.
Yes, you need to be able to associate an entity associated with that log event to the entity extracted from the extension data. One way to go about this is to see if there is some way of having the same entity extracted from the event as is coming from the extension data. This may make more sense than having some separate entity and associating them with a relationship - I can't tell from the information you've provided. This would simplify it as well because just using the entityConditions placeholder in the template:
entitySelectorTemplates: - $(entityConditions)
If this isn't possible or a separate entity is needed the main difference is you'll need some way of associating the 2 entities so that you can create an entity selector using the above placeholder. This likely will require defining some relationship between the 2 entities. This can be done in an extension definition but also manually via the UI in the custom topology relationship settings.
Once you have the selector (you can test this manually using the entityID based selector for the entity as a stand-in for the $(entityConditions) placeholder) that can be used in the template to include events from that other entity.
As I said this is a rather complicated use-case and could require more information about all the pieces involved but I'd break it down and start by:
I would suggest posting some more detailed questions focused on each of these steps as they'll be a bit more approachable for people trying to help.
16 Jan 2025 07:57 PM
Hi there,
Thank you very much for your post. The header of the event (created byLog Monitoring -> Events Extraction) looks as follows (see below). It seems like that the entityid and type is not the right one since it says extension:extension.
For Option 1: Is there a way to add the entityid of the custom_device that was the source of the log-ingested-data? I could not find the entityid of custom device in the log or event.
For Option 2: Do I need to create a relationship between the entity type extension:extension -> custom:<my_entity_type>. If so, what relationship-type is needed (eg. is part of)
Thank you for your help
"eventId": "5844059888596116348_1737054834399",
"startTime": 1737054834399,
"endTime": -1,
"eventType": "CUSTOM_INFO",
"title": "exasol_cluster_event",
"entityId": {
"entityId": {
"id": "CUSTOM_DEVICE-369EF891F9F7A169",
"type": "extensions:extension"
},
"name": "custom:exasol.sql.stats"
},
"properties": [
.....