mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[AO] Set the Custom Threshold ONLY available on stateful as Tech Preview (#167782)
## Summary It fixes https://github.com/elastic/kibana/issues/167650
This commit is contained in:
parent
ea33696ba7
commit
d28227ca6a
15 changed files with 19 additions and 16 deletions
|
@ -298,7 +298,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
'xpack.observability.unsafe.alertDetails.logs.enabled (boolean)',
|
||||
'xpack.observability.unsafe.alertDetails.uptime.enabled (boolean)',
|
||||
'xpack.observability.unsafe.alertDetails.observability.enabled (boolean)',
|
||||
'xpack.observability.unsafe.thresholdRule.enabled (boolean)',
|
||||
'xpack.observability.unsafe.thresholdRule.enabled (any)', // conditional, is actually a boolean
|
||||
'xpack.observability_onboarding.ui.enabled (boolean)',
|
||||
'xpack.observabilityLogExplorer.navigation.showAppLink (any)', // conditional, is actually a boolean
|
||||
];
|
||||
|
|
|
@ -159,7 +159,7 @@ export const buildMetricThresholdAlert = (
|
|||
alertOnGroupDisappear: true,
|
||||
},
|
||||
'kibana.alert.evaluation.values': [2500, 5],
|
||||
'kibana.alert.rule.category': 'Custom threshold (BETA)',
|
||||
'kibana.alert.rule.category': 'Custom threshold (Technical Preview)',
|
||||
'kibana.alert.rule.consumer': 'alerts',
|
||||
'kibana.alert.rule.execution.uuid': '62dd07ef-ead9-4b1f-a415-7c83d03925f7',
|
||||
'kibana.alert.rule.name': 'One condition',
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// TODO: https://github.com/elastic/kibana/issues/110905
|
||||
/* eslint-disable @kbn/eslint/no_export_all */
|
||||
|
||||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
import { offeringBasedSchema, schema, TypeOf } from '@kbn/config-schema';
|
||||
import { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server';
|
||||
import { ObservabilityPlugin, ObservabilityPluginSetup } from './plugin';
|
||||
import { createOrUpdateIndex, Mappings } from './utils/create_or_update_index';
|
||||
|
@ -47,7 +47,10 @@ const configSchema = schema.object({
|
|||
}),
|
||||
}),
|
||||
thresholdRule: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
enabled: offeringBasedSchema({
|
||||
serverless: schema.boolean({ defaultValue: false }),
|
||||
traditional: schema.boolean({ defaultValue: true }),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
customThresholdRule: schema.object({
|
||||
|
|
|
@ -121,7 +121,7 @@ export function thresholdRuleType(
|
|||
return {
|
||||
id: OBSERVABILITY_THRESHOLD_RULE_TYPE_ID,
|
||||
name: i18n.translate('xpack.observability.threshold.ruleName', {
|
||||
defaultMessage: 'Custom threshold (BETA)',
|
||||
defaultMessage: 'Custom threshold (Technical Preview)',
|
||||
}),
|
||||
validate: {
|
||||
params: schema.object(
|
||||
|
|
|
@ -143,7 +143,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'logs');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -134,7 +134,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'logs');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -160,7 +160,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'logs');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -151,7 +151,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'logs');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -141,7 +141,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'logs');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -164,7 +164,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'logs');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -145,7 +145,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'apm');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -131,7 +131,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'apm');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -149,7 +149,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'apm');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -139,7 +139,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'apm');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
|
@ -158,7 +158,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
expect(resp.hits.hits[0]._source).property(
|
||||
'kibana.alert.rule.category',
|
||||
'Custom threshold (BETA)'
|
||||
'Custom threshold (Technical Preview)'
|
||||
);
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.consumer', 'apm');
|
||||
expect(resp.hits.hits[0]._source).property('kibana.alert.rule.name', 'Threshold rule');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue