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

[Notebook] External api data origin IP

matheus
Visitor

Recently we can try use the notebook ("dynatrace.notebooks/notebook") to get external data from API and increment with logs or dynatrace information.

In my scenario, the target endpoint has one restriction access by IP, and the request only returns success when the requester IP is allowed to proceed.

What is the Dynatrace IP list used in the notebook runner on fetch?

I need this information to allow the IP on the firewall rule.

 

Example of fetch

```

export default async function () {
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'ApiKey XPTO'
},
body: '{"fakeBody": "aaa"}'
};

const response = await fetch('https://xpto.url/_search', options);
const json = await response.json();
return json.hits.hits;
}

```

Draw example:

Screenshot 2024-02-21 at 11.15.09.png

3 REPLIES 3

dannemca
DynaMight Guru
DynaMight Guru

I would test with the IPs you get from "Deploy OneAgent" page.

Example from demo env

image (20).png

Site Reliability Engineer @ Kyndryl

Dant3
Pro

I think this is a use case for edgeconnect. To channel the connection in an infra that you have control to and execute it from there. So there is no "Cloud component reaching the data" just a local one that streams the data back to dynatrace. 

For testing purposes, you could use a webhook from https://webhook.site/ and post to it to check the incoming connection from where is hitting. But since this is all an elastic platform I would not trust that the origin remains the same all the time. 

Services Solution Engineer @PowerCloud - Observability/CloudOps Certified / Former SE @Dynatrace.

Wow, I didn't know about this webhook.site, thanks for this!!

Site Reliability Engineer @ Kyndryl

Featured Posts