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

Enable Monitoring Configuration for Extension via CURL

mk_dynatrace_13
Newcomer

I am trying to run a POST command to enable the Elasticsearch extension. I have looked through all of the documentation. I am able to get a list of the monitoring configurations in my account as well as the details for the one I want to copy. I have a working monitoring configuration that I configured in the Dynatrace UI. I want to copy that configuration and enable a new one using it via CURL. I copied the JSON snippet from the Dynatrace UI but get errors when putting it in the CURL command.

3 REPLIES 3

p_devulapalli
Champion

@mk_dynatrace_13 Could you please share the errors that you are receiving when running the CURL command ?

Phani Devulapalli

I tried

curl -X POST "URL../api/v2/extensions/extension_name/monitoringConfigurations" -H "Authorization: Api-Token XXX"

and received this error:

{"error":{"code":400,"message":"Constraints violated.","constraintViolations":[{"path":"","message":"Configuration payload is required","parameterLocation":"PAYLOAD_BODY","location":null}]}}%

 

I then added the payload and

-H "Content-Type: application/json"

and got this error:

{"error":{"code":400,"message":"Could not map JSON at '[0]' near line 3 column 6"}}

 

@mk_dynatrace_13 there is some issue with the content that you are posting , but will be tricky to guess what the issue is unless we look at that config

Phani Devulapalli

Featured Posts