Skip to main content
The Operator Input Log panel allows maintenance personnel to record real-world maintenance events that serve as ground-truth labels for supervised machine learning.

Purpose

Operator logs create a bridge between sensor anomalies and actual maintenance activities, enabling:
  • Supervised ML Training: Correlate sensor patterns with known failure modes
  • Audit Trail: Document maintenance history for compliance and analysis
  • Chart Overlay: Visualize maintenance events on the sensor telemetry chart
  • Failure Mode Analysis: Identify which sensor patterns precede specific failure types
All operator logs are persisted to InfluxDB in the maintenance_logs measurement within the sensor_data bucket.

Logging a Maintenance Event

The form includes the following fields:
1

Asset ID

Field: Read-only (pre-filled with Motor-01)Purpose: Identifies which asset the maintenance was performed on.
2

Event Type

Field: Dropdown (required)Options:
  • Preventive Lubrication — Scheduled lubrication activity
  • Preventive Cleaning — Scheduled cleaning activity
  • Preventive Inspection — Routine inspection
  • Corrective Bearing Replacement — Bearing replacement due to wear
  • Corrective Alignment — Motor/pump alignment adjustment
  • Corrective Electrical — Electrical system repair
  • Status Calibration — System recalibration event
  • Status Restart — System restart or reboot
3

Severity

Field: Dropdown (required)Options:
  • LOW — Minor maintenance, no production impact
  • MEDIUM — Moderate issue, scheduled downtime
  • HIGH — Urgent repair, unplanned downtime
  • CRITICAL — Emergency failure, immediate action
4

Description

Field: Text area (required, max 1000 characters)Purpose: Free-text description of the maintenance activity.Example:
Replaced main bearing due to excessive vibration.
Part #SKF-6205-2RS. Vibration reduced from 0.35g to 0.14g post-replacement.
5

Event Date & Time

Field: Datetime picker (optional)Purpose: Allows backdating logs for historical events. If left empty, the current timestamp is used.Use Case: Log a bearing replacement that occurred 2 days ago to correlate with past sensor spikes.

Example Log Entry

Bearing Replacement

Asset: Motor-01
Type: Corrective Bearing Replacement
Severity: HIGH
Description: Replaced main bearing due to excessive vibration. Part #SKF-6205-2RS.
Timestamp: 2026-01-31T10:30:00Z

How Logs Are Stored

When you submit a log entry, it is written to InfluxDB with the following schema:
Name: maintenance_logsBucket: sensor_data (same as sensor telemetry)

InfluxDB Point Example

maintenance_logs,asset_id=Motor-01,event_type=CORRECTIVE_BEARING_REPLACEMENT,severity=HIGH 
description="Replaced main bearing due to excessive vibration. Part #SKF-6205-2RS.",
event_id="550e8400-e29b-41d4-a716-446655440000" 
1738322400000000000

Chart Overlay (Future Enhancement)

Operator logs can be queried and displayed as vertical markers on the sensor telemetry chart:
// Fetch logs for the past 24 hours
GET /api/logs?hours=24&asset_id=Motor-01

// Response:
{
  "logs": [
    {
      "timestamp": "2026-01-31T10:30:00Z",
      "event_type": "CORRECTIVE_BEARING_REPLACEMENT",
      "severity": "HIGH",
      "description": "Replaced main bearing..."
    }
  ],
  "count": 1
}
These logs can be overlaid on the chart as orange diamonds at the corresponding timestamps, allowing operators to see which maintenance events align with sensor anomalies.

ML Training Use Case

Operator logs serve as supervised labels for training failure prediction models:

Example: Bearing Failure Prediction

  1. Collect Data: 6 months of sensor data + operator logs
  2. Label Events: Extract all CORRECTIVE_BEARING_REPLACEMENT events
  3. Feature Extraction: Pull sensor data from 24 hours before each replacement
  4. Train Classifier: Learn patterns that precede bearing failures
  5. Deploy Model: Predict bearing failures 7-14 days in advance
The /api/logs endpoint allows querying logs by time range and asset, making it easy to export data for offline ML training.

API Reference

Create Log Entry

POST /api/log
Content-Type: application/json

{
  "asset_id": "Motor-01",
  "event_type": "CORRECTIVE_BEARING_REPLACEMENT",
  "severity": "HIGH",
  "description": "Replaced main bearing due to excessive vibration. Part #SKF-6205-2RS.",
  "timestamp": "2026-01-31T10:30:00Z"  // Optional
}
Response (201 Created):
{
  "event_id": "550e8400-e29b-41d4-a716-446655440000",
  "asset_id": "Motor-01",
  "event_type": "CORRECTIVE_BEARING_REPLACEMENT",
  "severity": "HIGH",
  "timestamp": "2026-01-31T10:30:00Z",
  "message": "Log entry created successfully for Motor-01"
}

Retrieve Logs

GET /api/logs?hours=24&limit=50&asset_id=Motor-01
Response:
{
  "logs": [
    {
      "timestamp": "2026-01-31T10:30:00Z",
      "asset_id": "Motor-01",
      "event_type": "CORRECTIVE_BEARING_REPLACEMENT",
      "severity": "HIGH",
      "description": "Replaced main bearing due to excessive vibration. Part #SKF-6205-2RS.",
      "event_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  ],
  "count": 1,
  "query_params": {
    "hours": 24,
    "limit": 50,
    "asset_id": "Motor-01"
  }
}

List Event Types

GET /api/log/types
Response:
{
  "event_types": [
    {
      "value": "PREVENTIVE_LUBRICATION",
      "category": "PREVENTIVE",
      "label": "Preventive Lubrication"
    },
    {
      "value": "CORRECTIVE_BEARING_REPLACEMENT",
      "category": "CORRECTIVE",
      "label": "Corrective Bearing Replacement"
    }
    // ... more event types
  ],
  "severities": ["LOW", "MEDIUM", "HIGH", "CRITICAL"]
}

InfluxDB Persistence Benefits

Time-Series Alignment

Logs share the same timestamp domain as sensor data, enabling precise correlation

Indexed Tags

Fast queries by asset_id, event_type, and severity using InfluxDB’s tag indexing

Retention Policies

Configure automatic data expiration for older logs (e.g., keep 2 years)

Flux Query Integration

Use Flux to join sensor data with maintenance logs for correlation analysis

Best Practices

1

Log Immediately

Record maintenance events as they happen to ensure timestamp accuracy.
2

Be Specific

Include part numbers, measurements (e.g., “vibration reduced from 0.35g to 0.14g”), and technician notes.
3

Use Correct Severity

Reserve CRITICAL for emergency failures. Use MEDIUM for routine repairs.
4

Backdate When Needed

Use the datetime picker to log historical events that weren’t recorded in real-time.

Next Steps

Dashboard Overview

Learn about the overall dashboard layout and features

Metrics & Health Scoring

Understand how sensor metrics are displayed and calculated

Build docs developers (and LLMs) love