Skip to content
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

Support for log monitors dependant on multiple log queries and formulas #971

Open
piotrekzurek opened this issue Nov 6, 2023 · 0 comments

Comments

@piotrekzurek
Copy link

Currently this seems not supported. Please consider adding this as a feature.

The JSON exported monitor looks like this (but it's not possible to include formula within the single query: field with Datadog Kubernetes Operator yaml configuration - the support and CRDs would need to be made supporting such a structure first):

	"name": "STG - High number of responses with 4xx error codes on FD",
	"type": "log alert",
	"query": "formula(\"cutoff_min(query, 50) / cutoff_min(query1, 50) * 100\").last(\"15m\") > 30",
	"message": "High number of responses with 4xx error codes on FD @email-address.example.com",
	"tags": [
		"soc2",
	],
	"options": {
		"enable_logs_sample": false,
		"include_tags": true,
		"new_host_delay": 300,
		"notify_no_data": false,
		"on_missing_data": "default",
		"require_full_window": false,
		"thresholds": {
			"critical": 30,
			"critical_recovery": 15,
			"warning": 20,
			"warning_recovery": 5
		},
		"variables": [
			{
				"compute": {
					"aggregation": "count"
				},
				"data_source": "logs",
				"group_by": [],
				"indexes": [
					"*"
				],
				"name": "query",
				"search": {
					"query": "source:azure.cdn @properties.httpStatusCode:[400 TO 499]"
				}
			},
			{
				"compute": {
					"aggregation": "count"
				},
				"data_source": "logs",
				"group_by": [],
				"indexes": [
					"*"
				],
				"name": "query1",
				"search": {
					"query": "source:azure.cdn"
				}
			}
		],
		"notify_audit": false,
		"groupby_simple_monitor": false,
		"silenced": {}
	},
	"priority": 2,
	"restricted_roles": null
}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants