mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Metrics UI] Optimizations for Inventory Threshold Alerts (#122460)
* [Metrics UI] Optimizations for Inventory Threshold Alerts * reverting changes to the snapshot api
This commit is contained in:
parent
f2e2add9ae
commit
d55fd9bb11
6 changed files with 18 additions and 3 deletions
|
@ -23,5 +23,8 @@ Field used to identify Docker containers. Defaults to `container.id`.
|
|||
`xpack.infra.sources.default.fields.pod`::
|
||||
Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.uid`.
|
||||
|
||||
`xpack.infra.alerting.inventory_threshold.group_by_page_size`::
|
||||
Controls the size of the composite aggregations used by the Inventory Threshold to retrieve all the hosts. Defaults to `10_000`.
|
||||
|
||||
`xpack.infra.alerting.metric_threshold.group_by_page_size`::
|
||||
Controls the size of the composite aggregations used by the Metric Threshold group by feature. Defaults to `10000`.
|
||||
Controls the size of the composite aggregations used by the Metric Threshold group by feature. Defaults to `10_000`.
|
||||
|
|
|
@ -110,7 +110,7 @@ export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) =
|
|||
)
|
||||
.catch(() => undefined);
|
||||
|
||||
const compositeSize = libs.configuration.inventory.compositeSize;
|
||||
const compositeSize = libs.configuration.alerting.inventory_threshold.group_by_page_size;
|
||||
const results = await Promise.all(
|
||||
criteria.map((condition) =>
|
||||
evaluateCondition({
|
||||
|
|
|
@ -749,6 +749,9 @@ describe('The metric threshold alert type', () => {
|
|||
|
||||
const createMockStaticConfiguration = (sources: any) => ({
|
||||
alerting: {
|
||||
inventory_threshold: {
|
||||
group_by_page_size: 100,
|
||||
},
|
||||
metric_threshold: {
|
||||
group_by_page_size: 100,
|
||||
},
|
||||
|
|
|
@ -110,6 +110,9 @@ describe('the InfraSources lib', () => {
|
|||
|
||||
const createMockStaticConfiguration = (sources: any) => ({
|
||||
alerting: {
|
||||
inventory_threshold: {
|
||||
group_by_page_size: 10000,
|
||||
},
|
||||
metric_threshold: {
|
||||
group_by_page_size: 10000,
|
||||
},
|
||||
|
|
|
@ -45,8 +45,11 @@ import { configDeprecations, getInfraDeprecationsFactory } from './deprecations'
|
|||
export const config: PluginConfigDescriptor<InfraConfig> = {
|
||||
schema: schema.object({
|
||||
alerting: schema.object({
|
||||
inventory_threshold: schema.object({
|
||||
group_by_page_size: schema.number({ defaultValue: 10_000 }),
|
||||
}),
|
||||
metric_threshold: schema.object({
|
||||
group_by_page_size: schema.number({ defaultValue: 10000 }),
|
||||
group_by_page_size: schema.number({ defaultValue: 10_000 }),
|
||||
}),
|
||||
}),
|
||||
inventory: schema.object({
|
||||
|
|
|
@ -34,6 +34,9 @@ export interface InfraPluginRequestHandlerContext extends RequestHandlerContext
|
|||
|
||||
export interface InfraConfig {
|
||||
alerting: {
|
||||
inventory_threshold: {
|
||||
group_by_page_size: number;
|
||||
};
|
||||
metric_threshold: {
|
||||
group_by_page_size: number;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue