-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Could not map JSON at '' - Synthetic Monitor #21
Comments
@amorrisoon the team is having a look at this |
@amorrisoon quick update, team is still looking into it and thinking the issue is with the underlying resource (rather than CDK). Investigation is ongoing and will update here with next steps once we have them. |
@amorrisoon could you try with more properties to see if you get the same error? It looks like the underlying Dynatrace API requires more than 3 parameters. I see the resource schema says only 3 are required, but I think that may need fixing. Can you try including the properties that are in this example? https://github.com/aws-ia/cloudformation-dynatrace-resource-providers/blob/eadf23add5a520a2a91f2aaad40b5256435a7efd/Dynatrace-Environment-SyntheticMonitor/README.md#shows-how-to-create-a-synthetic-monitor-in-dynatrace |
@LucasQChen I did try an more expansive construct before opening this issue, but not with all those fields in your example. I will try with the example above and get back to you. |
So i managed to get this working with following your example, here is the construct i created that worked. new CfnSyntheticMonitor(this, 'MyNewMonitor', {
name: 'MyNewMonitor',
enabled: true,
frequencyMin: CfnSyntheticMonitorPropsFrequencyMin.VALUE_5,
type: CfnSyntheticMonitorPropsType.HTTP,
script: {
version: '1.0',
requests: [
{
url: 'https://www.mysite.com/',
method: 'GET',
description: 'Page test',
validation: {
rules: [
{
type: 'httpStatusesList',
value: '500, 400',
passIfFound: false
},
{
type: 'httpStatusesList',
value: '200, 204, 302',
passIfFound: true
}
]
}
}
]
},
anomalyDetection: {
outageHandling: {
globalOutage: true,
globalOutagePolicy: {
consecutiveRuns: 3,
},
localOutage: true,
localOutagePolicy: {
affectedLocations: 1,
consecutiveRuns: 3
}
},
loadingTimeThresholds: {
enabled: true,
thresholds: [
{
type: LoadingTimeThresholdType.TOTAL,
valueMs: 100
}
]
}
},
locations: [
'GEOLOCATION-F3E06A526BE3B4C4'
]
}) Somethings i noticed where that this does not deploy when setting the monitor type to "violations":[{"path":"/requests/0","message":"Illegal property \"requests/0\""}] There is a difference in the required input for The documentation does say... /**
* The script of a browser (https://dt-url.net/9c103rda) or HTTP monitor.
*
* @schema CfnSyntheticMonitorPropsScript
*/ but i am unsure of whow this would work given the current types, could you please provide an example implementation for a browser synthetic monitor |
Hi @amorrisoon, My name is Mateusz Zan and I am part of the team responsible for the Dynatrace Cloudformation resources. Apologies for the issues that you are facing, but rest assured we will try to provide you with the resolution as soon as possible. I have looked into this in more details and have some conclusions. First, with regards to the documentation on I am glad to see that you have managed to get
That helps with the error that you are facing. Unfortunately, we have identified another potential issue, as the
Note that the resource needs to be updated to support the missing parameter in order to work on your end. We are looking to fix the issue as soon as possible. If you have any questions in the meantime, please do not hesitate to let me know. |
Hi @zan-mateusz Thanks for getting back to me, while i understand the underlying resource provided by dynatrace allows the updated What I was trying to explain that is when implementing this template using CDK with typescript the actual typescript types provided by the cdk package do not allow me to place the Trying to place them in there will cause errors when trying to run I was wondering if there was anyway of getting around this or wether the actual types need to be updated on that pacakge? Here is an example error I get when trying to implement a browser monitor script: |
Hi @amorrisoon, apologies for a late reply on this issue. Also, apologies for the confusion in my last message. Due to some technical error, the codebase that I was using was not up to date and therefore I didn't see the structure of the scripts object within the schema properly. Fortunately, after synching up properly, I can see that the script object indeed has the Please rest assured that this will be fixed soon, by updating the schema to support the properties missing for the Browser type monitors. This has already been done internally and verified that this works in creation and management of the relevant resources, however the Dynatrace API at times throw errors (503 and 404) on these resources, hence we are currently working on a fix for this issue in order to ensure that there will be no functionality issues once released. This should be completed in a timely manner and I will inform you here in the issue once this has been updated officially. If you have any questions in the meantime, please do not hesitate to reach out and I will be happy to help! |
@zan-mateusz No worries thanks for getting back to me, good to see my understanding was correct 😆. |
@zan-mateusz Hey I see your pull request, i was wondering if there was any updates on when this will get merged? |
Hello @amorrisoon I can help answer that. We have a few other items in our publishing backlog ahead of this Dynatrace update. With that and given the upcoming holidays, I think a realistic estimate is after the new year in January. If our team is able to get it done any sooner, I will update you here. |
Hey @LucasQChen @zan-mateusz just following up on this as i see the PR is still open, any updates and when we can expect this fix? |
I am trying to deploy a synthetic monitor using CDK L1 constructs.
I have activated the cloudformation extension, provided the correct configuration and token with appropriate permissions on dynatrace but when running
cdk deploy
I get this error:My cdk config
Generated Template
packages
The text was updated successfully, but these errors were encountered: