Skip to main content
Version: v3.9.0

Account export

Goal​

Deploy NatsAccountRule production-monitoring-export. It exports three subject trees from the plant account. The production monitoring Application binds this rule by name.

The file is deploy/steps/02-nats-account-export.yaml.

YAML​

production-monitoring-export
apiVersion: datasance.com/v3
kind: NatsAccountRule
metadata:
name: production-monitoring-export
spec:
description: Production site account - export live alerts (service) and event journal (JetStream stream)
maxConnections: -1
maxLeafNodeConnections: -1
maxData: -1
maxExports: -1
maxImports: -1
maxMsgPayload: -1
maxSubscriptions: -1
exportsAllowWildcards: true
memStorage: -1
diskStorage: -1
streams: -1
consumer: -1
maxAckPending: -1
memMaxStreamBytes: -1
diskMaxStreamBytes: -1
exports:
- name: live-alerts
subject: notify.alerts.>
type: stream
description: Cross-account live anomaly notifications
- name: event-journal
subject: journal.events.>
type: stream
description: JetStream journal replay path - stream JOURNAL_PRODUCTION
- name: fleet-telemetry
subject: telemetry.machine.>
type: stream
description: Read-only fleet telemetry fan-in for ops dashboard sparklines
ExportSubjectWhat it feeds
live-alertsnotify.alerts.>Live alert panel
event-journaljournal.events.>Journal that survives a page refresh
fleet-telemetrytelemetry.machine.>Fleet charts for M001 through M004

Export alone does not deliver messages to ops-b. The import rule does that after you copy the plant account id.

Deploy​

potctl deploy -f deploy/steps/02-nats-account-export.yaml

What you should see​

potctl get nats-account-rules

production-monitoring-export exists and lists three exports.

Common mistakes​

Deploying production monitoring before this rule. The Application names production-monitoring-export.

Leaving out fleet-telemetry. Alerts can work while the fleet panel stays empty.

Next​

Production monitoring

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