Appearance
Analytics hub
Normative product contract: Analytics industry profile (exceedance-first fleet risk, Fleet check, alarm performance, prediction as secondary).
The Analytics sidebar item (/analytics) has three tabs: Fleet check (default), Ask, and Alarm performance.
What you can do today
| Capability | Where |
|---|---|
| Fleet check (type + reading + range + aggregation) | Analytics → Fleet check |
| (i) help on each filter | Fleet check / Alarm performance filters |
| Friendly reading labels | Dropdowns show plain name with stored key |
| Compare prior period | Fleet check → Compare prior period |
| Chart up to 6 devices | Fleet check → Chart devices |
| Export ranking CSV | Fleet check → Export CSV |
| Pin timeseries to a dashboard | Fleet check → Pin to dashboard |
| Exceedance hero (“who looks worst”) | Fleet check when Above/Below is set |
| Saved checks (private / tenant / shared emails) | Fleet check → Save this check |
| Ask (fleet sentence) → open same filters in Fleet check | Analytics → Ask → Open in Fleet check |
| Ask the guide (product / how-to) | Documentation → Ask the guide (preferred); Ask also answers how-to from the guide |
| Time-bucket series charts | Fleet check (auto / 5m / 1h / 1d) |
| Top/Bottom rankings + fleet KPIs | Fleet check |
| Threshold anomaly count | Fleet check (Above/Below). Non-finite or absolute value above 1e12 is refused |
| Linear forecast | Fleet check + POST /api/analytics/forecast (engine=linear) — capped |
| Predictive chart | Fleet check Predictive. If the forecast engine is down, the chart says so and does not invent a line |
| Pattern heatmap (hour × weekday) | Fleet check |
| Z-score statistical anomalies | Fleet check + POST /api/analytics/statistical-anomaly |
| Asset hierarchy rollups | Fleet check + POST /api/analytics/asset-rollup |
| Alarm performance (MTTA/MTTC, by severity, by IST shift, noisy rules/devices) | Analytics → Alarm performance |
| Learned watch (opt-in when a reading leaves its normal band) | Ask, or POST /api/analytics/watches |
| Time-to-limit and next-period total, in one sentence | Ask |
| Vibration level, peak, crest, and dominant frequency | Ask, on a vibration key or a named reading |
| Profile calculated fields on ingest | Device Profiles → Calculated fields |
| Analytics Solutions | Phases A–C packs (Solutions menu) |
How to ask
The device type and the reading are dropdowns on Fleet check. Run uses those dropdowns. Ask answers are calculated from stored telemetry; a successful Ask answer can Open in Fleet check with the same type, reading, limit, and window.
Ask matches the sentence to this tenant’s device types and keys. Ranking, a fleet average / min / max / sum (when the sentence asks for the average without ranking words), a linear forecast (time-to-limit or next-period total), a vibration check, and a learned watch are calculated from stored telemetry only — Ask does not invent numbers. Phrases such as “next period total” and “projected total” request a projected total for the next week or month. For energy / kWh counters, that projection is the recent rate × horizon. For level keys with a clear trend (fuel, ramp, temperature), it is a linear integral of the hourly level over the horizon.
Time windows in the sentence are honoured: today and yesterday use Asia/Kolkata midnight; last hour, last N days, 7 days, and 30 days use rolling windows. Fleet check’s time dropdown includes the same Today (IST) and Yesterday (IST) options. Ranking can use avg (default), sum, max, or min when the sentence says so, and top N / bottom N caps the chart. Device type filters match without regard to letter case.
How-to and product questions (“How do I…”, “What is a rule chain?”) are answered from the customer guide by a local Qwen model on the server (qwen-worker) when that worker is available. When the guide worker is down, Ask returns a clear “not available” answer instead of an error. Qwen is not required for Fleet check math or Ask rankings. Reading questions (average, latest, temperature of a device, and similar) never go to that model — Nest answers from telemetry, or refuses. The guide path does not invent device readings. Prefer Documentation → Ask the guide for product how-to. A paid cloud language model is not used.
Ask uses the same names inside a sentence:
- Fleet: say the device type with spaces.
energy_meteris “energy meters”.ht_sensoris “ht sensors”.machineis “machines”. - Reading: say the telemetry key with spaces.
voltage_vln_avgis “voltage vln avg”.temperatureis “temperature”. - One device: use the name shown on the device, such as
avh1. The long id is not the name. An unknown name is refused; Ask does not substitute another device. - Or press a suggestion. Those lines are filled from the fleets and readings this tenant already has.
Example: “Which machines have the highest temperature in the last 24 hours?”
Ask can list active alarms (and alarms in a named window), answer what triggered the latest one, and point MTTA/MTTC to Alarm performance. Asset names in the sentence (e.g. “at QA R10 Plant”) limit the device pool. Common English typos and Hindi key words (तापमान → temperature) are normalized. Unit conversion (“in Fahrenheit”, “in MWh”) is refused — values are shown as stored.
A watch stays off until someone asks. Example: “Watch temperature anomalies on Machine 3.” It learns the normal band from about 30 readings, then opens a warning when the reading leaves that band, and clears when it returns. Scoring runs every 10 minutes. Nothing is watched for a tenant until a watch exists.
If the sentence names neither a fleet nor a reading, the answer lists what this tenant has.
Forecast mode UX
Fleet risk ranking answers “which of my 500 devices look worst?” using the industry profile: crossings → samples over limit → time over limit, then score/forecast assist. Samples over limit count every stored reading in the window (same as anomaly summary), not a chart downsample. Time over limit ignores long gaps between readings (same rule on anomaly summary, fleet risk, and threshold-breach). Set Above/Below or ranking is not exceedance-based. Fleet check’s Who looks worst hero lists only devices that crossed the limit (with crossing counts from breachEpisodes), and Saved checks stay visible even before you pick a type and reading.
Forecast chart is drill-down only (Linear/Predictive, Top-N auto or manual multi-select, capped device count). Chart devices (≤6) are separate from the whole-fleet ranking. Day buckets use Asia/Kolkata midnight when you choose the 1d bucket.
Limits: GET /api/analytics/forecast-limits · APIs: POST /api/analytics/forecast, POST /api/analytics/fleet-forecast-risk.
| Surface | Default max devices | Purpose |
|---|---|---|
| Linear chart | 12 | Detail line chart |
| Predictive chart | 5 | Forecast engine (AutoETS). If the engine is down the chart says so and stays empty |
| Fleet risk scan | 1000 | Rank whole type |
Capability map
| Capability | Now | Later |
|---|---|---|
| Fleet check | Yes | Richer calendars / heatmaps |
| Calculated fields | Profile expressions on ingest | More expression functions |
| Asset rollups | Hierarchy rollup API + Explorer | Multi-metric trees |
| Anomaly | Threshold + stale + one-shot z-score, plus an opt-in learned watch | Trained models |
| Prediction | Linear sentence (time-to-limit, next-period total) + StatsForecast worker (AutoETS) with fallback | Batch cache / accuracy UI |
| Saved views | Server private/tenant/shared + local fallback | Folders / permissions UI |
| Visualizations | Bar, line, spectrum, hour×weekday heatmap | Calendar / more view types |
| Ask | Fleet math from telemetry + guide Q&A via local Qwen | Multi-turn memory / larger models |
APIs (confirmed)
POST /api/analytics/forecast— history + linear forecast points per devicePOST /api/analytics/statistical-anomaly— mean/stdDev/z-score vs window baselinePOST /api/analytics/asset-rollup— aggregate a key over asset root + descendantsGET/POST/DELETE /api/analytics/saved-views— visibility:private|tenant|sharedGET /api/analytics/prompts— suggestion sentences from this tenant's fleets and numeric keysPOST /api/analytics/chat— ranking, forecast sentence, vibration, watch, or guide how-toPOST /api/docs-assistant/chat— Ask the guide (Documentation); same engine as how-to AskGET/POST /api/analytics/watchesandDELETE /api/analytics/watches/:id— learned watches. Off until created.
Migrations / env
0039_analytics_saved_views.sql0040_analytics_saved_views_sharing.sql0044_analytics_watches.sqlCALCULATED_FIELDS_ENABLED(default true) — seebackend/ENVIRONMENT.md
Field validation
API + UI smoke checklist: Field validation.
Related
- Phase 4 · Phase 5 · Phase 6
- Validation status (hardware bench tracker)
