Skip to content

Commit 7ca0b43

Browse files
[8.19] [Observability] [Rules] Add telemetry for linked dashboards and investigation guide (#217502) (#220422)
# Backport This will backport the following commits from `main` to `8.19`: - [[Observability] [Rules] Add telemetry for linked dashboards and investigation guide (#217502)](#217502) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Bena Kansara","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-07T18:09:11Z","message":"[Observability] [Rules] Add telemetry for linked dashboards and investigation guide (#217502)\n\nPart of https://github.com/elastic/kibana/issues/216491\n\nAdds telemetry for linked dashboards and investigation guide fields that\nare coming soon: https://github.com/elastic/kibana/issues/214522,\nhttps://github.com/elastic/kibana/issues/213024\n\n- Number of rules with linked dashboards\n- Number of rules with non-empty investigation guide\n\nTo test, you can use the following API call. The result should include\ntwo new fields: `count_rules_with_linked_dashboards` and\n`count_rules_with_investigation_guide`\n\n```\nPOST kbn:/internal/telemetry/clusters/_stats?apiVersion=2\n{\n \"unencrypted\": true,\n \"refreshCache\": true\n}\n```\n\n### Note\nI have added a comment to update one test file\n(`x-pack/test/alerting_api_integration/common/lib/get_test_rule_data.ts`)\nonce `artifacts` field is available in schema.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"23683e59c06a9e10f12a245c8a0c2d7f07563e03","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0"],"title":"[Observability] [Rules] Add telemetry for linked dashboards and investigation guide","number":217502,"url":"https://github.com/elastic/kibana/pull/217502","mergeCommit":{"message":"[Observability] [Rules] Add telemetry for linked dashboards and investigation guide (#217502)\n\nPart of https://github.com/elastic/kibana/issues/216491\n\nAdds telemetry for linked dashboards and investigation guide fields that\nare coming soon: https://github.com/elastic/kibana/issues/214522,\nhttps://github.com/elastic/kibana/issues/213024\n\n- Number of rules with linked dashboards\n- Number of rules with non-empty investigation guide\n\nTo test, you can use the following API call. The result should include\ntwo new fields: `count_rules_with_linked_dashboards` and\n`count_rules_with_investigation_guide`\n\n```\nPOST kbn:/internal/telemetry/clusters/_stats?apiVersion=2\n{\n \"unencrypted\": true,\n \"refreshCache\": true\n}\n```\n\n### Note\nI have added a comment to update one test file\n(`x-pack/test/alerting_api_integration/common/lib/get_test_rule_data.ts`)\nonce `artifacts` field is available in schema.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"23683e59c06a9e10f12a245c8a0c2d7f07563e03"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217502","number":217502,"mergeCommit":{"message":"[Observability] [Rules] Add telemetry for linked dashboards and investigation guide (#217502)\n\nPart of https://github.com/elastic/kibana/issues/216491\n\nAdds telemetry for linked dashboards and investigation guide fields that\nare coming soon: https://github.com/elastic/kibana/issues/214522,\nhttps://github.com/elastic/kibana/issues/213024\n\n- Number of rules with linked dashboards\n- Number of rules with non-empty investigation guide\n\nTo test, you can use the following API call. The result should include\ntwo new fields: `count_rules_with_linked_dashboards` and\n`count_rules_with_investigation_guide`\n\n```\nPOST kbn:/internal/telemetry/clusters/_stats?apiVersion=2\n{\n \"unencrypted\": true,\n \"refreshCache\": true\n}\n```\n\n### Note\nI have added a comment to update one test file\n(`x-pack/test/alerting_api_integration/common/lib/get_test_rule_data.ts`)\nonce `artifacts` field is available in schema.\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"23683e59c06a9e10f12a245c8a0c2d7f07563e03"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
1 parent 9a80f94 commit 7ca0b43

File tree

11 files changed

+360
-10
lines changed

11 files changed

+360
-10
lines changed

x-pack/platform/plugins/private/telemetry_collection_xpack/schema/xpack_platform.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,12 @@
17271727
"count_rules_muted": {
17281728
"type": "long"
17291729
},
1730+
"count_rules_with_linked_dashboards": {
1731+
"type": "long"
1732+
},
1733+
"count_rules_with_investigation_guide": {
1734+
"type": "long"
1735+
},
17301736
"count_mw_total": {
17311737
"type": "long"
17321738
},

x-pack/platform/plugins/shared/actions/server/usage/lib/actions_telemetry_util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export function getActions(aggregation: ActionRefIdsAgg[] = []) {
3939
for (const a of aggregation) {
4040
const connectorId = a.key[0];
4141
const actionRef = a.key[1];
42+
if (actionRef.startsWith('dashboard')) continue;
4243
actions.connectorIds[connectorId] = actionRef;
4344
actions.total++;
4445
}

x-pack/platform/plugins/shared/alerting/server/usage/alerting_usage_collector.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ export function createAlertingUsageCollector(
205205
count_rules_with_tags: 0,
206206
count_rules_snoozed: 0,
207207
count_rules_muted: 0,
208+
count_rules_with_linked_dashboards: 0,
209+
count_rules_with_investigation_guide: 0,
208210
count_mw_total: 0,
209211
count_mw_with_repeat_toggle_on: 0,
210212
count_mw_with_filter_alert_toggle_on: 0,
@@ -294,6 +296,8 @@ export function createAlertingUsageCollector(
294296
count_rules_by_notify_when: byNotifyWhenSchema,
295297
count_rules_snoozed: { type: 'long' },
296298
count_rules_muted: { type: 'long' },
299+
count_rules_with_linked_dashboards: { type: 'long' },
300+
count_rules_with_investigation_guide: { type: 'long' },
297301
count_mw_total: { type: 'long' },
298302
count_mw_with_repeat_toggle_on: { type: 'long' },
299303
count_mw_with_filter_alert_toggle_on: { type: 'long' },

x-pack/platform/plugins/shared/alerting/server/usage/lib/get_telemetry_from_kibana.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ describe('kibana index telemetry', () => {
239239
sum_rules_snoozed: { value: 11 },
240240
sum_rules_muted: { value: 12 },
241241
sum_rules_with_muted_alerts: { value: 13 },
242+
sum_rules_with_linked_dashboards: { value: 5 },
243+
sum_rules_with_investigation_guide: { value: 5 },
242244
},
243245
});
244246

@@ -289,6 +291,8 @@ describe('kibana index telemetry', () => {
289291
warning: 5,
290292
},
291293
count_rules_with_tags: 10,
294+
count_rules_with_linked_dashboards: 5,
295+
count_rules_with_investigation_guide: 5,
292296
count_rules_by_notify_when: {
293297
on_action_group_change: 5,
294298
on_active_alert: 6,
@@ -337,6 +341,8 @@ describe('kibana index telemetry', () => {
337341
warning: 0,
338342
},
339343
count_rules_with_tags: 0,
344+
count_rules_with_linked_dashboards: 0,
345+
count_rules_with_investigation_guide: 0,
340346
count_rules_by_notify_when: {
341347
on_action_group_change: 0,
342348
on_active_alert: 0,
@@ -402,7 +408,7 @@ describe('kibana index telemetry', () => {
402408
const loggerCalls = loggingSystemMock.collect(logger);
403409
expect(loggerCalls.debug).toHaveLength(2);
404410
expect(loggerCalls.debug[0][0]).toEqual(
405-
`query for getTotalCountAggregations - {\"index\":\"test\",\"size\":0,\"body\":{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"type\":\"alert\"}}]}},\"runtime_mappings\":{\"rule_action_count\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def alert = params._source['alert'];\\n if (alert != null) {\\n def actions = alert.actions;\\n if (actions != null) {\\n emit(actions.length);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_schedule_interval\":{\"type\":\"long\",\"script\":{\"source\":\"\\n int parsed = 0;\\n if (doc['alert.schedule.interval'].size() > 0) {\\n def interval = doc['alert.schedule.interval'].value;\\n\\n if (interval.length() > 1) {\\n // get last char\\n String timeChar = interval.substring(interval.length() - 1);\\n // remove last char\\n interval = interval.substring(0, interval.length() - 1);\\n\\n if (interval.chars().allMatch(Character::isDigit)) {\\n // using of regex is not allowed in painless language\\n parsed = Integer.parseInt(interval);\\n\\n if (timeChar.equals(\\\"s\\\")) {\\n parsed = parsed;\\n } else if (timeChar.equals(\\\"m\\\")) {\\n parsed = parsed * 60;\\n } else if (timeChar.equals(\\\"h\\\")) {\\n parsed = parsed * 60 * 60;\\n } else if (timeChar.equals(\\\"d\\\")) {\\n parsed = parsed * 24 * 60 * 60;\\n }\\n emit(parsed);\\n }\\n }\\n }\\n emit(parsed);\\n \"}},\"rule_throttle_interval\":{\"type\":\"long\",\"script\":{\"source\":\"\\n int parsed = 0;\\n if (doc['alert.throttle'].size() > 0) {\\n def throttle = doc['alert.throttle'].value;\\n\\n if (throttle.length() > 1) {\\n // get last char\\n String timeChar = throttle.substring(throttle.length() - 1);\\n // remove last char\\n throttle = throttle.substring(0, throttle.length() - 1);\\n\\n if (throttle.chars().allMatch(Character::isDigit)) {\\n // using of regex is not allowed in painless language\\n parsed = Integer.parseInt(throttle);\\n\\n if (timeChar.equals(\\\"s\\\")) {\\n parsed = parsed;\\n } else if (timeChar.equals(\\\"m\\\")) {\\n parsed = parsed * 60;\\n } else if (timeChar.equals(\\\"h\\\")) {\\n parsed = parsed * 60 * 60;\\n } else if (timeChar.equals(\\\"d\\\")) {\\n parsed = parsed * 24 * 60 * 60;\\n }\\n emit(parsed);\\n }\\n }\\n }\\n emit(parsed);\\n \"}},\"rule_with_tags\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.tags != null) {\\n if (rule.tags.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_snoozed\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.snoozeSchedule != null) {\\n if (rule.snoozeSchedule.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_muted\":{\"type\":\"long\",\"script\":{\"source\":\"\\n if (doc['alert.muteAll'].value == true) {\\n emit(1);\\n } else {\\n emit(0);\\n }\"}},\"rule_with_muted_alerts\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.mutedInstanceIds != null) {\\n if (rule.mutedInstanceIds.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}}},\"aggs\":{\"by_rule_type_id\":{\"terms\":{\"field\":\"alert.alertTypeId\",\"size\":33}},\"max_throttle_time\":{\"max\":{\"field\":\"rule_throttle_interval\"}},\"min_throttle_time\":{\"min\":{\"field\":\"rule_throttle_interval\"}},\"avg_throttle_time\":{\"avg\":{\"field\":\"rule_throttle_interval\"}},\"max_interval_time\":{\"max\":{\"field\":\"rule_schedule_interval\"}},\"min_interval_time\":{\"min\":{\"field\":\"rule_schedule_interval\"}},\"avg_interval_time\":{\"avg\":{\"field\":\"rule_schedule_interval\"}},\"max_actions_count\":{\"max\":{\"field\":\"rule_action_count\"}},\"min_actions_count\":{\"min\":{\"field\":\"rule_action_count\"}},\"avg_actions_count\":{\"avg\":{\"field\":\"rule_action_count\"}},\"by_execution_status\":{\"terms\":{\"field\":\"alert.executionStatus.status\"}},\"by_notify_when\":{\"terms\":{\"field\":\"alert.notifyWhen\"}},\"connector_types_by_consumers\":{\"terms\":{\"field\":\"alert.consumer\"},\"aggs\":{\"actions\":{\"nested\":{\"path\":\"alert.actions\"},\"aggs\":{\"connector_types\":{\"terms\":{\"field\":\"alert.actions.actionTypeId\"}}}}}},\"by_search_type\":{\"terms\":{\"field\":\"alert.params.searchType\"}},\"sum_rules_with_tags\":{\"sum\":{\"field\":\"rule_with_tags\"}},\"sum_rules_snoozed\":{\"sum\":{\"field\":\"rule_snoozed\"}},\"sum_rules_muted\":{\"sum\":{\"field\":\"rule_muted\"}},\"sum_rules_with_muted_alerts\":{\"sum\":{\"field\":\"rule_with_muted_alerts\"}}}}}`
411+
`query for getTotalCountAggregations - {\"index\":\"test\",\"size\":0,\"body\":{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"type\":\"alert\"}}]}},\"runtime_mappings\":{\"rule_action_count\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def alert = params._source['alert'];\\n if (alert != null) {\\n def actions = alert.actions;\\n if (actions != null) {\\n emit(actions.length);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_schedule_interval\":{\"type\":\"long\",\"script\":{\"source\":\"\\n int parsed = 0;\\n if (doc['alert.schedule.interval'].size() > 0) {\\n def interval = doc['alert.schedule.interval'].value;\\n\\n if (interval.length() > 1) {\\n // get last char\\n String timeChar = interval.substring(interval.length() - 1);\\n // remove last char\\n interval = interval.substring(0, interval.length() - 1);\\n\\n if (interval.chars().allMatch(Character::isDigit)) {\\n // using of regex is not allowed in painless language\\n parsed = Integer.parseInt(interval);\\n\\n if (timeChar.equals(\\\"s\\\")) {\\n parsed = parsed;\\n } else if (timeChar.equals(\\\"m\\\")) {\\n parsed = parsed * 60;\\n } else if (timeChar.equals(\\\"h\\\")) {\\n parsed = parsed * 60 * 60;\\n } else if (timeChar.equals(\\\"d\\\")) {\\n parsed = parsed * 24 * 60 * 60;\\n }\\n emit(parsed);\\n }\\n }\\n }\\n emit(parsed);\\n \"}},\"rule_throttle_interval\":{\"type\":\"long\",\"script\":{\"source\":\"\\n int parsed = 0;\\n if (doc['alert.throttle'].size() > 0) {\\n def throttle = doc['alert.throttle'].value;\\n\\n if (throttle.length() > 1) {\\n // get last char\\n String timeChar = throttle.substring(throttle.length() - 1);\\n // remove last char\\n throttle = throttle.substring(0, throttle.length() - 1);\\n\\n if (throttle.chars().allMatch(Character::isDigit)) {\\n // using of regex is not allowed in painless language\\n parsed = Integer.parseInt(throttle);\\n\\n if (timeChar.equals(\\\"s\\\")) {\\n parsed = parsed;\\n } else if (timeChar.equals(\\\"m\\\")) {\\n parsed = parsed * 60;\\n } else if (timeChar.equals(\\\"h\\\")) {\\n parsed = parsed * 60 * 60;\\n } else if (timeChar.equals(\\\"d\\\")) {\\n parsed = parsed * 24 * 60 * 60;\\n }\\n emit(parsed);\\n }\\n }\\n }\\n emit(parsed);\\n \"}},\"rule_with_tags\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.tags != null) {\\n if (rule.tags.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_snoozed\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.snoozeSchedule != null) {\\n if (rule.snoozeSchedule.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_muted\":{\"type\":\"long\",\"script\":{\"source\":\"\\n if (doc['alert.muteAll'].value == true) {\\n emit(1);\\n } else {\\n emit(0);\\n }\"}},\"rule_with_muted_alerts\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.mutedInstanceIds != null) {\\n if (rule.mutedInstanceIds.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_with_linked_dashboards\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.artifacts != null && rule.artifacts.dashboards != null) {\\n if (rule.artifacts.dashboards.size() > 0) {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}},\"rule_with_investigation_guide\":{\"type\":\"long\",\"script\":{\"source\":\"\\n def rule = params._source['alert'];\\n if (rule != null && rule.artifacts != null && rule.artifacts.investigation_guide != null && rule.artifacts.investigation_guide.blob != null) {\\n if (rule.artifacts.investigation_guide.blob.trim() != '') {\\n emit(1);\\n } else {\\n emit(0);\\n }\\n }\"}}},\"aggs\":{\"by_rule_type_id\":{\"terms\":{\"field\":\"alert.alertTypeId\",\"size\":33}},\"max_throttle_time\":{\"max\":{\"field\":\"rule_throttle_interval\"}},\"min_throttle_time\":{\"min\":{\"field\":\"rule_throttle_interval\"}},\"avg_throttle_time\":{\"avg\":{\"field\":\"rule_throttle_interval\"}},\"max_interval_time\":{\"max\":{\"field\":\"rule_schedule_interval\"}},\"min_interval_time\":{\"min\":{\"field\":\"rule_schedule_interval\"}},\"avg_interval_time\":{\"avg\":{\"field\":\"rule_schedule_interval\"}},\"max_actions_count\":{\"max\":{\"field\":\"rule_action_count\"}},\"min_actions_count\":{\"min\":{\"field\":\"rule_action_count\"}},\"avg_actions_count\":{\"avg\":{\"field\":\"rule_action_count\"}},\"by_execution_status\":{\"terms\":{\"field\":\"alert.executionStatus.status\"}},\"by_notify_when\":{\"terms\":{\"field\":\"alert.notifyWhen\"}},\"connector_types_by_consumers\":{\"terms\":{\"field\":\"alert.consumer\"},\"aggs\":{\"actions\":{\"nested\":{\"path\":\"alert.actions\"},\"aggs\":{\"connector_types\":{\"terms\":{\"field\":\"alert.actions.actionTypeId\"}}}}}},\"by_search_type\":{\"terms\":{\"field\":\"alert.params.searchType\"}},\"sum_rules_with_tags\":{\"sum\":{\"field\":\"rule_with_tags\"}},\"sum_rules_snoozed\":{\"sum\":{\"field\":\"rule_snoozed\"}},\"sum_rules_muted\":{\"sum\":{\"field\":\"rule_muted\"}},\"sum_rules_with_muted_alerts\":{\"sum\":{\"field\":\"rule_with_muted_alerts\"}},\"sum_rules_with_linked_dashboards\":{\"sum\":{\"field\":\"rule_with_linked_dashboards\"}},\"sum_rules_with_investigation_guide\":{\"sum\":{\"field\":\"rule_with_investigation_guide\"}}}}}`
406412
);
407413
expect(loggerCalls.debug[1][0]).toMatchInlineSnapshot(`
408414
"Error executing alerting telemetry task: getTotalCountAggregations - ResponseError: search_phase_execution_exception
@@ -429,6 +435,8 @@ describe('kibana index telemetry', () => {
429435
warning: 0,
430436
},
431437
count_rules_with_tags: 0,
438+
count_rules_with_linked_dashboards: 0,
439+
count_rules_with_investigation_guide: 0,
432440
count_rules_by_notify_when: {
433441
on_action_group_change: 0,
434442
on_active_alert: 0,

x-pack/platform/plugins/shared/alerting/server/usage/lib/get_telemetry_from_kibana.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ type GetTotalCountsResults = Pick<
4747
| 'count_rules_snoozed'
4848
| 'count_rules_muted'
4949
| 'count_rules_with_muted_alerts'
50+
| 'count_rules_with_linked_dashboards'
51+
| 'count_rules_with_investigation_guide'
5052
| 'count_connector_types_by_consumers'
5153
| 'throttle_time'
5254
| 'schedule_time'
@@ -230,6 +232,34 @@ export async function getTotalCountAggregations({
230232
}`,
231233
},
232234
},
235+
rule_with_linked_dashboards: {
236+
type: 'long' as const,
237+
script: {
238+
source: `
239+
def rule = params._source['alert'];
240+
if (rule != null && rule.artifacts != null && rule.artifacts.dashboards != null) {
241+
if (rule.artifacts.dashboards.size() > 0) {
242+
emit(1);
243+
} else {
244+
emit(0);
245+
}
246+
}`,
247+
},
248+
},
249+
rule_with_investigation_guide: {
250+
type: 'long' as const,
251+
script: {
252+
source: `
253+
def rule = params._source['alert'];
254+
if (rule != null && rule.artifacts != null && rule.artifacts.investigation_guide != null && rule.artifacts.investigation_guide.blob != null) {
255+
if (rule.artifacts.investigation_guide.blob.trim() != '') {
256+
emit(1);
257+
} else {
258+
emit(0);
259+
}
260+
}`,
261+
},
262+
},
233263
},
234264
aggs: {
235265
by_rule_type_id: {
@@ -285,6 +315,8 @@ export async function getTotalCountAggregations({
285315
sum_rules_snoozed: { sum: { field: 'rule_snoozed' } },
286316
sum_rules_muted: { sum: { field: 'rule_muted' } },
287317
sum_rules_with_muted_alerts: { sum: { field: 'rule_with_muted_alerts' } },
318+
sum_rules_with_linked_dashboards: { sum: { field: 'rule_with_linked_dashboards' } },
319+
sum_rules_with_investigation_guide: { sum: { field: 'rule_with_investigation_guide' } },
288320
},
289321
},
290322
};
@@ -313,6 +345,8 @@ export async function getTotalCountAggregations({
313345
sum_rules_snoozed: AggregationsSingleMetricAggregateBase;
314346
sum_rules_muted: AggregationsSingleMetricAggregateBase;
315347
sum_rules_with_muted_alerts: AggregationsSingleMetricAggregateBase;
348+
sum_rules_with_linked_dashboards: AggregationsSingleMetricAggregateBase;
349+
sum_rules_with_investigation_guide: AggregationsSingleMetricAggregateBase;
316350
};
317351

318352
const totalRulesCount =
@@ -347,6 +381,9 @@ export async function getTotalCountAggregations({
347381
count_rules_snoozed: aggregations.sum_rules_snoozed.value ?? 0,
348382
count_rules_muted: aggregations.sum_rules_muted.value ?? 0,
349383
count_rules_with_muted_alerts: aggregations.sum_rules_with_muted_alerts.value ?? 0,
384+
count_rules_with_linked_dashboards: aggregations.sum_rules_with_linked_dashboards.value ?? 0,
385+
count_rules_with_investigation_guide:
386+
aggregations.sum_rules_with_investigation_guide.value ?? 0,
350387
count_connector_types_by_consumers: countConnectorTypesByConsumers,
351388
throttle_time: {
352389
min: `${aggregations.min_throttle_time.value ?? 0}s`,
@@ -392,6 +429,8 @@ export async function getTotalCountAggregations({
392429
count_rules_snoozed: 0,
393430
count_rules_muted: 0,
394431
count_rules_with_muted_alerts: 0,
432+
count_rules_with_linked_dashboards: 0,
433+
count_rules_with_investigation_guide: 0,
395434
count_connector_types_by_consumers: {},
396435
throttle_time: {
397436
min: '0s',

0 commit comments

Comments
 (0)