Smart Site
Home Docs Smart Data Collector Detail Page

Collector Detail Page

The Collector Detail page (route /system/plugins/:protocol) is the per-protocol workspace for inspecting collector configuration, tag mapping, runtime monitoring, and logs. It is reached from the System → Plugins list by clicking a collector entry.

1. Page Layout

The page is organized into four tabs:

  1. Protocol Config — Connection defaults and protocol-specific parameters
  2. Tag Mapping — How device tags map to protocol addresses
  3. Monitoring — Live runtime status (connections, throughput, errors)
  4. Logs — Real-time log stream filtered to this collector

2. Protocol Config

The Protocol Config tab shows the defaults applied when a new device of this protocol is created.

2.1 Common Fields

Field Description
Protocol modbus / opcua / mqtt / s7 / virtual
Default Port 502 / 4840 / 1883 / 102 / —
Timeout (ms) Read timeout before a retry is attempted
Retry Count Number of retries before the circuit breaker opens
Scan Rate Default collection interval for newly created devices

2.2 Protocol-Specific Sections

  • Modbus — coil/register ranges, byte order, slave ID strategy
  • OPC UA — security policy, message mode, subscription parameters
  • MQTT — QoS, topic filters, JSONPath extraction rules
  • S7 — rack/slot, connection type, DB numbering

Changes are saved with the plugin:write permission and take effect for newly created devices. Existing devices keep their stored config unless explicitly updated.

3. Tag Mapping

The Tag Mapping tab illustrates how a logical tag name resolves to a protocol address. Examples:

Protocol Tag Name Address Data Type
Modbus Temperature HR40001 float32
OPC UA Pressure ns=2;s=Pressure double
MQTT Humidity device/+/humidity float32
S7 MotorStatus DB1.DBX0.0 bool

For MQTT, the JSONPath column shows the extraction path used by jsonpath.util.ts to pull a scalar out of a JSON payload.

Use this tab to validate that a template's addresses are syntactically correct before applying it to many devices.

4. Collection Monitoring

The Monitoring tab pulls data from the CollectorDiagnosticsService and MetricsCollectorService.

4.1 Connection Status

A table lists every device using this protocol with:

  • Device name and group
  • Connection state (connected / disconnected / error)
  • Last successful read timestamp
  • Consecutive failure count
  • Circuit breaker state (closed / open / half-open)

4.2 Throughput and Latency

Charts show:

  • Points read per second (rolling window)
  • Read latency p50 / p95 / p99
  • Error rate percentage

If the error rate spikes, drill into the Logs tab to find the failing device.

4.3 Pool Utilization

For connection-pooled protocols, the page shows pool size, active connections, and wait queue depth. A consistently full pool suggests raising the pool size or reducing the scan rate.

5. Log Viewing

The Logs tab tails the StructuredLogger output filtered to the current protocol. Each line carries:

  • Timestamp
  • Level (info / warn / error)
  • deviceId and tagId context
  • Message

Controls:

  • Level filter — show only warn and above
  • Device filter — restrict to one device
  • Search — full-text search across messages
  • Pause / Resume — freeze the stream for inspection

Logs are also persisted to log files under the ss-node service directory for post-mortem analysis.

6. Operational Guidance

6.1 Diagnosing a Stuck Collector

  1. Open the Monitoring tab and look for devices in error state
  2. Note the circuit breaker state — if open, the collector has given up temporarily
  3. Run POST /devices/:id/ping from the device detail page to test connectivity
  4. Fix the root cause (network, credentials, address), then wait for the half-open retry or restart the backend

6.2 Tuning Performance

  • If latency p95 is high, lower the concurrency or split tags across more devices
  • If the pool is saturated, increase the pool size in the protocol config
  • If the publish step is the bottleneck, enable deadband or frequency-reduction strategies

6.3 Validating a New Tag Mapping

  1. Add the tag on the Tag Mapping tab (or via the device detail page)
  2. Watch the Monitoring tab — a successful first read appears within one scan cycle
  3. Confirm the value and quality in the Realtime tab of the device

7. FAQ

Q: The Monitoring tab shows "no data". A: The collector may not have run a scan yet. Wait one scan cycle, or trigger a read by enabling a device. Also confirm the metrics collector module is loaded.

Q: Logs are truncated in the UI. A: The live stream caps the number of displayed lines for performance. Open the log file on disk for the full history, or narrow the device/level filter.

Q: Changing the default port did not affect existing devices. A: Protocol config defaults apply only to new devices. Edit each existing device's connection settings individually to update its port.

Q: How do I reset the circuit breaker immediately? A: Restarting the backend resets all breakers. There is no per-device reset endpoint by design — breakers auto-recover through the half-open state.

  • ../../05-collector/README.md
  • ../../03-device/device-detail.md
  • ../../08-protocol/README.md
  • Plugin Isolation Design