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

Events on particular to CSV

Pranav1
Participant

We have a requirement to retrieve all the events on a particular host into a sheet(excel/CSV).

I tried using Event API-2 to get the event, but the output I am receiving is for all the hosts, when tried using Entity selector with HostId, then we are getting no response body.

I am using the below API call,

curl -X GET "https://xxxxxx.live.dynatrace.com/api/v2/events?from=-24h&to=now&eventSelector=eventType%28%22PROCESS_RESTART%22%29&entitySelector=entityId%28%22HOST-xxxxxxxxxxxx22%29 " -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token dtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

2 REPLIES 2

Yosi_Neuman
DynaMight Guru
DynaMight Guru

Hi @Pranav1 

Since you are looking for process restarts the information you are getting back are not including the host id or name.

So for each entry in the response you will need to check the process entity with v2/entities/{entityId}  rest IP to check if its belong to the host

For example 

Yosi_Neuman_1-1657018743137.png

 

Yosi_Neuman_0-1657018662465.png

 

HTH

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

techean
Dynatrace Champion
Dynatrace Champion

Here is the time to convert this into an Idea @Pranav1 

KG

Featured Posts