Skip to main content
Version: v3.8.0

Step 5 - NATS account import

Goal

Deploy operations-center-import, the matching import rule on the remote ops NATS account. It pulls live alerts, journal events, and fleet telemetry from production-monitoring.

Scenario context

Step 2 exported three subject trees from the plant. Step 4 gave you the plant account public key. This step wires operations-center (dashboard on ops-b) to receive those subjects locally as notify.alerts.>, journal.events.>, and telemetry.machine.>.

The pot-edge-patterns file is deploy/steps/04-nats-account-import.yaml (YAML file number 4, tutorial step 5).

YAML walkthrough

Replace <production-monitoring-account-id> with the key from step 4 before you deploy.

operations-center-import
---
apiVersion: datasance.com/v3
kind: NatsAccountRule
metadata:
name: operations-center-import
spec:
description: Operations center account - import alerts, journal, and fleet telemetry from production site
exportsAllowWildcards: true
imports:
- name: live-alerts
subject: notify.alerts.>
type: stream
account: <production-monitoring-account-id>
local_subject: notify.alerts.>
description: Imported live anomaly notifications
- name: event-journal
subject: journal.events.>
type: stream
account: <production-monitoring-account-id>
local_subject: journal.events.>
description: Imported JetStream journal - JOURNAL_PRODUCTION
- name: fleet-telemetry
subject: telemetry.machine.>
type: stream
account: <production-monitoring-account-id>
local_subject: telemetry.machine.>
description: Imported machine telemetry for fleet sparklines and status badges

Each import pairs with an export from step 2 by name (live-alerts, event-journal, fleet-telemetry).

Why this design

The dashboard user rule ops-viewer (step 1) already allows subscribe on these subjects. Import rules deliver the messages into the operations-center account so alert-dashboard can consume them on ops-b without joining the plant account.

Fleet charts need all three pieces: fleet-telemetry export/import, ops-viewer subAllow, and TELEMETRY_SUBJECT on the dashboard (step 8).

Deploy

Edit the YAML file with your account key, then:

potctl deploy -f deploy/steps/04-nats-account-import.yaml

Verify

potctl get nats-account-rules

Confirm operations-center-import lists three imports with your plant account key.

After step 8 deploys the dashboard, live alerts and fleet sparklines should update. You can defer UI checks until then if you have not deployed operations-center yet.

Common mistakes

  • Wrong account key. A single typo blocks all cross-account traffic.
  • Deploying before step 4. The placeholder must be replaced with a real key from potctl get nats-accounts.
  • Missing fleet-telemetry import. Alerts work but fleet panel stays empty.
  • Mismatch with export names. Import name fields must match export names from step 2.

Next step

Step 6: Diagnostic Service: create a Router bridge so ops-b can call diagnostic-service HTTP on site-a.

Group 3See anything wrong with the document? Help us improve it!