cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Looking to upgrade from Dynatrace Managed to SaaS? See how

Dynatrace Managed Post Event API

Ahmed_mohamed-s
Newcomer

Hi All,

I have an issue while post an event through Dynatrace API, and i have tried the proposed example and received the below issue.

 

Request

https://myenvironment/e/1c73bd17-f3f1-4c29-af69-f2447189a9c3/api/v1/events \

-H 'Authorization: Api-token mytoken' \

-H 'Content-Type: application/json' \

-d '{

"eventType": "ERROR_EVENT",

"title" : "Power outage",

"description" : "UPS detected a power outage",

"timeoutMinutes" : 60,

"attachRules": {

"entityIds":[],

"tagRule":[{

"meTypes" : [ "HOST" ],

"tags" : [ { "context" : "CONTEXTLESS", "key" : "clinic" } ]}

]},

"source":"UPS-123 (Datacenter South)",

"customProperties":{

"PowerLevel": "20.000Ah",

"Estimation": "3 hours",

"UPS-Model": "APC Smart-UPS C 1000VA, USB"}

}

 

Error received:

"code":400,"message":"Invalid attachRules object provided. No MEIdentifier do match: Matching rule: PushEventAttachRules{entityIds=[], tagRules=[TagMatchRule{meTypes=[HOST], tags=[[CONTEXTLESS]clinic]}]}"}}

 

Thanks,

Ahmed

3 REPLIES 3

wolfgang_beer
Dynatrace Leader
Dynatrace Leader

That simply means that there is no entity of type HOST with that tag within your system. Use a different tag that exists on a host within in your system.

Best greetings,

Wolfgang

Thank you it is solved 🙂

- I added new custom device and I used it's entity ID inside the payload

Cool, should work with tags of course as well but only with those that are really present in your environments

Featured Posts