Insights
Insights runs scheduled background analysis over metrics Logstag has already collected and does not query monitored databases directly.
What each view and each part of a finding's detail shows is in the Page reference.
Purpose
Insights helps operators answer questions such as:
- Which queries are getting slower over time, compared to their own recent baseline?
- Which databases show query call patterns consistent with N+1 access?
- Which databases are behaving differently from their own recent workload pattern?
- How confident is Logstag in a given finding?
- What is the recommended next step?
Insights is not a replacement for Alerts. Alerts evaluate fresh monitoring data against thresholds as it arrives. Insights re-examines already-collected metrics on a recurring schedule, about every 15 minutes per database. It surfaces slower-forming patterns that a single threshold check would not catch: regressions, repetitive query patterns, and workload shifts.
What Insights Analyzes
Insights runs three detector families:
- Query performance regressions: a query's performance has drifted from its own recent baseline. The last 4 hours are compared with the previous 7 days, and a time-of-day guard keeps normal daily peaks from firing. On MongoDB this covers collection operations; on Redis and Valkey it covers command latency and command failure rate.
- N+1-style query patterns: a high rate of similar, small queries that return about one row per call, consistent with row-by-row access instead of a batched query. Evaluated over the last 15 minutes.
- Workload anomalies: a database's overall workload shape has deviated from its own baseline: the same hour on earlier days, the same weekday when there is enough history. This covers things like read/write mix, connection counts, and cache behavior.
Regressions and N+1 patterns appear under Query patterns on the Insights page; workload anomalies appear under Workload changes.
Findings are computed per database and compared against that database's own recent history, with no fixed global threshold.
Reading Findings
The Insights page groups findings by subject: the query, MongoDB collection operation, Redis or Valkey command, or database they are about. An N+1 pattern and a regression on the same query appear as one subject, and a subject keeps its earlier findings as history. The page follows the topbar instance and time filters; a finding is in range if it was active at any point in the selected window.
The page has three views:
- Overview: what is being detected right now, and a panel per lens with its subject count and most recent subjects.
- Query patterns: queries, operations, and commands with N+1 or regression findings.
- Workload changes: databases with workload anomalies.
Selecting a subject shows what changed against its baseline, how confident the detector is (Very high, High, Medium, or Low) and why, a read-only first check followed by the detector's suggested next steps, and the subject's history. See the Page reference for each view and block.
A finding that stops matching shows Not seen since … after about 45 minutes. It reopens if the same pattern returns within 7 days.
Users with the ManageAlerts permission can dismiss a subject's open findings, optionally with a reason of up to 500 characters that is shown afterwards. A dismissed finding stays silent for about 30 days even if the detector sees it again. Dismissing a finding does not change anything in the monitored database.
Engine Scope
| Engine | Coverage |
|---|---|
| PostgreSQL | Query regression, N+1 pattern detection, and workload anomaly detection. |
| Microsoft SQL Server | Query regression, N+1 pattern detection, and workload anomaly detection. |
| Oracle | Query regression, N+1 pattern detection, and workload anomaly detection. |
| MongoDB | Collection-operation regression and workload anomaly detection. N+1 pattern detection is not available. |
| Redis | Command latency and failure-rate regression, and workload anomaly detection. N+1 pattern detection is not available. |
| Valkey | Command latency and failure-rate regression, and workload anomaly detection, using the Redis-compatible detection path. N+1 pattern detection is not available. |
N+1 pattern detection is currently available for PostgreSQL, Microsoft SQL Server, and Oracle only.
Data Boundaries
Insights re-analyzes metrics and metadata that Logstag has already collected through its normal monitoring path. It does not open new connections to monitored databases, and it does not read table rows, MongoDB documents, or Redis key values to produce a finding.
Findings can still reference operational details such as query text snippets, database and instance names, and metric values. Access to Insights should be limited to users who are allowed to inspect this kind of monitoring detail.