Monaco dynatrace Synthetic deployment issue
dariniv opened this issue · 3 comments
Monoco is throwing error while deploying clickpath json script.
I am able to create the synthetic connection from browser but using monaco its throwing the below error. It always complain about json mapping but it works from dynatrace portal my manually applying the same script
2022-09-22 16:38:34 INFO Dynatrace Monitoring as Code v1.8.3
2022-09-22 16:38:34 INFO Executing projects in this order:
2022-09-22 16:38:34 INFO 1: projects (3 configs)
2022-09-22 16:38:34 INFO Processing environment environment...
2022-09-22 16:38:34 INFO Processing project projects...
2022-09-22 16:38:34 ERROR Deployment to environment failed with error!
2022-09-22 16:38:34 ERROR Failed to create DT object test (HTTP 400)!
Response was: {"error":{"code":400,"message":"Could not map JSON at '' near line 15 column 13"}}, responsible config: projects\synthetic-monitor\gems.json
2022-09-22 16:38:34 ERROR errors during deployment! Check log
PS D:\Users\122293\projects\monaco> monaco -e="env.yml"
I have attached the header part of json, the complaining part is in the 15th line -- "type": "clickpath"
Json sample
{
"configuration": {
"chromiumStartupFlags": {
"disable-web-security": false
},
"monitorFrames": {
"enabled": true
},
"javaScriptSettings": {},
"device": {
"orientation": "landscape",
"deviceName": "Desktop"
}
},
"type": "clickpath",
"version": "1.0",
"events": [{
"type": "navigate",
"wait": {
"waitFor": "page_complete"
},
here is the yaml
config:
- browser-test: "test.json"
browser-test:
- name: "Availability"
- location: "GEOLOCATION-999SSET55BDB3CD"
Hi @dariniv, your config seems to be missing some parts which are required to beuploaded using the Dynatrace API.
For example, the configuration you posted has to be included within the "script" property.
Please have a look at the documentation of the Synthetic Monitor API: https://www.dynatrace.com/support/help/dynatrace-api/environment-api/synthetic/synthetic-monitors/put-a-monitor.
You can use the download
command of Monaco to download all currently configured Synthetic Monitor configurations. You can use those as a starting point to configure new ones or upload the downloaded ones to other environments.
Closing as stale, assuming the suggestion solved yout issue. Please open a new issue if it did not.