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

Dynatrace SaaS - API Custom Metric not received in Saas with the expected frequency


Hello Everybody!

On a unix host, we created a crontab to get a custom metric and send it to SaaS, via a cURL -k -L --post302 -X POST "..." command (Topology & Smartscape - Custom device API). The https URL specified in the cURL contains info about both the ActiveGate and the SaaS Tenant, as adviced if ActiveGates are in place:

POST "https://<ACTIVE_GATE_IP>:<PORT>/e/<SAAS_TENANT>/api/v1/entity/infrastructure/custom/<CUSTOM_DEVICE_ID>?Api-Token=<TOKEN>" -H "..."

We set crontab to launch this script every 5 minutes.

The problem is that the majority of the times, the cURL fails with the error HTTP/1.1 302 Found. The code returned when the cURL command is successful is HTTP/1.1 200 OK.

At the moment, on Dynatrace SaaS console, we have our custom chart showing correct values, but with a frequency of around 30-40 minutes (no particular pattern detected), instead of 5 minutes as expected, given the frequency set on crontab.

We added the -L, and consequently also the --post302, to try solving this issue, but with no improvements.

Do you have any ideas on how we can solve this issue?

Thank you all for the attention!!



DynaMight Legend
DynaMight Legend

@Paolo S. are you still having this issue? were you able to get this resolved? did you have to open an support ticket?


Hello Chad,

yes, I opened a support ticket. After investigations by the support regarding my issue, the answer was:

"Your AG communicates randomly with our SaaS cluster or our public AG. There is no issue with API calls to our cluster but when it communicate with our public AG we answer with 302 (redirect). It looks that your AG is not able to follow the redirect (probably because of some firewalls). One of your curl output present that you can't connect to our public AG ( domain). So the solution will be changing your firewall rules. Meantime we will also try to change that mechanism on our side to avoid redirects in the traffic. "

The routing mechanism (removing redirecting) was changed with OneAgent v167.

As soon as the release was rolled out, the issue was solved.

If you are having a similar issue, I advice to open a support ticket.

Thank you,


@Paolo S. thank you so much for replying with the solution that support provided you. Now all the other community members can benefit from that solution! thanks again and stay safe!


Featured Posts