Skip to content

Add MongoDB OpenTelemetry content pack - #17825

Merged
muthu-mps merged 8 commits into
elastic:mainfrom
shmsr:mongodb-otel-pack
Apr 8, 2026
Merged

Add MongoDB OpenTelemetry content pack#17825
muthu-mps merged 8 commits into
elastic:mainfrom
shmsr:mongodb-otel-pack

Conversation

@shmsr

@shmsr shmsr commented Mar 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a new mongodb_otel content pack (type: content) with Kibana dashboards, alerting rule templates, and SLO templates for monitoring MongoDB via the OpenTelemetry mongodbreceiver.
  • Includes 3 dashboards (Overview, Operations, Capacity), 8 alert rules, and 3 SLO templates.
  • All assets consume metrics from the metrics-mongodbreceiver.otel-* data stream — no optional receiver metrics need to be enabled.

Dashboards

[MongoDB OTel] Overview

Operation throughput, average latency, WiredTiger cache hit ratio, and connection status.

Overview

[MongoDB OTel] Operations

Operation rate by type, operation time trends, global lock contention, and network I/O.

Operations

[MongoDB OTel] Capacity

Connection utilization, memory usage, storage and index sizes by database, and cursor/session counts.

Capacity

Alert rules

Alert Trigger Severity
Connection exhaustion Available connections < 10 Critical
Cursor timeouts Any increase in cursor timeout count High
Global lock contention Lock held > 500 ms/sec avg High
High cache miss rate Cache miss rate > 5% High
High cursor count Open cursors > 1000 Medium
High memory usage Resident memory > 4 GB High
High operation latency Avg latency > 100 ms High
High session count Active sessions > 500 Medium

SLO templates

SLO Target Window
Avg operation latency 99.5% 30-day rolling
Cache hit ratio 99.5% 30-day rolling
Connection availability 99.5% 30-day rolling

Test plan

  • elastic-package build succeeds for packages/mongodb_otel
  • elastic-package validate passes (format version, manifest, dashboards)
  • Dashboards render correctly in Kibana with sample mongodbreceiver data
  • Alert rules and SLO templates load without errors
Adds dashboards, alerting rule templates, and SLO templates for
monitoring MongoDB via the OpenTelemetry mongodbreceiver.
@shmsr
shmsr requested a review from a team as a code owner March 15, 2026 12:41
@github-actions

github-actions Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@shmsr shmsr self-assigned this Mar 15, 2026
@shmsr shmsr added the New Integration Issue or pull request for creating a new integration package. label Mar 15, 2026
@shmsr
shmsr requested a review from ishleenk17 March 15, 2026 12:50
@andrewkroh andrewkroh added dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. labels Mar 15, 2026
@ishleenk17

Copy link
Copy Markdown
Member

@shmsr

  • Global Lock and operations time by type can have a better Y axis naming.
  • Connection utilization is 0%. I see 2 active connections. So should it show some prercentage ?
  • Add stack version note for SLO templates
@strawgate

Copy link
Copy Markdown
Contributor

I ran kb-dashboard 0.4.0 upgrade validation on this PR in an isolated worktree.

Results

  • packages/mongodb_otel/_dev/shared
    • upgrade --fail-on-change exit: 3
    • upgrade --write exit: 0
    • post-upgrade compile --format elastic-integrations exit: 0

Upgrade and post-upgrade compile succeeded with 0.4.0.
Please apply these commands in your branch and commit both YAML + regenerated JSON artifacts.

Suggested commands:

uvx --from kb-dashboard-cli==0.4.0 kb-dashboard upgrade --input-dir packages/mongodb_otel/_dev/shared --write
uvx --from kb-dashboard-cli==0.4.0 kb-dashboard compile --input-dir packages/mongodb_otel/_dev/shared --output-dir packages/mongodb_otel/kibana/dashboard --format elastic-integrations
@ishleenk17

Copy link
Copy Markdown
Member

@shmsr

  • Global Lock and operations time by type can have a better Y axis naming.
  • Connection utilization is 0%. I see 2 active connections. So should it show some prercentage ?
  • Add stack version note for SLO templates

These issues aren't addressed yet

@shmsr

shmsr commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

@shmsr

  • Global Lock and operations time by type can have a better Y axis naming.
  • Connection utilization is 0%. I see 2 active connections. So should it show some prercentage ?
  • Add stack version note for SLO templates

These issues aren't addressed yet

Apologies for the delay. Now I have address the issues. PTAL.

Comment thread packages/mongodb_otel/_dev/shared/mongodb_otel-operations.yaml
"schedule": {
"interval": "5m"
},
"params": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High alerting_rule_template/mongodb_otel-high-session-count.json:14

The params object for .es-query with esqlQuery searchType is missing required fields (size, threshold, thresholdComparator, termField, termSize, excludeHitsFromPreviousRun) that all other OTel integration alerting templates consistently include. Without threshold and thresholdComparator, the rule cannot determine when to fire alerts — it will likely fail to load or not trigger as expected. The standard pattern for ESQL queries with inline filtering is threshold: [0] and thresholdComparator: ">" so the alert fires when any rows are returned.

🤖 Copy this AI Prompt to have your agent fix this:
In file packages/mongodb_otel/kibana/alerting_rule_template/mongodb_otel-high-session-count.json around line 14:

The `params` object for `.es-query` with `esqlQuery` searchType is missing required fields (`size`, `threshold`, `thresholdComparator`, `termField`, `termSize`, `excludeHitsFromPreviousRun`) that all other OTel integration alerting templates consistently include. Without `threshold` and `thresholdComparator`, the rule cannot determine when to fire alerts — it will likely fail to load or not trigger as expected. The standard pattern for ESQL queries with inline filtering is `threshold: [0]` and `thresholdComparator: ">"` so the alert fires when any rows are returned.
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @shmsr

@muthu-mps
muthu-mps merged commit acd32f0 into elastic:main Apr 8, 2026
12 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package mongodb_otel - 0.1.0 containing this change is available at https://epr.elastic.co/package/mongodb_otel/0.1.0/

@andrewkroh andrewkroh added the Integration:mongodb_otel MongoDB OpenTelemetry Assets label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:mongodb_otel MongoDB OpenTelemetry Assets New Integration Issue or pull request for creating a new integration package.

6 participants