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

Replacement for associated_entity in ruxit.api package?

tarjei_utnes
Organizer

So I am currently using associated_entity to get the entity of a MSSQL database of which I am creating a plugin:

self.entity = kwargs["associated_entity"]
instance_name = self.entity.properties['mssql_instance_name']

 

However I see that this is deprecated:

 

What is the recommendation to use instead?

7 REPLIES 7

Mike_L
Dynatrace Guru
Dynatrace Guru

Use activation_context instead, such as this:

kwargs['activation_context'].value.processes[0].properties['mssql_instance_name']
Mike

Any chance of updating the documentation?

@Jakub M. All yours 🙂

Mike

Vanguard
Contributor

Can I use this to send an availability Event to any Existing Entity? Also, I cannot find the Documentation at all, someone have an updated link? Thanks!

If you need to send it to *any* existing entity I'd go with calling the Events v2 API endpoint instead from the python code and attach the event based on the entity selector.

Mike

@Mike_LIt feels awkward to use a external URL API "detour" while you using a SDK for an extension that is locally installed. Also makes the extension brittle as the REST API ist not very stable - currently is using Events API V1... 

So is it not possible what I want to do, does the SDK not allow me to create availability events for a given entity and only in the context of the custom_device that is generated by the ActiveGate Extension?

Hi, you will indeed have to go via the API for that use case.

Mike

Mike

Featured Posts