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

Python custom plugin - properties - report_custom_annotation_event

dmascolo
Newcomer

Hi all,
I would like to add more custom properties to a device using a python custom plugin:

I used the following command in order to add Current SQL value (curr_sql):

topology_device.report_custom_annotation_event(description="Annotation event",annotation_type="demo",source="demo source",properties[]={"Current SQL": curr_sql})

I tried several times changing syntax but I wasn't able to add more properties.

Can you suggest me how to do?

 

Thanks in advance.
Davide

4 REPLIES 4

wolfgang_beer
Dynatrace Leader
Dynatrace Leader

That is for adding an event rather than a property. This sends an annotation event onto an entity but it does not add any property.

dmascolo
Newcomer

Hi Wolfgang,
please take a look at the picture.

I would like to add more custom information in this annotation, but I was able to add only one (using the command that I wrote before)

Can you help me to understand how to add more details?

In your example, add more key value pairs into the last dict: {"Current SQL": curr_sql, "Second property": "hello"}

Mike

Piotr_Meller
Dynatrace Helper
Dynatrace Helper

Hi Davide,


The properties argument is a dictionary of key, value pairs, you can do something like this:

topology_device.report_custom_annotation_event(description="Annotation event",annotation_type="demo",source="demo source",properties={"Key1": "Value1", "Key2": "Value2"})


I hope this helps

Peter


Featured Posts