From 4df1cbe124a51192bbf6b1212b887b2c627e6283 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Fri, 10 Nov 2023 17:47:35 +0100 Subject: [PATCH] Enable custom threshold and inventory rules in Serverless (#170351) Closes #170327 Relates to https://github.com/elastic/kibana/issues/168034 ## Summary This PR enables the custom threshold and inventory rules in Serverless. |Custom threshold rule|Inventory rule| |---|---| |![image](https://github.com/elastic/kibana/assets/12370520/35468ded-d936-4bb1-b16b-0bcfe987e0f1)|![image](https://github.com/elastic/kibana/assets/12370520/1d1a65e0-78f5-4550-a620-9342b28ec5a9)| Related PR: [Add the query delay mechanism to the inventory rule type and change consumer to Observability](https://github.com/elastic/kibana/pull/170628) --- x-pack/plugins/infra/server/plugin.ts | 4 ++-- x-pack/plugins/observability/server/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/infra/server/plugin.ts b/x-pack/plugins/infra/server/plugin.ts index 6a2734b399199..afcbe69c01f5c 100644 --- a/x-pack/plugins/infra/server/plugin.ts +++ b/x-pack/plugins/infra/server/plugin.ts @@ -98,7 +98,7 @@ export const config: PluginConfigDescriptor = { }), inventoryThresholdAlertRuleEnabled: offeringBasedSchema({ traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: false }), + serverless: schema.boolean({ defaultValue: true }), }), metricThresholdAlertRuleEnabled: offeringBasedSchema({ traditional: schema.boolean({ defaultValue: true }), @@ -110,7 +110,7 @@ export const config: PluginConfigDescriptor = { }), alertsAndRulesDropdownEnabled: offeringBasedSchema({ traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: false }), + serverless: schema.boolean({ defaultValue: true }), }), }), }), diff --git a/x-pack/plugins/observability/server/index.ts b/x-pack/plugins/observability/server/index.ts index 96231115e3fa2..2153d00abdbc6 100644 --- a/x-pack/plugins/observability/server/index.ts +++ b/x-pack/plugins/observability/server/index.ts @@ -48,7 +48,7 @@ const configSchema = schema.object({ }), thresholdRule: schema.object({ enabled: offeringBasedSchema({ - serverless: schema.boolean({ defaultValue: false }), + serverless: schema.boolean({ defaultValue: true }), traditional: schema.boolean({ defaultValue: true }), }), }),