Skip to content

DataDogMonitor CRD: Variables not configurable with yaml #1883

Open
@MartinKosicky

Description

@MartinKosicky

Hello, when I create a monitor in DataDog and then export it, it uses a function (in my case default_zero), and click on the Export Monitor, I will get an exported json. This exported json has a "variables" section in options. My question is how to set this into the CRD?

{
	"name": "Test1,
	"type": "log alert",
	"query": "formula(\"default_zero(query)\").last(\"5m\") > 0",
	"message": "Test1",
	"tags": [],
	"options": {
		"thresholds": {
			"critical": 0
		},
		"enable_logs_sample": false,
		"notify_audit": false,
		"on_missing_data": "default",
		"include_tags": false,
		"variables": [
			{
				"name": "query",
				"data_source": "logs",
				"search": {
					"query": "@env:production"
				},
				"indexes": [
					"*"
				],
				"group_by": [],
				"compute": {
					"aggregation": "count"
				},
				"storage": "hot"
			}
		]
	}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions