Code Monkey home page Code Monkey logo

datadog-to-terraform's People

Contributors

dependabot[bot] avatar discosultan avatar duoxoud avatar flavio-cadete-cko avatar flaviusc avatar ghostec avatar laurmurclar avatar melishatrout avatar serenaf avatar vigohe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datadog-to-terraform's Issues

Not able to convert the new keywords which is defined in datadog json such as formulas, response_type, name

Describe the bug
As per the new datadog dashboard, few attributes are not able to convert by the datadog converter plugin

To Reproduce
Use the below JSON to reproduce the problem

{ "title": "An example screenboard which causes the issue" }

{
"title": "test.dev.edit",
"description": "",
"widgets": [
{
"id": 6724092998888202,
"layout": {
"x": 8,
"y": 20,
"width": 8,
"height": 6
},
"definition": {
"title_size": "16",
"title_align": "left",
"type": "query_value",
"requests": [
{
"formulas": [
{
"formula": "query1"
}
],
"response_format": "scalar",
"queries": [
{
"query": "avg:test.stats-cancellation}.rollup(86400)",
"data_source": "metrics",
"name": "query1",
"aggregator": "last"
}
]
}
],
"autoscale": false,
"precision": 0
}
}
],
"template_variables": [
{
"name": "DashEnv",
"default": "prod2",
"prefix": "environment"
}
],
"layout_type": "free",
"is_read_only": false,
"notify_list": [],
"id": "a9e-yvm-s3z"
}
Expected terraform code
It should be able to convert.

resource "datadog_dashboard" "not broken, woo!" { ... }

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
Add any other context about the problem here.

Support Datadog Timeboards

Is your feature request related to a problem? Please describe.
In addition to monitor conversion, support Timeboard conversion.

Describe the solution you'd like
Automatically detect monitor or timeboard format and output appropriate terraform.

Conversion for "template_variable_presets" not found

Conversion for "template_variable_presets" not found

  1. Copy the following json output from Datadog:

{"title":"Kafka","description":"","widgets":[{"id":474085478675668,"definition":{"type":"query_value","requests":[{"q":"sum:kafka.replication.active_controller_count{$Cluster}","aggregator":"last","conditional_formats":[{"comparator":"<","value":1,"palette":"red_on_white"},{"comparator":">=","value":1,"palette":"green_on_white"}]}],"title":"Active Controllers","autoscale":true,"precision":0}},{"id":2410444471924698,"definition":{"type":"timeseries","requests":[{"q":"avg:kafka.replication.offline_partitions_count{$Cluster} by {brokerid,host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Offline Partitions","show_legend":false,"legend_size":"0"}},{"id":7173053017000254,"definition":{"type":"timeseries","requests":[{"q":"sum:kafka.replication.under_replicated_partitions{$Cluster} by {host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Under Replicated Partitions","show_legend":false,"legend_size":"0"}},{"id":5067666987827614,"definition":{"type":"timeseries","requests":[{"q":"100-avg:system.cpu.idle{$Cluster} by {host,brokerid}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"CPU","show_legend":false,"legend_size":"0"}},{"id":4510232294941812,"definition":{"type":"timeseries","requests":[{"q":"avg:system.net.tcp6.established{$Cluster} by {brokerid,host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Network Connections","show_legend":false,"legend_size":"0"}},{"id":3535194655711416,"definition":{"type":"timeseries","requests":[{"q":"top((sum:kafka.net.bytes_out.rate{$Cluster} by {host,brokerid}/sum:system.net.bytes_sent{$Cluster,device:eth1} by {host,brokerid})*100,10,'last','desc')","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Overhead traffic percentage (output)","show_legend":false,"legend_size":"0"}},{"id":1623948339331226,"definition":{"type":"timeseries","requests":[{"q":"sum:kafka.messages_in.rate{$Cluster}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Messsage In Rate ","show_legend":false,"legend_size":"0"}},{"id":8318842337414129,"definition":{"type":"timeseries","requests":[{"q":"top(avg:kafka.topics.messages_in.rate{$Cluster} by {host,brokerid}, 10, 'mean', 'desc')","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Messages in per Broker","show_legend":false,"legend_size":"0"}},{"id":1608970740040038,"definition":{"type":"timeseries","requests":[{"q":"top(avg:kafka.topics.messages_in.rate{$Cluster} by {host,topic,brokerid}, 10, 'mean', 'desc')","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Messages in per Broker per Topic","show_legend":false,"legend_size":"0"}},{"id":4838996117696610,"definition":{"type":"timeseries","requests":[{"q":"per_minute(sum:jvm.gc.cms.count{$Cluster} by {brokerid,host})","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"JVM GC per minute","show_legend":false,"legend_size":"0"}},{"id":7130496428765594,"definition":{"type":"timeseries","requests":[{"q":"avg:jvm.gc.minor_collection_time{$Cluster} by {host,brokerid}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}},{"q":"sum:jvm.gc.minor_collection_count{$Cluster} by {host,brokerid}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"JVM Minor GC time and count","show_legend":false,"legend_size":"0"}},{"id":839094311219598,"definition":{"type":"timeseries","requests":[{"q":"avg:jvm.heap_memory{$Cluster} by {brokerid,host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}},{"q":"avg:jvm.heap_memory_max{$Cluster} by {brokerid,host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"JVM Heap Memory Used/Max","show_legend":false,"legend_size":"0"}},{"id":1624807156261464,"definition":{"type":"timeseries","requests":[{"q":"avg:kafka.net.handler.avg.idle.pct.rate{$Cluster} by {brokerid,host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Available Network Threads","show_legend":false,"legend_size":"0"}},{"id":5767422523541078,"definition":{"type":"timeseries","requests":[{"q":"avg:kafka.request.handler.avg.idle.pct.rate{$Cluster} by {brokerid,host}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Available Request handler (IO) threads ","show_legend":false,"legend_size":"0"}},{"id":4162215556109631,"definition":{"type":"toplist","requests":[{"q":"top(avg:kafka.topics.messages_in.rate{$Cluster} by {topic,brokerid,host}, 10, 'sum', 'desc')"}],"title":"Avg of kafka.topics.messages_in.rate over $cluster by topic,brokerid,host"}},{"id":5310444385871147,"definition":{"type":"toplist","requests":[{"q":"top(avg:kafka.topics.net.bytes_in.rate{$Cluster} by {topic,brokerid,host}, 10, 'sum', 'desc')"}],"title":"Avg of kafka.topics.net.bytes_in.rate over $cluster by topic,brokerid,host"}},{"id":2245277047199664,"definition":{"type":"timeseries","requests":[{"q":"avg:kafka.Partition_Rebalance_Count{$Cluster} by {cluster}","display_type":"line","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"}}],"yaxis":{"label":"","scale":"linear","min":"auto","max":"auto","include_zero":true},"title":"Avg of kafka.Partition_Rebalance_Count over $cluster by cluster","show_legend":false,"legend_size":"0"}}],"template_variables":[{"name":"Cluster","default":"*","prefix":"Cluster"}],"layout_type":"ordered","is_read_only":false,"notify_list":[],"template_variable_presets":[{"name":"GP","template_variables":[]},{"name":"PD","template_variables":[{"name":"Cluster","value":"kafkabroker-pd"}]}],"id":"8q9-ni5-d7z"}

  1. Clicking convert, gives the following error:
    Conversion for "template_variable_presets" not found

❗️Conversion for "priority" not found

Describe the bug
I tried to configure a monitor in Datadog and use this plugin in firefox to convert to terraform. Here was the JSON I copied from Datadog's export:

{
	"id": 30072632,
	"name": "Concurrent lambda invocations >80% of unreserved concurrency limit",
	"type": "metric alert",
	"query": "max(last_15m):avg:aws.lambda.unreserved_concurrent_executions.maximum{account:xxxx} > 800",
	"message": "The number of unreserved concurrent Lambda executions has exceeded 80% of our account limit in {{account}}. If the limit is reached Lambda executions will start to be throttled by AWS. We should determine if there's a function being executed more often than expected or if we should request a limit increase for the account. ",
	"tags": [],
	"options": {
		"notify_audit": true,
		"locked": false,
		"timeout_h": 0,
		"new_host_delay": 300,
		"require_full_window": true,
		"notify_no_data": false,
		"renotify_interval": "0",
		"evaluation_delay": 300,
		"escalation_message": "",
		"no_data_timeframe": null,
		"include_tags": true,
		"thresholds": {
			"critical": 800
		}
	},
	"priority": 1
}

When I tried to convert, I received the following error message: ❗️Conversion for "priority" not found

If I remove the priority key from the JSON the HCL is generated correctly.

It seems like this might be a new property added to Datadog since this extension was last released? It looks like it is supported in the terraform provider:

priority (Number)

Expected behavior
I expect that this property would be supported and generate the correct terraform configuration.

Screenshots

System info (please complete the following information):

  • OS: MacOs Big Sur
  • Browser: Firefox
  • Version: 84.0.2

Testing

Would be great to have testing to make changes safer, especially as more people contribute

Can't convert key 'on_right_yaxis'

I'm using version 3.5.0 of the Datadog-to-Terraform Converter Chrome extension.

Trying the convert a Datadog dashboard JSON fails with error:

Can't convert key 'on_right_yaxis'

The JSON is following:

{
  "title": "Title",
  "description": "Description",
  "widgets": [
    {
      "id": 6094222782053076,
      "definition": {
        "title": "ECS",
        "type": "group",
        "layout_type": "ordered",
        "widgets": [
          {
            "id": 2061680356847030,
            "definition": {
              "title": "Num Services Running",
              "show_legend": false,
              "legend_size": "0",
              "type": "timeseries",
              "requests": [
                {
                  "q": "sum:aws.ecs.service.running{$env,$client} by {servicename}",
                  "on_right_yaxis": false,
                  "style": {
                    "palette": "dog_classic",
                    "line_type": "solid",
                    "line_width": "normal"
                  },
                  "display_type": "area"
                }
              ],
              "yaxis": {
                "scale": "linear",
                "include_zero": true,
                "min": "auto",
                "max": "auto"
              }
            }
          }
        ]
      }
    }
  ],
  "template_variables": [
    { "name": "env", "default": "*", "prefix": "env" },
    { "name": "client", "default": "*", "prefix": "client" }
  ],
  "layout_type": "ordered",
  "is_read_only": true,
  "notify_list": [],
  "id": "dru-pjw-8zd"
}

Error handling

We don't show errors in the extension UI, which can be confusing.

It would be nice to show parsing errors like Could not transform key 'threshold_windows'

Error - Can't convert key `'tags'`

Describe the bug
Error - Can't convert key 'tags'

To Reproduce
Some full example input which reproduces the bug, eg.

{
  "title": "Lightspeed CloudFront",
  "description": "[[suggested_dashboards]]",
  "widgets": [
    {
      "id": 2521798555330034,
      "layout": {
        "x": 0.08333333333333333,
        "y": 0.08333333333333333,
        "width": 24,
        "height": 6
      },
      "definition": {
        "type": "free_text",
        "text": "Lightspeed CloudFront",
        "color": "#2B13E6",
        "font_size": "auto",
        "text_align": "left"
      }
    }
  ],
  "layout_type": "free",
  "notify_list": [],
  "tags": [
    "team:lightspeed-product-api"
  ]
}

Expected terraform code

resource "datadog_dashboard" "not broken, woo!" { ... }

Screenshots
image

Additional context
If I remove this, the error does not occur:

  "tags": [
    "team:lightspeed-product-api"
  ]

Add a way to add defaults

We have some defaults that it would be good to set regardless of what gets pasted in.

  1. locked set to true
  2. Add tag "terraform:true" in the tags list if it doesn't already have it
  3. Add #[MANAGED BY TERRAFORM] to the message at the bottom if it doesn't already have it

Anomaly detection monitors are not supported

Looks like the tool doesn't parse JSON objects for Anomaly Detection monitors.
It works with a standard metric alarm containing the same query though.

I believe this is happening Anomaly Detection has a new set of keys apart from thresholds that looks like this:

		"threshold_windows": {
			"trigger_window": "last_1h",
			"recovery_window": "last_30m"
		}

This do not seems to be handled.

To Conversion fails with: "Conversion for "id" not found.

when carrying out the process indicated in the documentation of copying the JSON content of a monitor, and putting the name of the resource, it does not generate the Terraform code with the indicated error.
❗️Conversion for "id" not found

Dashboard Conversion Seeing Error TypeError: array.forEach is not a function

Describe the bug
Trying to convert a dashboard json to terraform is seeing a TypeError: array.forEach is not a function

To Reproduce
Try converting this dashboard

{
  "title": "bpham-test",
  "description": "",
  "widgets": [
    {
      "id": 3383947803306764,
      "definition": {
        "title": "k8s metrics",
        "type": "group",
        "layout_type": "ordered",
        "widgets": [
          {
            "id": 643181470432836,
            "definition": {
              "title": "CPU Usage per Node",
              "title_size": "16",
              "title_align": "left",
              "type": "hostmap",
              "requests": {
                "fill": {
                  "q": "sum:kubernetes.cpu.usage.total{$cluster_project_id,$cluster} by {host}"
                }
              },
              "no_metric_hosts": false,
              "no_group_hosts": true,
              "group": ["kube_metadata.node.label.cloud.google.com/gke-nodepool"],
              "scope": ["$project_id", "$cluster"],
              "style": { "palette": "YlOrRd", "palette_flip": false }
            }
          }
        ]
      }
    }
  ],
  "template_variables": [
    { "name": "cluster_project_id", "default": "testporo", "prefix": "project" },
    { "name": "cluster", "default": "ucr-cluster", "prefix": "cluster_name" },
    { "name": "namespace", "default": "*", "prefix": "kube_namespace" },
    { "name": "subscription_project_id", "default": "cluster", "prefix": "project_id" }
  ],
  "layout_type": "ordered",
  "is_read_only": false,
  "notify_list": [],
  "id": "mue-kck-jmi"
}

Expected behavior
Conversion should work.

Screenshots
Screen Shot 2021-03-10 at 1 13 50 PM

System info (please complete the following information):

  • OS: Mac OS 11.2.2
  • Browser Chrome
  • Version 88.0.4324.192

Omit deprecated param 'logset'

Don't have permissions to create a branch:

app\dashboard-converter.js :
logset: (_) => "", // 2.23.0 deprecated, see docs for widget.log_stream_definition

examples\screenboard.json :

{
     "id": 1177803908467722,
     "layout": {
       "x": 968,
       "y": -242,
       "width": 33,
       "height": 21
     },
     "definition": {
       "title": "Plugins",
       "title_size": "13",
       "title_align": "left",
       "type": "log_stream",
       "logset": "",
       "indexes": [],
       "query": "$dd_env $app_group status:(error OR emergency)",
       "sort": {
         "column": "service",
         "order": "desc"
       },
       "show_date_column": true,
       "show_message_column": true,
       "message_display": "expanded-md"
     }

Cannot convert new fields

Describe the bug
The plugin cannot convert these fields in DD monitor JSON:

  • restriction_query
  • on_missing_data
  • restricted_roles

To Reproduce

{
	"id": 10000000000,
	"name": "Console: A high error rate",
	"type": "rum alert",
	"query": "rum(\"-env:dev @error.source:(console OR source) @type:error\").rollup(\"count\").last(\"15m\") > 3",
	"message": "A high error rate",
	"tags": [
		"env:prod"
	],
	"options": {
		"thresholds": {
			"critical": 3
		},
		"enable_logs_sample": false,
		"notify_audit": false,
		"restriction_query": null,
		"on_missing_data": "default",
		"include_tags": false,
		"new_host_delay": 300,
		"groupby_simple_monitor": false,
		"silenced": {}
	},
	"priority": 2,
	"restricted_roles": [
		"ROLE_ID"
	]
}

Screenshots
image

image

image

Errors converting Monitor

❗️Can't convert key 'queryConfig'
❗️Can't convert key 'aggregation'

{
	"id": 32168291,
	"name": "DueDiligence - KYC - [Non-Prod] - Errors on Logs",
	"type": "log alert",
	"query": "logs(\"source:due_diligence env:(dev OR qa OR sbox) appgroup:dd-kyc status:(error OR emergency)\").index(\"*\").rollup(\"count\").by(\"service\").last(\"15m\") >= 1",
	"message": "{{#is_alert}}:notify @slack-DueDiligence-dd-dev-logs{{/is_alert}}",
	"tags": [
		"appgroup:dd-kyc",
		"duediligence",
		"log-alert",
		"monitor_env:non-prod",
		"terraform"
	],
	"options": {
		"include_tags": true,
		"notify_audit": false,
		"locked": true,
		"timeout_h": 0,
		"silenced": {},
		"enable_logs_sample": true,
		"thresholds": {
			"critical": 1
		},
		"new_host_delay": 300,
		"require_full_window": true,
		"notify_no_data": false,
		"renotify_interval": 0,
		"groupby_simple_monitor": true,
		"queryConfig": {
			"logset": {
				"name": "*"
			},
			"track": "logs",
			"timeRange": {
				"to": 1616759698501,
				"live": true,
				"from": 1616745298501
			},
			"queryString": "source:due_diligence AND env:(dev OR qa OR sbox) AND appgroup:dd-kyc AND status:(error OR emergency)",
			"indexes": [
				"*"
			],
			"queryIsFailed": false
		},
		"aggregation": {
			"metric": "count",
			"type": "count",
			"groupBy": "core_service"
		}
	},
	"priority": 4
}

Automated publishing is broken

Describe the bug
Usually admins publish the extension by tagging a new release on Github. That kicks off a CircleCI workflow which bundles up the extension and publishes it to the Chrome Store automatically.

I did that for the latest release (v1.3) and the change never hit the Chrome Store. We should look into the Circle build and see if it actually passed. I manually uploaded the new version to the store, so we're not entirely blocked on shipping

Terraform code generation fails if `threshold_windows` present in monitor JSON

Converting JSON to Terraform code failed when I tried it with this JSON:

{
	"name": "Inbound Email Rejection: App Not Found",
	"type": "metric alert",
	"query": "avg(last_1h):anomalies(sum:<metric>.as_count(), 'agile', 2, direction='both', alert_window='last_5m', interval=20, count_default_zero='true', seasonality='hourly') >= 1",
	"message": "Blah",
	"tags": [],
	"options": {
		"notify_audit": false,
		"locked": false,
		"timeout_h": 0,
		"new_host_delay": 300,
		"require_full_window": true,
		"notify_no_data": true,
		"renotify_interval": "0",
		"escalation_message": "",
		"no_data_timeframe": 10,
		"include_tags": false,
		"thresholds": {
			"critical": 1,
			"critical_recovery": 0
		},
		"threshold_windows": {
			"trigger_window": "last_5m",
			"recovery_window": "last_15m"
		}
	}
}

@laurmurclar helped me and after removing

"threshold_windows": {
  "trigger_window": "last_5m",
  "recovery_window": "last_15m"
}

from the options sub-object it worked.

Terraform apply fails due to blocks being defined as arguments during conversion from json

Describe the bug
Screenboard or Timeboard JSON converted into Terraform/HCL fails terraform apply due to incorrect format of style, yaxis, custom_links attribute blocks (maybe others). I believe this is a more recent change in terraform, using terraform 13.5 at the moment.

To Reproduce

  1. Create a dashboard with a time series graph
  2. Export json and paste into extension
  3. Put into terraform file and apply
  4. See failures similiar to below:
Error: Unsupported argument

  on datadog.tf line 40, in resource "datadog_dashboard" "ay-dashboard-test":
  40:       yaxis = {

An argument named "yaxis" is not expected here. Did you mean to define a block
of type "yaxis"?


Error: Unsupported argument

  on datadog.tf line 67, in resource "datadog_dashboard" "ay-dashboard-test":
  67:         style = {

An argument named "style" is not expected here. Did you mean to define a block
of type "style"?

Expected behavior
Terraform apply should create dashboard

System info (please complete the following information):

  • Browser: Happened on both Firefox and Chrome extensions
  • Version: 3.4.1
  • Terraform version: 13.5

Additional context
As a workaround search and replace in the converted terraform output

  • yaxis = { to yaxis {
  • style = { to style {
  • custom_links I just deleted since we aren't using them

Format output

Currently, the output is not formatted and you need to run terraform fmt on it before using. You can make this easier by having your text editor run it on save of all terraform files, but it would be nice to have this built in to the extension.

Screenboard - can't convert several keys

Screenboard, missing to convert definition key properties:

"type": "manage_status",

  • count
    image
  • start
    image

"type": "note",

  • vertical_align
    image
  • has_padding
    image

❗️Can't convert key 'logset'

Safari Support

Is your feature request related to a problem? Please describe.
I have to switch to a different browser to use this extension.

Describe the solution you'd like
It would be great if I could install this extension on Safari.

Describe alternatives you've considered
N/A

Additional context
N/A

Can't convert key `show_title`

Describe the bug
Cant convert key show title

To Reproduce
Some full example input which reproduces the bug, eg.

  "widgets": [
    {
      "id": 5474453034391576,
      "definition": {
        "title": "Errors",
        "show_title": true,
        "type": "group",
        "layout_type": "ordered",
        "widgets": [

Screenshots
Screenshot 2023-08-28 at 2 57 41 PM

Cannot convert new Datadog json fields

Describe the bug
The Datadog dashboard json format has been changed, there are new fields, for example: show_title, queries, etc.

To Reproduce
Create a new dashboard on Datadog UI and convert it.

{
   "title":"Title",
   "description":"",
   "widgets":[ 
          {
            "definition":{
               "title":"Title",
               "title_size":"16",
               "title_align":"left",
               "show_legend":true,
               "legend_layout":"auto",
               "legend_columns":[
                  "value"
               ],
               "time":{
                  
               },
               "type":"timeseries",
               "requests":[
                  {
                     "queries":[
                        {
                           "data_source":"metrics",
                           "name":"query1",
                           "query":"metric1{$account}"
                        },
                        {
                           "data_source":"metrics",
                           "name":"query2",
                           "query":"metric2{$account}"
                        }
                     ],
                     "response_format":"timeseries",
                     "style":{
                        "palette":"dog_classic",
                        "line_type":"solid",
                        "line_width":"normal"
                     },
                     "display_type":"line"
                  }
               ],
               "yaxis":{
                  "include_zero":false
               },
               "markers":[
                  
               ]
            },
            "layout":{
               "x":4,
               "y":0,
               "width":4,
               "height":2
            }
          }
       ],
   "template_variables":[
      {
         "name":"account",
         "default":"account1",
         "prefix":"account"
      }
   ],
   "layout_type":"ordered",
   "is_read_only":false,
   "notify_list":[
      
   ],
   "reflow_type":"fixed"
}

The error message from Chrome extension: ❗️Can't convert key 'queries'

Errors converting Monitor

Can't convert key 'groupby_simple_monitor'
Can't convert key 'silenced'

{
	"id": 123456789,
	"name": "DueDiligence - KYC - 422's on Logs",
	"type": "log alert",
	"query": "logs(\" source:due_diligence AND env:prod AND appgroup:dd-kyc AND @Properties.StatusCode:422\").index(\"*\").rollup(\"count\").by(\"service\").last(\"1d\") >= 5",
	"message": ":notify @slack-DueDiligence-dd-prod-warning-logs",
	"tags": [
		"appgroup:dd-kyc",
		"duediligence",
		"log-alert",
		"monitor_env:prod",
		"terraform"
	],
	"options": {
		"notify_audit": false,
		"locked": true,
		"silenced": {},
		"enable_logs_sample": true,
		"thresholds": {
			"critical": 5
		},
		"new_host_delay": 300,
		"require_full_window": true,
		"notify_no_data": false,
		"include_tags": true,
		"groupby_simple_monitor": true
	},
	"priority": 3
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.