21 Feb 2024 02:16 PM - edited 21 Feb 2024 02:17 PM
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:
Solved! Go to Solution.
21 Feb 2024 08:03 PM
I would test with the IPs you get from "Deploy OneAgent" page.
Example from demo env
21 Feb 2024 08:22 PM - edited 22 Feb 2024 11:32 AM
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.
21 Feb 2024 08:29 PM
Wow, I didn't know about this webhook.site, thanks for this!!