From e03d1e0014233f54e8c8c67e7c7ad6e56c84b2b0 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 5 Nov 2025 01:57:32 +0530 Subject: [PATCH 01/17] mongodb: Package alert rule template --- packages/mongodb/changelog.yml | 5 +++ .../ingest_pipeline/pipeline-json.yml | 5 +++ .../mongodb-cache-usage-high.json | 36 +++++++++++++++++++ .../mongodb-connection-usage-high.json | 36 +++++++++++++++++++ .../mongodb-oplog-headroom-critical.json | 36 +++++++++++++++++++ .../mongodb-replica-member-down.json | 36 +++++++++++++++++++ .../mongodb-replica-members-rollback.json | 36 +++++++++++++++++++ .../mongodb-replication-lag-high.json | 36 +++++++++++++++++++ .../mongodb-unhealthy-replica-members.json | 36 +++++++++++++++++++ .../mongodb-write-tickets-low.json | 36 +++++++++++++++++++ packages/mongodb/manifest.yml | 4 +-- 11 files changed, 300 insertions(+), 2 deletions(-) create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json create mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json diff --git a/packages/mongodb/changelog.yml b/packages/mongodb/changelog.yml index dfdaa14bd09..e89fbd281f5 100644 --- a/packages/mongodb/changelog.yml +++ b/packages/mongodb/changelog.yml @@ -1,3 +1,8 @@ +- version: "1.23.0" + changes: + - description: Package Alerting Rule Template. + type: enhancement + link: https://github.com/elastic/integrations/pull/99999 - version: "1.22.0" changes: - description: Allow @custom pipeline access to event.original without setting preserve_original_event. diff --git a/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml b/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml index 579ca7d604e..0a81c14d63f 100644 --- a/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml +++ b/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml @@ -49,6 +49,11 @@ processors: - mongodb.log.truncated - mongodb.log.size ignore_missing: true +- remove: + field: message + ignore_missing: true + if: 'ctx.event?.original != null' + description: 'The `message` field is no longer required if the document has an `event.original` field.' on_failure: - set: field: error.message diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json new file mode 100644 index 00000000000..394ec6eac5a --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-cache-usage-high", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Resources] WiredTiger cache pressure", + "tags": ["MongoDB", "Resources"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.status-default\n| STATS cache_used = AVG(`mongodb.status.wired_tiger.cache.used.bytes`),\n cache_max = AVG(`mongodb.status.wired_tiger.cache.maximum.bytes`) BY `service.address`\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json new file mode 100644 index 00000000000..587a8e971ef --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-connection-usage-high", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Availability] High connection usage", + "tags": ["MongoDB", "Availability"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.status-default\n| STATS current_conn = AVG(`mongodb.status.connections.current`),\n available_conn = AVG(`mongodb.status.connections.available`) BY `service.address`\n| EVAL connection_usage_pct = (current_conn / (current_conn + available_conn)) * 100\n| WHERE connection_usage_pct > 80" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json new file mode 100644 index 00000000000..a93e532adf2 --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-oplog-headroom-critical", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Oplog headroom critically low", + "tags": ["MongoDB", "Replication"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS oplog_headroom_min = MIN(`mongodb.replstatus.headroom.min`) BY `mongodb.replstatus.set_name`\n| WHERE oplog_headroom_min < 3600000" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json new file mode 100644 index 00000000000..e412dacbe54 --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-replica-member-down", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Replica member down", + "tags": ["MongoDB", "Replication"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS members_down = MAX(`mongodb.replstatus.members.down.count`) BY `mongodb.replstatus.set_name`, `service.address`\n| WHERE members_down > 0" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json new file mode 100644 index 00000000000..000d5a14674 --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-replica-members-rollback", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Members in rollback state", + "tags": ["MongoDB", "Replication"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS rollback_members = MAX(`mongodb.replstatus.members.rollback.count`) BY `mongodb.replstatus.set_name`\n| WHERE rollback_members > 0" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json new file mode 100644 index 00000000000..2a1c27a3e05 --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-replication-lag-high", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] High replication lag", + "tags": ["MongoDB", "Replication"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS replication_lag = MAX(`mongodb.replstatus.lag.max`) BY `mongodb.replstatus.set_name`\n| WHERE replication_lag > 10000" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json new file mode 100644 index 00000000000..37a609e9af2 --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-unhealthy-replica-members", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Unhealthy replica members", + "tags": ["MongoDB", "Replication"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS unhealthy_members = MAX(`mongodb.replstatus.members.unhealthy.count`) BY `mongodb.replstatus.set_name`\n| WHERE unhealthy_members > 0" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json new file mode 100644 index 00000000000..4ef242d6d1e --- /dev/null +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json @@ -0,0 +1,36 @@ +{ + "id": "mongodb-write-tickets-low", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Performance] Low write tickets available", + "tags": ["MongoDB", "Performance"], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "threshold": [0], + "thresholdComparator": ">", + "size": 100, + "esqlQuery": { + "esql": "FROM metrics-mongodb.status-default\n| STATS write_tickets_available = AVG(`mongodb.status.wired_tiger.concurrent_transactions.write.available`) BY `service.address`\n| WHERE write_tickets_available < 10" + }, + "aggType": "count", + "groupBy": "row", + "termSize": 5, + "sourceFields": [], + "timeField": "@timestamp", + "excludeHitsFromPreviousRun": true + }, + "alertDelay": { + "active": 1 + } + }, + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" +} + diff --git a/packages/mongodb/manifest.yml b/packages/mongodb/manifest.yml index 5f404a85eaf..b92e24c6352 100644 --- a/packages/mongodb/manifest.yml +++ b/packages/mongodb/manifest.yml @@ -1,6 +1,6 @@ name: mongodb title: MongoDB -version: "1.22.0" +version: "1.23.0" description: Collect logs and metrics from MongoDB instances with Elastic Agent. type: integration categories: @@ -11,7 +11,7 @@ icons: title: logo mongodb size: 32x32 type: image/svg+xml -format_version: "3.0.2" +format_version: "3.5.0" conditions: kibana: version: "^8.13.0 || ^9.0.0" From 587cafe703fab8e8c8ea97a5a5bfff602d43efc3 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 11 Nov 2025 15:51:07 +0530 Subject: [PATCH 02/17] Do cleanup --- .../mongodb-cache-usage-high.json | 61 +++++++++---------- .../mongodb-connection-usage-high.json | 61 +++++++++---------- .../mongodb-oplog-headroom-critical.json | 61 +++++++++---------- .../mongodb-replica-member-down.json | 61 +++++++++---------- .../mongodb-replica-members-rollback.json | 61 +++++++++---------- .../mongodb-replication-lag-high.json | 61 +++++++++---------- .../mongodb-unhealthy-replica-members.json | 61 +++++++++---------- .../mongodb-write-tickets-low.json | 61 +++++++++---------- 8 files changed, 232 insertions(+), 256 deletions(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json index 394ec6eac5a..26a31545f1f 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json @@ -1,36 +1,33 @@ { - "id": "mongodb-cache-usage-high", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Resources] WiredTiger cache pressure", - "tags": ["MongoDB", "Resources"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-cache-usage-high", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Resources] WiredTiger cache pressure", + "tags": [ + "MongoDB", + "Resources" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.status-default\n| STATS cache_used = AVG(`mongodb.status.wired_tiger.cache.used.bytes`),\n cache_max = AVG(`mongodb.status.wired_tiger.cache.maximum.bytes`) BY `service.address`\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| STATS cache_used = AVG(`mongodb.status.wired_tiger.cache.used.bytes`),\n cache_max = AVG(`mongodb.status.wired_tiger.cache.maximum.bytes`) BY `service.address`\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json index 587a8e971ef..f13feb39327 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json @@ -1,36 +1,33 @@ { - "id": "mongodb-connection-usage-high", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Availability] High connection usage", - "tags": ["MongoDB", "Availability"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-connection-usage-high", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Availability] High connection usage", + "tags": [ + "MongoDB", + "Availability" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.status-default\n| STATS current_conn = AVG(`mongodb.status.connections.current`),\n available_conn = AVG(`mongodb.status.connections.available`) BY `service.address`\n| EVAL connection_usage_pct = (current_conn / (current_conn + available_conn)) * 100\n| WHERE connection_usage_pct > 80" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| STATS current_conn = AVG(`mongodb.status.connections.current`),\n available_conn = AVG(`mongodb.status.connections.available`) BY `service.address`\n| EVAL connection_usage_pct = (current_conn / (current_conn + available_conn)) * 100\n| WHERE connection_usage_pct > 80" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index a93e532adf2..f395d80d11f 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -1,36 +1,33 @@ { - "id": "mongodb-oplog-headroom-critical", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Replication] Oplog headroom critically low", - "tags": ["MongoDB", "Replication"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-oplog-headroom-critical", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Oplog headroom critically low", + "tags": [ + "MongoDB", + "Replication" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS oplog_headroom_min = MIN(`mongodb.replstatus.headroom.min`) BY `mongodb.replstatus.set_name`\n| WHERE oplog_headroom_min < 3600000" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS oplog_headroom_min = MIN(`mongodb.replstatus.headroom.min`) BY `mongodb.replstatus.set_name`\n| WHERE oplog_headroom_min < 3600000" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json index e412dacbe54..e68d2843166 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -1,36 +1,33 @@ { - "id": "mongodb-replica-member-down", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Replication] Replica member down", - "tags": ["MongoDB", "Replication"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-replica-member-down", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Replica member down", + "tags": [ + "MongoDB", + "Replication" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS members_down = MAX(`mongodb.replstatus.members.down.count`) BY `mongodb.replstatus.set_name`, `service.address`\n| WHERE members_down > 0" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS members_down = MAX(`mongodb.replstatus.members.down.count`) BY `mongodb.replstatus.set_name`, `service.address`\n| WHERE members_down > 0" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json index 000d5a14674..c74f568902a 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json @@ -1,36 +1,33 @@ { - "id": "mongodb-replica-members-rollback", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Replication] Members in rollback state", - "tags": ["MongoDB", "Replication"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-replica-members-rollback", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Members in rollback state", + "tags": [ + "MongoDB", + "Replication" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS rollback_members = MAX(`mongodb.replstatus.members.rollback.count`) BY `mongodb.replstatus.set_name`\n| WHERE rollback_members > 0" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS rollback_members = MAX(`mongodb.replstatus.members.rollback.count`) BY `mongodb.replstatus.set_name`\n| WHERE rollback_members > 0" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index 2a1c27a3e05..c6a2e34f05a 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -1,36 +1,33 @@ { - "id": "mongodb-replication-lag-high", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Replication] High replication lag", - "tags": ["MongoDB", "Replication"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-replication-lag-high", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] High replication lag", + "tags": [ + "MongoDB", + "Replication" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS replication_lag = MAX(`mongodb.replstatus.lag.max`) BY `mongodb.replstatus.set_name`\n| WHERE replication_lag > 10000" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS replication_lag = MAX(`mongodb.replstatus.lag.max`) BY `mongodb.replstatus.set_name`\n| WHERE replication_lag > 10000" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json index 37a609e9af2..ae32d39934d 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -1,36 +1,33 @@ { - "id": "mongodb-unhealthy-replica-members", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Replication] Unhealthy replica members", - "tags": ["MongoDB", "Replication"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-unhealthy-replica-members", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Replication] Unhealthy replica members", + "tags": [ + "MongoDB", + "Replication" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.replstatus-default\n| STATS unhealthy_members = MAX(`mongodb.replstatus.members.unhealthy.count`) BY `mongodb.replstatus.set_name`\n| WHERE unhealthy_members > 0" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS unhealthy_members = MAX(`mongodb.replstatus.members.unhealthy.count`) BY `mongodb.replstatus.set_name`\n| WHERE unhealthy_members > 0" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json index 4ef242d6d1e..589b3303b3f 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json @@ -1,36 +1,33 @@ { - "id": "mongodb-write-tickets-low", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Performance] Low write tickets available", - "tags": ["MongoDB", "Performance"], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" + "id": "mongodb-write-tickets-low", + "type": "alerting_rule_template", + "attributes": { + "name": "[MongoDB Performance] Low write tickets available", + "tags": [ + "MongoDB", + "Performance" + ], + "ruleTypeId": ".es-query", + "schedule": { + "interval": "1m" + }, + "params": { + "searchType": "esqlQuery", + "timeWindowSize": 5, + "timeWindowUnit": "m", + "esqlQuery": { + "esql": "FROM metrics-mongodb.status-default\n| STATS write_tickets_available = AVG(`mongodb.status.wired_tiger.concurrent_transactions.write.available`) BY `service.address`\n| WHERE write_tickets_available < 10" + }, + "groupBy": "row", + "termSize": 5, + "timeField": "@timestamp" + }, + "alertDelay": { + "active": 1 + } }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "threshold": [0], - "thresholdComparator": ">", - "size": 100, - "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| STATS write_tickets_available = AVG(`mongodb.status.wired_tiger.concurrent_transactions.write.available`) BY `service.address`\n| WHERE write_tickets_available < 10" - }, - "aggType": "count", - "groupBy": "row", - "termSize": 5, - "sourceFields": [], - "timeField": "@timestamp", - "excludeHitsFromPreviousRun": true - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" + "managed": true, + "coreMigrationVersion": "8.8.0", + "typeMigrationVersion": "10.1.0" } From 7581797953adc00a972c6f00ace3ffffcf529635 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 11 Nov 2025 15:51:47 +0530 Subject: [PATCH 03/17] Fix PR num --- packages/mongodb/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/changelog.yml b/packages/mongodb/changelog.yml index e89fbd281f5..841444e3f21 100644 --- a/packages/mongodb/changelog.yml +++ b/packages/mongodb/changelog.yml @@ -2,7 +2,7 @@ changes: - description: Package Alerting Rule Template. type: enhancement - link: https://github.com/elastic/integrations/pull/99999 + link: https://github.com/elastic/integrations/pull/15866 - version: "1.22.0" changes: - description: Allow @custom pipeline access to event.original without setting preserve_original_event. From 30ca7d1cdbf4a8ac20d6071b0ac208b74a3e19b0 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 11 Nov 2025 18:12:41 +0530 Subject: [PATCH 04/17] More changes --- .../mongodb-cache-usage-high.json | 2 +- .../mongodb-connection-usage-high.json | 2 +- .../mongodb-oplog-headroom-critical.json | 2 +- .../mongodb-replica-member-down.json | 2 +- .../mongodb-replica-members-rollback.json | 33 ------------------- .../mongodb-replication-lag-high.json | 2 +- .../mongodb-unhealthy-replica-members.json | 2 +- .../mongodb-write-tickets-low.json | 33 ------------------- 8 files changed, 6 insertions(+), 72 deletions(-) delete mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json delete mode 100644 packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json index 26a31545f1f..f0a3d4f3041 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json @@ -16,7 +16,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| STATS cache_used = AVG(`mongodb.status.wired_tiger.cache.used.bytes`),\n cache_max = AVG(`mongodb.status.wired_tiger.cache.maximum.bytes`) BY `service.address`\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" + "esql": "FROM metrics-mongodb.status-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS cache_used=AVG(mongodb.status.wired_tiger.cache.used.bytes),\n cache_max=AVG(mongodb.status.wired_tiger.cache.maximum.bytes) BY service.address\n| WHERE cache_max > 0\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json index f13feb39327..30775ca3968 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json @@ -16,7 +16,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| STATS current_conn = AVG(`mongodb.status.connections.current`),\n available_conn = AVG(`mongodb.status.connections.available`) BY `service.address`\n| EVAL connection_usage_pct = (current_conn / (current_conn + available_conn)) * 100\n| WHERE connection_usage_pct > 80" + "esql": "FROM metrics-mongodb.status-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS current_conn=AVG(mongodb.status.connections.current),\n available_conn=AVG(mongodb.status.connections.available) BY service.address\n| EVAL total_conn = current_conn + available_conn\n| WHERE total_conn > 0\n| EVAL connection_usage_pct = (current_conn / total_conn) * 100\n| WHERE connection_usage_pct > 80" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index f395d80d11f..5c043f017c7 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -16,7 +16,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS oplog_headroom_min = MIN(`mongodb.replstatus.headroom.min`) BY `mongodb.replstatus.set_name`\n| WHERE oplog_headroom_min < 3600000" + "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY mongodb.replstatus.set_name\n| WHERE oplog_headroom_min < 900000" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json index e68d2843166..a793854c50f 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -16,7 +16,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS members_down = MAX(`mongodb.replstatus.members.down.count`) BY `mongodb.replstatus.set_name`, `service.address`\n| WHERE members_down > 0" + "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY mongodb.replstatus.set_name\n| WHERE members_down > 0" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json deleted file mode 100644 index c74f568902a..00000000000 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-members-rollback.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "id": "mongodb-replica-members-rollback", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Replication] Members in rollback state", - "tags": [ - "MongoDB", - "Replication" - ], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" - }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS rollback_members = MAX(`mongodb.replstatus.members.rollback.count`) BY `mongodb.replstatus.set_name`\n| WHERE rollback_members > 0" - }, - "groupBy": "row", - "termSize": 5, - "timeField": "@timestamp" - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" -} - diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index c6a2e34f05a..7c62e04b017 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -16,7 +16,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS replication_lag = MAX(`mongodb.replstatus.lag.max`) BY `mongodb.replstatus.set_name`\n| WHERE replication_lag > 10000" + "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json index ae32d39934d..6c33e19dca8 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -16,7 +16,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| STATS unhealthy_members = MAX(`mongodb.replstatus.members.unhealthy.count`) BY `mongodb.replstatus.set_name`\n| WHERE unhealthy_members > 0" + "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json deleted file mode 100644 index 589b3303b3f..00000000000 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-write-tickets-low.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "id": "mongodb-write-tickets-low", - "type": "alerting_rule_template", - "attributes": { - "name": "[MongoDB Performance] Low write tickets available", - "tags": [ - "MongoDB", - "Performance" - ], - "ruleTypeId": ".es-query", - "schedule": { - "interval": "1m" - }, - "params": { - "searchType": "esqlQuery", - "timeWindowSize": 5, - "timeWindowUnit": "m", - "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| STATS write_tickets_available = AVG(`mongodb.status.wired_tiger.concurrent_transactions.write.available`) BY `service.address`\n| WHERE write_tickets_available < 10" - }, - "groupBy": "row", - "termSize": 5, - "timeField": "@timestamp" - }, - "alertDelay": { - "active": 1 - } - }, - "managed": true, - "coreMigrationVersion": "8.8.0", - "typeMigrationVersion": "10.1.0" -} - From bfbd589406be3af662c1064504f15894fddd0763 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Mon, 17 Nov 2025 14:15:08 +0530 Subject: [PATCH 05/17] Apply suggestion from @shmsr --- packages/mongodb/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/manifest.yml b/packages/mongodb/manifest.yml index b92e24c6352..7abf6ba5a86 100644 --- a/packages/mongodb/manifest.yml +++ b/packages/mongodb/manifest.yml @@ -11,7 +11,7 @@ icons: title: logo mongodb size: 32x32 type: image/svg+xml -format_version: "3.5.0" +format_version: "3.4.0" conditions: kibana: version: "^8.13.0 || ^9.0.0" From 499ef61b45d230b4e1e4a77d0c68e2e0f097a413 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Mon, 17 Nov 2025 15:45:28 +0530 Subject: [PATCH 06/17] Address review comments --- .../alerting_rule_template/mongodb-cache-usage-high.json | 6 ++---- .../mongodb-connection-usage-high.json | 6 ++---- .../mongodb-oplog-headroom-critical.json | 6 ++---- .../alerting_rule_template/mongodb-replica-member-down.json | 6 ++---- .../mongodb-replication-lag-high.json | 6 ++---- .../mongodb-unhealthy-replica-members.json | 6 ++---- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json index f0a3d4f3041..9f7ad0ad553 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json @@ -4,8 +4,7 @@ "attributes": { "name": "[MongoDB Resources] WiredTiger cache pressure", "tags": [ - "MongoDB", - "Resources" + "MongoDB" ], "ruleTypeId": ".es-query", "schedule": { @@ -16,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS cache_used=AVG(mongodb.status.wired_tiger.cache.used.bytes),\n cache_max=AVG(mongodb.status.wired_tiger.cache.maximum.bytes) BY service.address\n| WHERE cache_max > 0\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" + "esql": "// Alert when WiredTiger cache utilization exceeds 85% over 5 minutes.\n// Aggregates per instance (service.address) using averaged cache stats.\nFROM metrics-mongodb.status-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS cache_used=AVG(mongodb.status.wired_tiger.cache.used.bytes),\n cache_max=AVG(mongodb.status.wired_tiger.cache.maximum.bytes) BY service.address\n| WHERE cache_max > 0\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" }, "groupBy": "row", "termSize": 5, @@ -30,4 +29,3 @@ "coreMigrationVersion": "8.8.0", "typeMigrationVersion": "10.1.0" } - diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json index 30775ca3968..0cb724e1511 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json @@ -4,8 +4,7 @@ "attributes": { "name": "[MongoDB Availability] High connection usage", "tags": [ - "MongoDB", - "Availability" + "MongoDB" ], "ruleTypeId": ".es-query", "schedule": { @@ -16,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.status-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS current_conn=AVG(mongodb.status.connections.current),\n available_conn=AVG(mongodb.status.connections.available) BY service.address\n| EVAL total_conn = current_conn + available_conn\n| WHERE total_conn > 0\n| EVAL connection_usage_pct = (current_conn / total_conn) * 100\n| WHERE connection_usage_pct > 80" + "esql": "// Alert when current connections exceed 80% of total available capacity.\n// Aggregates average current/available connections per service.address.\nFROM metrics-mongodb.status-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS current_conn=AVG(mongodb.status.connections.current),\n available_conn=AVG(mongodb.status.connections.available) BY service.address\n| EVAL total_conn = current_conn + available_conn\n| WHERE total_conn > 0\n| EVAL connection_usage_pct = (current_conn / total_conn) * 100\n| WHERE connection_usage_pct > 80" }, "groupBy": "row", "termSize": 5, @@ -30,4 +29,3 @@ "coreMigrationVersion": "8.8.0", "typeMigrationVersion": "10.1.0" } - diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index 5c043f017c7..0dde11f455a 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -4,8 +4,7 @@ "attributes": { "name": "[MongoDB Replication] Oplog headroom critically low", "tags": [ - "MongoDB", - "Replication" + "MongoDB" ], "ruleTypeId": ".es-query", "schedule": { @@ -16,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY mongodb.replstatus.set_name\n| WHERE oplog_headroom_min < 900000" + "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by namespace + set name.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE NOT IS_NULL(oplog_headroom_min)\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" }, "groupBy": "row", "termSize": 5, @@ -30,4 +29,3 @@ "coreMigrationVersion": "8.8.0", "typeMigrationVersion": "10.1.0" } - diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json index a793854c50f..8a2df0ae0ff 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -4,8 +4,7 @@ "attributes": { "name": "[MongoDB Replication] Replica member down", "tags": [ - "MongoDB", - "Replication" + "MongoDB" ], "ruleTypeId": ".es-query", "schedule": { @@ -16,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY mongodb.replstatus.set_name\n| WHERE members_down > 0" + "esql": "// Alert when replica sets report members in the down state within 5 minutes.\n// Groups by data_stream.namespace and set name to isolate environments.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE members_down > 0" }, "groupBy": "row", "termSize": 5, @@ -30,4 +29,3 @@ "coreMigrationVersion": "8.8.0", "typeMigrationVersion": "10.1.0" } - diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index 7c62e04b017..410d2c070b1 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -4,8 +4,7 @@ "attributes": { "name": "[MongoDB Replication] High replication lag", "tags": [ - "MongoDB", - "Replication" + "MongoDB" ], "ruleTypeId": ".es-query", "schedule": { @@ -16,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" + "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per data_stream.namespace and replica set name.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" }, "groupBy": "row", "termSize": 5, @@ -30,4 +29,3 @@ "coreMigrationVersion": "8.8.0", "typeMigrationVersion": "10.1.0" } - diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json index 6c33e19dca8..513238bd65e 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -4,8 +4,7 @@ "attributes": { "name": "[MongoDB Replication] Unhealthy replica members", "tags": [ - "MongoDB", - "Replication" + "MongoDB" ], "ruleTypeId": ".es-query", "schedule": { @@ -16,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "FROM metrics-mongodb.replstatus-default\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" + "esql": "// Alert when replica sets report unhealthy members during the window.\n// Groups by data_stream.namespace and set name for clarity.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" }, "groupBy": "row", "termSize": 5, @@ -30,4 +29,3 @@ "coreMigrationVersion": "8.8.0", "typeMigrationVersion": "10.1.0" } - From 5b443c4045c663cc0aefe3e83890a92b8e0a4763 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 18 Nov 2025 02:44:13 +0530 Subject: [PATCH 07/17] Apply suggestion from @shmsr --- packages/mongodb/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/changelog.yml b/packages/mongodb/changelog.yml index 841444e3f21..d6eb2cc2648 100644 --- a/packages/mongodb/changelog.yml +++ b/packages/mongodb/changelog.yml @@ -1,6 +1,6 @@ - version: "1.23.0" changes: - - description: Package Alerting Rule Template. + - description: Add alerting rule templates. type: enhancement link: https://github.com/elastic/integrations/pull/15866 - version: "1.22.0" From 2e82aedace276a202ba9c293379ce847abb50a51 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 18 Nov 2025 02:46:54 +0530 Subject: [PATCH 08/17] Apply suggestion from @shmsr --- packages/mongodb/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/manifest.yml b/packages/mongodb/manifest.yml index 7abf6ba5a86..d2d018605be 100644 --- a/packages/mongodb/manifest.yml +++ b/packages/mongodb/manifest.yml @@ -14,7 +14,7 @@ icons: format_version: "3.4.0" conditions: kibana: - version: "^8.13.0 || ^9.0.0" + version: "^8.19.0 || ^9.1.0" elastic: subscription: basic screenshots: From 3774784e566fdbba1ffbd1678d35db32ae4aad24 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 18 Nov 2025 03:10:22 +0530 Subject: [PATCH 09/17] Address review comments --- .../kibana/alerting_rule_template/mongodb-cache-usage-high.json | 2 +- .../alerting_rule_template/mongodb-connection-usage-high.json | 2 +- .../alerting_rule_template/mongodb-oplog-headroom-critical.json | 2 +- .../alerting_rule_template/mongodb-replica-member-down.json | 2 +- .../alerting_rule_template/mongodb-replication-lag-high.json | 2 +- .../mongodb-unhealthy-replica-members.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json index 9f7ad0ad553..8b96c8f382d 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when WiredTiger cache utilization exceeds 85% over 5 minutes.\n// Aggregates per instance (service.address) using averaged cache stats.\nFROM metrics-mongodb.status-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS cache_used=AVG(mongodb.status.wired_tiger.cache.used.bytes),\n cache_max=AVG(mongodb.status.wired_tiger.cache.maximum.bytes) BY service.address\n| WHERE cache_max > 0\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" + "esql": "// Alert when WiredTiger cache utilization exceeds 85% over the configured time window.\n// Aggregates per instance (service.address) using averaged cache stats.\nFROM metrics-mongodb.status-*\n| STATS cache_used=AVG(mongodb.status.wired_tiger.cache.used.bytes),\n cache_max=AVG(mongodb.status.wired_tiger.cache.maximum.bytes) BY service.address\n| WHERE cache_max > 0\n| EVAL cache_usage_pct = (cache_used / cache_max) * 100\n| WHERE cache_usage_pct > 85" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json index 0cb724e1511..6be4812b5eb 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-connection-usage-high.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when current connections exceed 80% of total available capacity.\n// Aggregates average current/available connections per service.address.\nFROM metrics-mongodb.status-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS current_conn=AVG(mongodb.status.connections.current),\n available_conn=AVG(mongodb.status.connections.available) BY service.address\n| EVAL total_conn = current_conn + available_conn\n| WHERE total_conn > 0\n| EVAL connection_usage_pct = (current_conn / total_conn) * 100\n| WHERE connection_usage_pct > 80" + "esql": "// Alert when current connections exceed 80% of total available capacity.\n// Aggregates average current/available connections per service.address.\nFROM metrics-mongodb.status-*\n| STATS current_conn=AVG(mongodb.status.connections.current),\n available_conn=AVG(mongodb.status.connections.available) BY service.address\n| EVAL total_conn = current_conn + available_conn\n| WHERE total_conn > 0\n| EVAL connection_usage_pct = (current_conn / total_conn) * 100\n| WHERE connection_usage_pct > 80" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index 0dde11f455a..d1e3e7c5a7f 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by namespace + set name.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE NOT IS_NULL(oplog_headroom_min)\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" + "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by namespace + set name.\nFROM metrics-mongodb.replstatus-*\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE NOT IS_NULL(oplog_headroom_min)\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json index 8a2df0ae0ff..80ff12c5822 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when replica sets report members in the down state within 5 minutes.\n// Groups by data_stream.namespace and set name to isolate environments.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE members_down > 0" + "esql": "// Alert when replica sets report members in the down state within the configured time window.\n// Groups by data_stream.namespace and set name to isolate environments.\nFROM metrics-mongodb.replstatus-*\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE members_down > 0" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index 410d2c070b1..802a2938d97 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per data_stream.namespace and replica set name.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" + "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per data_stream.namespace and replica set name.\nFROM metrics-mongodb.replstatus-*\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json index 513238bd65e..f3358db7351 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when replica sets report unhealthy members during the window.\n// Groups by data_stream.namespace and set name for clarity.\nFROM metrics-mongodb.replstatus-*\n| WHERE @timestamp >= NOW() - 5 MINUTES\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" + "esql": "// Alert when replica sets report unhealthy members during the window.\n// Groups by data_stream.namespace and set name for clarity.\nFROM metrics-mongodb.replstatus-*\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" }, "groupBy": "row", "termSize": 5, From e57411e8fcec518bca81cf854628146f7eb38ed8 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 18 Nov 2025 15:49:32 +0530 Subject: [PATCH 10/17] Fix query --- .../alerting_rule_template/mongodb-oplog-headroom-critical.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index d1e3e7c5a7f..c6c4f1d2e89 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by namespace + set name.\nFROM metrics-mongodb.replstatus-*\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE NOT IS_NULL(oplog_headroom_min)\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" + "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by namespace + set name.\nFROM metrics-mongodb.replstatus-*\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE oplog_headroom_min IS NOT NULL\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" }, "groupBy": "row", "termSize": 5, From d992b31fc7fb54905f462eadefb157ae9e9131b2 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 19 Nov 2025 12:24:50 +0530 Subject: [PATCH 11/17] Address review comments --- .../alerting_rule_template/mongodb-oplog-headroom-critical.json | 2 +- .../alerting_rule_template/mongodb-replica-member-down.json | 2 +- .../alerting_rule_template/mongodb-replication-lag-high.json | 2 +- .../mongodb-unhealthy-replica-members.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index c6c4f1d2e89..158d672aa22 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by namespace + set name.\nFROM metrics-mongodb.replstatus-*\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE oplog_headroom_min IS NOT NULL\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" + "esql": "// Alert when oplog headroom drops below 15 minutes, risking replication stalls.\n// Guards against negative values and groups by replica set name.\nFROM metrics-mongodb.replstatus-*\n| STATS oplog_headroom_min=MIN(mongodb.replstatus.headroom.min) BY mongodb.replstatus.set_name\n| WHERE oplog_headroom_min IS NOT NULL\n| EVAL oplog_headroom_min = CASE(oplog_headroom_min >= 0, oplog_headroom_min, 0)\n| EVAL oplog_headroom_minutes = TO_DOUBLE(oplog_headroom_min) / 60.0\n| WHERE oplog_headroom_minutes < 15" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json index 80ff12c5822..aeb88f2f3b3 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when replica sets report members in the down state within the configured time window.\n// Groups by data_stream.namespace and set name to isolate environments.\nFROM metrics-mongodb.replstatus-*\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE members_down > 0" + "esql": "// Alert when replica sets report members in the down state within the configured time window.\n// Groups by replica set name to isolate environments.\nFROM metrics-mongodb.replstatus-*\n| STATS members_down=MAX(mongodb.replstatus.members.down.count) BY mongodb.replstatus.set_name\n| WHERE members_down > 0" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index 802a2938d97..ca1dae6a2a0 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per data_stream.namespace and replica set name.\nFROM metrics-mongodb.replstatus-*\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" + "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per replica set name.\nFROM metrics-mongodb.replstatus-*\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" }, "groupBy": "row", "termSize": 5, diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json index f3358db7351..8d225afebf6 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when replica sets report unhealthy members during the window.\n// Groups by data_stream.namespace and set name for clarity.\nFROM metrics-mongodb.replstatus-*\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY data_stream.namespace, mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" + "esql": "// Alert when replica sets report unhealthy members during the window.\n// Groups by replica set name for clarity.\nFROM metrics-mongodb.replstatus-*\n| STATS unhealthy_members=MAX(mongodb.replstatus.members.unhealthy.count) BY mongodb.replstatus.set_name\n| WHERE unhealthy_members > 0" }, "groupBy": "row", "termSize": 5, From 05adc0175028a5585d02087da1953329a4ba592a Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 19 Nov 2025 13:21:34 +0530 Subject: [PATCH 12/17] Address review comments --- .../alerting_rule_template/mongodb-replication-lag-high.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index ca1dae6a2a0..f1379917c4f 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -15,7 +15,7 @@ "timeWindowSize": 5, "timeWindowUnit": "m", "esqlQuery": { - "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per replica set name.\nFROM metrics-mongodb.replstatus-*\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY mongodb.replstatus.set_name\n| WHERE replication_lag > 10000" + "esql": "// Alert when maximum replication lag exceeds 10 seconds for any replica set.\n// Aggregates per replica set name.\nFROM metrics-mongodb.replstatus-*\n| STATS replication_lag=MAX(mongodb.replstatus.lag.max) BY mongodb.replstatus.set_name\n| WHERE replication_lag > 10" }, "groupBy": "row", "termSize": 5, From bb16f0c0f18f717ea9fa586d3b330021d080e5d9 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 26 Nov 2025 14:56:33 +0530 Subject: [PATCH 13/17] elastic-package test pipeline -v -g --- .../test-mongodb-debian.log-expected.json | 76 +++++++++---------- ...est-mongodb-ubuntu-4-4-4.log-expected.json | 23 ++---- 2 files changed, 46 insertions(+), 53 deletions(-) diff --git a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json index b30173e9596..09587e24cc3 100644 --- a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json +++ b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json @@ -10,7 +10,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.843956667Z", + "ingested": "2025-11-26T09:25:48.144189542Z", "kind": "event", "type": [ "info" @@ -40,7 +40,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844020640Z", + "ingested": "2025-11-26T09:25:48.144200625Z", "kind": "event", "type": [ "info" @@ -70,7 +70,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844034677Z", + "ingested": "2025-11-26T09:25:48.144202167Z", "kind": "event", "type": [ "info" @@ -100,7 +100,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844037803Z", + "ingested": "2025-11-26T09:25:48.144203333Z", "kind": "event", "type": [ "info" @@ -130,7 +130,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844040422Z", + "ingested": "2025-11-26T09:25:48.144204375Z", "kind": "event", "type": [ "info" @@ -160,7 +160,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844042978Z", + "ingested": "2025-11-26T09:25:48.144205375Z", "kind": "event", "type": [ "info" @@ -190,7 +190,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844067437Z", + "ingested": "2025-11-26T09:25:48.144206375Z", "kind": "event", "type": [ "info" @@ -220,7 +220,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844070934Z", + "ingested": "2025-11-26T09:25:48.144207333Z", "kind": "event", "type": [ "info" @@ -250,7 +250,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844073549Z", + "ingested": "2025-11-26T09:25:48.144208333Z", "kind": "event", "type": [ "info" @@ -280,7 +280,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844076091Z", + "ingested": "2025-11-26T09:25:48.144209292Z", "kind": "event", "type": [ "info" @@ -310,7 +310,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844078655Z", + "ingested": "2025-11-26T09:25:48.144210292Z", "kind": "event", "type": [ "info" @@ -340,7 +340,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844081569Z", + "ingested": "2025-11-26T09:25:48.144211333Z", "kind": "event", "type": [ "info" @@ -370,7 +370,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844086992Z", + "ingested": "2025-11-26T09:25:48.144212292Z", "kind": "event", "type": [ "info" @@ -400,7 +400,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844089585Z", + "ingested": "2025-11-26T09:25:48.144213292Z", "kind": "event", "type": [ "info" @@ -430,7 +430,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844092100Z", + "ingested": "2025-11-26T09:25:48.144214250Z", "kind": "event", "type": [ "info" @@ -460,7 +460,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844094947Z", + "ingested": "2025-11-26T09:25:48.144215208Z", "kind": "event", "type": [ "info" @@ -490,7 +490,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844097631Z", + "ingested": "2025-11-26T09:25:48.144216250Z", "kind": "event", "type": [ "info" @@ -520,7 +520,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844100240Z", + "ingested": "2025-11-26T09:25:48.144217208Z", "kind": "event", "type": [ "info" @@ -550,7 +550,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844102764Z", + "ingested": "2025-11-26T09:25:48.144218167Z", "kind": "event", "type": [ "info" @@ -580,7 +580,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844105295Z", + "ingested": "2025-11-26T09:25:48.144219542Z", "kind": "event", "type": [ "info" @@ -610,7 +610,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844107826Z", + "ingested": "2025-11-26T09:25:48.144220542Z", "kind": "event", "type": [ "info" @@ -640,7 +640,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844110352Z", + "ingested": "2025-11-26T09:25:48.144221458Z", "kind": "event", "type": [ "info" @@ -670,7 +670,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844112893Z", + "ingested": "2025-11-26T09:25:48.144222417Z", "kind": "event", "type": [ "info" @@ -700,7 +700,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844115601Z", + "ingested": "2025-11-26T09:25:48.144223458Z", "kind": "event", "type": [ "info" @@ -730,7 +730,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844118101Z", + "ingested": "2025-11-26T09:25:48.144224417Z", "kind": "event", "type": [ "info" @@ -760,7 +760,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844120657Z", + "ingested": "2025-11-26T09:25:48.144225375Z", "kind": "event", "type": [ "info" @@ -790,7 +790,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844123218Z", + "ingested": "2025-11-26T09:25:48.144226292Z", "kind": "event", "type": [ "info" @@ -820,7 +820,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844125756Z", + "ingested": "2025-11-26T09:25:48.144227250Z", "kind": "event", "type": [ "info" @@ -850,7 +850,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844128304Z", + "ingested": "2025-11-26T09:25:48.144228208Z", "kind": "event", "type": [ "info" @@ -880,7 +880,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844130820Z", + "ingested": "2025-11-26T09:25:48.144229125Z", "kind": "event", "type": [ "info" @@ -910,7 +910,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844133366Z", + "ingested": "2025-11-26T09:25:48.144230042Z", "kind": "event", "type": [ "info" @@ -940,7 +940,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844135899Z", + "ingested": "2025-11-26T09:25:48.144231Z", "kind": "event", "type": [ "info" @@ -970,7 +970,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844138458Z", + "ingested": "2025-11-26T09:25:48.144231958Z", "kind": "event", "type": [ "info" @@ -1000,7 +1000,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844141030Z", + "ingested": "2025-11-26T09:25:48.144232917Z", "kind": "event", "type": [ "info" @@ -1030,7 +1030,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844143744Z", + "ingested": "2025-11-26T09:25:48.144233917Z", "kind": "event", "type": [ "info" @@ -1060,7 +1060,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844146299Z", + "ingested": "2025-11-26T09:25:48.144234875Z", "kind": "event", "type": [ "change", @@ -1091,7 +1091,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:56.844148904Z", + "ingested": "2025-11-26T09:25:48.144235875Z", "kind": "event", "type": [ "info", @@ -1113,4 +1113,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json index b5fd4649014..7440ac4181c 100644 --- a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json +++ b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json @@ -10,7 +10,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062134169Z", + "ingested": "2025-11-26T09:25:48.644435917Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:20.349+00:00\"},\"s\":\"I\", \"c\":\"STORAGE\", \"id\":4615611, \"ctx\":\"initandlisten\",\"msg\":\"MongoDB starting\",\"attr\":{\"pid\":1,\"port\":27017,\"dbPath\":\"/data/db\",\"architecture\":\"64-bit\",\"host\":\"6150fe65a89c\"}}", "type": [ @@ -20,7 +20,6 @@ "log": { "level": "I" }, - "message": "MongoDB starting", "mongodb": { "log": { "attr": { @@ -49,7 +48,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062263694Z", + "ingested": "2025-11-26T09:25:48.644460292Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:20.350+00:00\"},\"s\":\"I\", \"c\":\"CONTROL\", \"id\":23403, \"ctx\":\"initandlisten\",\"msg\":\"Build Info\",\"attr\":{\"buildInfo\":{\"version\":\"4.4.4\",\"gitVersion\":\"8db30a63db1a9d84bdcad0c83369623f708e0397\",\"openSSLVersion\":\"OpenSSL 1.1.1 11 Sep 2018\",\"modules\":[],\"allocator\":\"tcmalloc\",\"environment\":{\"distmod\":\"ubuntu1804\",\"distarch\":\"x86_64\",\"target_arch\":\"x86_64\"}}}}", "type": [ @@ -59,7 +58,6 @@ "log": { "level": "I" }, - "message": "Build Info", "mongodb": { "log": { "attr": { @@ -95,7 +93,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062275748Z", + "ingested": "2025-11-26T09:25:48.644462459Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.240+00:00\"},\"s\":\"I\", \"c\":\"RECOVERY\", \"id\":23987, \"ctx\":\"initandlisten\",\"msg\":\"WiredTiger recoveryTimestamp\",\"attr\":{\"recoveryTimestamp\":{\"$timestamp\":{\"t\":0,\"i\":0}}}}", "type": [ @@ -105,7 +103,6 @@ "log": { "level": "I" }, - "message": "WiredTiger recoveryTimestamp", "mongodb": { "log": { "attr": { @@ -135,7 +132,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062278877Z", + "ingested": "2025-11-26T09:25:48.644463584Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.363+00:00\"},\"s\":\"I\", \"c\":\"STORAGE\", \"id\":20320, \"ctx\":\"initandlisten\",\"msg\":\"createCollection\",\"attr\":{\"namespace\":\"admin.system.version\",\"uuidDisposition\":\"provided\",\"uuid\":{\"uuid\":{\"$uuid\":\"b383f03c-b97c-4584-87ae-ab1b8ea399c3\"}},\"options\":{\"uuid\":{\"$uuid\":\"b383f03c-b97c-4584-87ae-ab1b8ea399c3\"}}}}", "type": [ @@ -145,7 +142,6 @@ "log": { "level": "I" }, - "message": "createCollection", "mongodb": { "log": { "attr": { @@ -181,7 +177,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062281733Z", + "ingested": "2025-11-26T09:25:48.644464750Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.410+00:00\"},\"s\":\"I\", \"c\":\"INDEX\", \"id\":20345, \"ctx\":\"initandlisten\",\"msg\":\"Index build: done building\",\"attr\":{\"buildUUID\":null,\"namespace\":\"admin.system.version\",\"index\":\"_id_\",\"commitTimestamp\":{\"$timestamp\":{\"t\":0,\"i\":0}}}}", "type": [ @@ -191,7 +187,6 @@ "log": { "level": "I" }, - "message": "Index build: done building", "mongodb": { "log": { "attr": { @@ -224,7 +219,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062284515Z", + "ingested": "2025-11-26T09:25:48.644465750Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.412+00:00\"},\"s\":\"I\", \"c\":\"COMMAND\", \"id\":20459, \"ctx\":\"initandlisten\",\"msg\":\"Setting featureCompatibilityVersion\",\"attr\":{\"newVersion\":\"4.4\"}}", "type": [ @@ -234,7 +229,6 @@ "log": { "level": "I" }, - "message": "Setting featureCompatibilityVersion", "mongodb": { "log": { "attr": { @@ -259,7 +253,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2024-06-18T05:49:57.062287228Z", + "ingested": "2025-11-26T09:25:48.644466709Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.451+00:00\"},\"s\":\"I\", \"c\":\"FTDC\", \"id\":20625, \"ctx\":\"initandlisten\",\"msg\":\"Initializing full-time diagnostic data capture\",\"attr\":{\"dataDirectory\":\"/data/db/diagnostic.data\"}}", "type": [ @@ -269,7 +263,6 @@ "log": { "level": "I" }, - "message": "Initializing full-time diagnostic data capture", "mongodb": { "log": { "attr": { @@ -285,4 +278,4 @@ ] } ] -} \ No newline at end of file +} From 3dd1b973e8c6bcb656433c3f9b324191e73517a0 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 26 Nov 2025 15:28:46 +0530 Subject: [PATCH 14/17] Revert "elastic-package test pipeline -v -g" This reverts commit bb16f0c0f18f717ea9fa586d3b330021d080e5d9. --- .../test-mongodb-debian.log-expected.json | 76 +++++++++---------- ...est-mongodb-ubuntu-4-4-4.log-expected.json | 23 ++++-- 2 files changed, 53 insertions(+), 46 deletions(-) diff --git a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json index 09587e24cc3..b30173e9596 100644 --- a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json +++ b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-debian.log-expected.json @@ -10,7 +10,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144189542Z", + "ingested": "2024-06-18T05:49:56.843956667Z", "kind": "event", "type": [ "info" @@ -40,7 +40,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144200625Z", + "ingested": "2024-06-18T05:49:56.844020640Z", "kind": "event", "type": [ "info" @@ -70,7 +70,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144202167Z", + "ingested": "2024-06-18T05:49:56.844034677Z", "kind": "event", "type": [ "info" @@ -100,7 +100,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144203333Z", + "ingested": "2024-06-18T05:49:56.844037803Z", "kind": "event", "type": [ "info" @@ -130,7 +130,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144204375Z", + "ingested": "2024-06-18T05:49:56.844040422Z", "kind": "event", "type": [ "info" @@ -160,7 +160,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144205375Z", + "ingested": "2024-06-18T05:49:56.844042978Z", "kind": "event", "type": [ "info" @@ -190,7 +190,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144206375Z", + "ingested": "2024-06-18T05:49:56.844067437Z", "kind": "event", "type": [ "info" @@ -220,7 +220,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144207333Z", + "ingested": "2024-06-18T05:49:56.844070934Z", "kind": "event", "type": [ "info" @@ -250,7 +250,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144208333Z", + "ingested": "2024-06-18T05:49:56.844073549Z", "kind": "event", "type": [ "info" @@ -280,7 +280,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144209292Z", + "ingested": "2024-06-18T05:49:56.844076091Z", "kind": "event", "type": [ "info" @@ -310,7 +310,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144210292Z", + "ingested": "2024-06-18T05:49:56.844078655Z", "kind": "event", "type": [ "info" @@ -340,7 +340,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144211333Z", + "ingested": "2024-06-18T05:49:56.844081569Z", "kind": "event", "type": [ "info" @@ -370,7 +370,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144212292Z", + "ingested": "2024-06-18T05:49:56.844086992Z", "kind": "event", "type": [ "info" @@ -400,7 +400,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144213292Z", + "ingested": "2024-06-18T05:49:56.844089585Z", "kind": "event", "type": [ "info" @@ -430,7 +430,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144214250Z", + "ingested": "2024-06-18T05:49:56.844092100Z", "kind": "event", "type": [ "info" @@ -460,7 +460,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144215208Z", + "ingested": "2024-06-18T05:49:56.844094947Z", "kind": "event", "type": [ "info" @@ -490,7 +490,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144216250Z", + "ingested": "2024-06-18T05:49:56.844097631Z", "kind": "event", "type": [ "info" @@ -520,7 +520,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144217208Z", + "ingested": "2024-06-18T05:49:56.844100240Z", "kind": "event", "type": [ "info" @@ -550,7 +550,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144218167Z", + "ingested": "2024-06-18T05:49:56.844102764Z", "kind": "event", "type": [ "info" @@ -580,7 +580,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144219542Z", + "ingested": "2024-06-18T05:49:56.844105295Z", "kind": "event", "type": [ "info" @@ -610,7 +610,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144220542Z", + "ingested": "2024-06-18T05:49:56.844107826Z", "kind": "event", "type": [ "info" @@ -640,7 +640,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144221458Z", + "ingested": "2024-06-18T05:49:56.844110352Z", "kind": "event", "type": [ "info" @@ -670,7 +670,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144222417Z", + "ingested": "2024-06-18T05:49:56.844112893Z", "kind": "event", "type": [ "info" @@ -700,7 +700,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144223458Z", + "ingested": "2024-06-18T05:49:56.844115601Z", "kind": "event", "type": [ "info" @@ -730,7 +730,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144224417Z", + "ingested": "2024-06-18T05:49:56.844118101Z", "kind": "event", "type": [ "info" @@ -760,7 +760,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144225375Z", + "ingested": "2024-06-18T05:49:56.844120657Z", "kind": "event", "type": [ "info" @@ -790,7 +790,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144226292Z", + "ingested": "2024-06-18T05:49:56.844123218Z", "kind": "event", "type": [ "info" @@ -820,7 +820,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144227250Z", + "ingested": "2024-06-18T05:49:56.844125756Z", "kind": "event", "type": [ "info" @@ -850,7 +850,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144228208Z", + "ingested": "2024-06-18T05:49:56.844128304Z", "kind": "event", "type": [ "info" @@ -880,7 +880,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144229125Z", + "ingested": "2024-06-18T05:49:56.844130820Z", "kind": "event", "type": [ "info" @@ -910,7 +910,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144230042Z", + "ingested": "2024-06-18T05:49:56.844133366Z", "kind": "event", "type": [ "info" @@ -940,7 +940,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144231Z", + "ingested": "2024-06-18T05:49:56.844135899Z", "kind": "event", "type": [ "info" @@ -970,7 +970,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144231958Z", + "ingested": "2024-06-18T05:49:56.844138458Z", "kind": "event", "type": [ "info" @@ -1000,7 +1000,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144232917Z", + "ingested": "2024-06-18T05:49:56.844141030Z", "kind": "event", "type": [ "info" @@ -1030,7 +1030,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144233917Z", + "ingested": "2024-06-18T05:49:56.844143744Z", "kind": "event", "type": [ "info" @@ -1060,7 +1060,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144234875Z", + "ingested": "2024-06-18T05:49:56.844146299Z", "kind": "event", "type": [ "change", @@ -1091,7 +1091,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.144235875Z", + "ingested": "2024-06-18T05:49:56.844148904Z", "kind": "event", "type": [ "info", @@ -1113,4 +1113,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json index 7440ac4181c..b5fd4649014 100644 --- a/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json +++ b/packages/mongodb/data_stream/log/_dev/test/pipeline/test-mongodb-ubuntu-4-4-4.log-expected.json @@ -10,7 +10,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644435917Z", + "ingested": "2024-06-18T05:49:57.062134169Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:20.349+00:00\"},\"s\":\"I\", \"c\":\"STORAGE\", \"id\":4615611, \"ctx\":\"initandlisten\",\"msg\":\"MongoDB starting\",\"attr\":{\"pid\":1,\"port\":27017,\"dbPath\":\"/data/db\",\"architecture\":\"64-bit\",\"host\":\"6150fe65a89c\"}}", "type": [ @@ -20,6 +20,7 @@ "log": { "level": "I" }, + "message": "MongoDB starting", "mongodb": { "log": { "attr": { @@ -48,7 +49,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644460292Z", + "ingested": "2024-06-18T05:49:57.062263694Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:20.350+00:00\"},\"s\":\"I\", \"c\":\"CONTROL\", \"id\":23403, \"ctx\":\"initandlisten\",\"msg\":\"Build Info\",\"attr\":{\"buildInfo\":{\"version\":\"4.4.4\",\"gitVersion\":\"8db30a63db1a9d84bdcad0c83369623f708e0397\",\"openSSLVersion\":\"OpenSSL 1.1.1 11 Sep 2018\",\"modules\":[],\"allocator\":\"tcmalloc\",\"environment\":{\"distmod\":\"ubuntu1804\",\"distarch\":\"x86_64\",\"target_arch\":\"x86_64\"}}}}", "type": [ @@ -58,6 +59,7 @@ "log": { "level": "I" }, + "message": "Build Info", "mongodb": { "log": { "attr": { @@ -93,7 +95,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644462459Z", + "ingested": "2024-06-18T05:49:57.062275748Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.240+00:00\"},\"s\":\"I\", \"c\":\"RECOVERY\", \"id\":23987, \"ctx\":\"initandlisten\",\"msg\":\"WiredTiger recoveryTimestamp\",\"attr\":{\"recoveryTimestamp\":{\"$timestamp\":{\"t\":0,\"i\":0}}}}", "type": [ @@ -103,6 +105,7 @@ "log": { "level": "I" }, + "message": "WiredTiger recoveryTimestamp", "mongodb": { "log": { "attr": { @@ -132,7 +135,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644463584Z", + "ingested": "2024-06-18T05:49:57.062278877Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.363+00:00\"},\"s\":\"I\", \"c\":\"STORAGE\", \"id\":20320, \"ctx\":\"initandlisten\",\"msg\":\"createCollection\",\"attr\":{\"namespace\":\"admin.system.version\",\"uuidDisposition\":\"provided\",\"uuid\":{\"uuid\":{\"$uuid\":\"b383f03c-b97c-4584-87ae-ab1b8ea399c3\"}},\"options\":{\"uuid\":{\"$uuid\":\"b383f03c-b97c-4584-87ae-ab1b8ea399c3\"}}}}", "type": [ @@ -142,6 +145,7 @@ "log": { "level": "I" }, + "message": "createCollection", "mongodb": { "log": { "attr": { @@ -177,7 +181,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644464750Z", + "ingested": "2024-06-18T05:49:57.062281733Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.410+00:00\"},\"s\":\"I\", \"c\":\"INDEX\", \"id\":20345, \"ctx\":\"initandlisten\",\"msg\":\"Index build: done building\",\"attr\":{\"buildUUID\":null,\"namespace\":\"admin.system.version\",\"index\":\"_id_\",\"commitTimestamp\":{\"$timestamp\":{\"t\":0,\"i\":0}}}}", "type": [ @@ -187,6 +191,7 @@ "log": { "level": "I" }, + "message": "Index build: done building", "mongodb": { "log": { "attr": { @@ -219,7 +224,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644465750Z", + "ingested": "2024-06-18T05:49:57.062284515Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.412+00:00\"},\"s\":\"I\", \"c\":\"COMMAND\", \"id\":20459, \"ctx\":\"initandlisten\",\"msg\":\"Setting featureCompatibilityVersion\",\"attr\":{\"newVersion\":\"4.4\"}}", "type": [ @@ -229,6 +234,7 @@ "log": { "level": "I" }, + "message": "Setting featureCompatibilityVersion", "mongodb": { "log": { "attr": { @@ -253,7 +259,7 @@ "database" ], "created": "2020-04-28T11:07:58.223Z", - "ingested": "2025-11-26T09:25:48.644466709Z", + "ingested": "2024-06-18T05:49:57.062287228Z", "kind": "event", "original": "{\"t\":{\"$date\":\"2021-03-22T21:21:26.451+00:00\"},\"s\":\"I\", \"c\":\"FTDC\", \"id\":20625, \"ctx\":\"initandlisten\",\"msg\":\"Initializing full-time diagnostic data capture\",\"attr\":{\"dataDirectory\":\"/data/db/diagnostic.data\"}}", "type": [ @@ -263,6 +269,7 @@ "log": { "level": "I" }, + "message": "Initializing full-time diagnostic data capture", "mongodb": { "log": { "attr": { @@ -278,4 +285,4 @@ ] } ] -} +} \ No newline at end of file From 5da2fab81c18954612b651450ac9d96a750daab2 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 26 Nov 2025 15:36:37 +0530 Subject: [PATCH 15/17] Fix CI --- .../log/elasticsearch/ingest_pipeline/pipeline-json.yml | 5 ----- packages/mongodb/validation.yml | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 packages/mongodb/validation.yml diff --git a/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml b/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml index 0a81c14d63f..579ca7d604e 100644 --- a/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml +++ b/packages/mongodb/data_stream/log/elasticsearch/ingest_pipeline/pipeline-json.yml @@ -49,11 +49,6 @@ processors: - mongodb.log.truncated - mongodb.log.size ignore_missing: true -- remove: - field: message - ignore_missing: true - if: 'ctx.event?.original != null' - description: 'The `message` field is no longer required if the document has an `event.original` field.' on_failure: - set: field: error.message diff --git a/packages/mongodb/validation.yml b/packages/mongodb/validation.yml new file mode 100644 index 00000000000..07c6efea4c7 --- /dev/null +++ b/packages/mongodb/validation.yml @@ -0,0 +1,3 @@ +errors: + exclude_checks: + - JSE00001 From b97c5cef232413efc3eab047bf9dc64213cdf194 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Wed, 26 Nov 2025 15:39:55 +0530 Subject: [PATCH 16/17] Update stack v --- packages/mongodb/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongodb/manifest.yml b/packages/mongodb/manifest.yml index d2d018605be..a129f2ab432 100644 --- a/packages/mongodb/manifest.yml +++ b/packages/mongodb/manifest.yml @@ -14,7 +14,7 @@ icons: format_version: "3.4.0" conditions: kibana: - version: "^8.19.0 || ^9.1.0" + version: "^8.19.0 || ^9.2.1" elastic: subscription: basic screenshots: From 192bcbd83a530a22bc138895d732aadffd4a0a55 Mon Sep 17 00:00:00 2001 From: subham sarkar Date: Tue, 2 Dec 2025 17:14:12 +0530 Subject: [PATCH 17/17] Update template --- .../kibana/alerting_rule_template/mongodb-cache-usage-high.json | 2 +- .../alerting_rule_template/mongodb-oplog-headroom-critical.json | 2 +- .../alerting_rule_template/mongodb-replica-member-down.json | 2 +- .../alerting_rule_template/mongodb-replication-lag-high.json | 2 +- .../mongodb-unhealthy-replica-members.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json index 8b96c8f382d..0d1fa38ce9d 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-cache-usage-high.json @@ -2,7 +2,7 @@ "id": "mongodb-cache-usage-high", "type": "alerting_rule_template", "attributes": { - "name": "[MongoDB Resources] WiredTiger cache pressure", + "name": "[MongoDB] WiredTiger cache pressure", "tags": [ "MongoDB" ], diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json index 158d672aa22..7c7ae65b2c7 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-oplog-headroom-critical.json @@ -2,7 +2,7 @@ "id": "mongodb-oplog-headroom-critical", "type": "alerting_rule_template", "attributes": { - "name": "[MongoDB Replication] Oplog headroom critically low", + "name": "[MongoDB] Oplog headroom critically low", "tags": [ "MongoDB" ], diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json index aeb88f2f3b3..efd76febf25 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replica-member-down.json @@ -2,7 +2,7 @@ "id": "mongodb-replica-member-down", "type": "alerting_rule_template", "attributes": { - "name": "[MongoDB Replication] Replica member down", + "name": "[MongoDB] Replica member down", "tags": [ "MongoDB" ], diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json index f1379917c4f..45c8aa73b6a 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-replication-lag-high.json @@ -2,7 +2,7 @@ "id": "mongodb-replication-lag-high", "type": "alerting_rule_template", "attributes": { - "name": "[MongoDB Replication] High replication lag", + "name": "[MongoDB] High replication lag", "tags": [ "MongoDB" ], diff --git a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json index 8d225afebf6..0d6cc564394 100644 --- a/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json +++ b/packages/mongodb/kibana/alerting_rule_template/mongodb-unhealthy-replica-members.json @@ -2,7 +2,7 @@ "id": "mongodb-unhealthy-replica-members", "type": "alerting_rule_template", "attributes": { - "name": "[MongoDB Replication] Unhealthy replica members", + "name": "[MongoDB] Unhealthy replica members", "tags": [ "MongoDB" ],