Skip to content

Remote Write#

Description The Remote Write app exports metrics to servers adhering to Prometheus Remote-Write Specifications
Author Nokia
Supported OS N/A
Catalog nokia-eda/catalog
Source Code coming soon

Overview#

The Remote Write app enables exporting network and EDA metrics to remote Prometheus-compatible servers using the Remote-Write specification v1.0. The app provides resources to define the metrics to export and the destinations to send them to.

Application components:

REMOTEWRITE

  • Cluster Destinations
  • Cluster Exporters
  • Destinations
  • Exporters

Installation#

Notifier app can be installed using EDA Store or by running the app-installer workflow with kubectl:

apiVersion: appstore.eda.nokia.com/v1
kind: AppInstaller
metadata:
  name: remote-write-install
  namespace: eda-system
spec:
  operation: install
  apps:
    - appId: remotewrite.eda.nokia.com
      catalog: eda-catalog-builtin-apps
      version:
        value: v2.0.0
cat << 'EOF' | kubectl apply -f -
apiVersion: appstore.eda.nokia.com/v1
kind: AppInstaller
metadata:
  name: remote-write-install
  namespace: eda-system
spec:
  operation: install
  apps:
    - appId: remotewrite.eda.nokia.com
      catalog: eda-catalog-builtin-apps
      version:
        value: v2.0.0

EOF

Getting Started#

After installing the app, you can configure:

  • Export and ClusterExport: Define metrics to collect (with filtering, mapping, renaming, labels, etc.).
  • Destination and ClusterDestination: Define remote write endpoints (with TLS, authentication, and buffering).

Example Resources#

Destination#

Defines a remote server to which metrics are written. Supports optional TLS, authentication, custom headers, retries, and timeouts.

apiVersion: remotewrite.eda.nokia.com/v1alpha1
kind: Destination
metadata:
  name: dest1
  namespace: eda
spec:
  url: 'http://prw.example.com:9090/api/v1/write'
  writeOptions:
    bufferSize: 100           # Number of metrics before sending
    flushInterval: 60s        # Time interval for sending buffered data
    maxRetries: 3             # Retry attempts on failure
    timeout: 10s              # Client write timeout
cat << 'EOF' | kubectl apply -f -
apiVersion: remotewrite.eda.nokia.com/v1alpha1
kind: Destination
metadata:
  name: dest1
  namespace: eda
spec:
  url: 'http://prw.example.com:9090/api/v1/write'
  writeOptions:
    bufferSize: 100           # Number of metrics before sending
    flushInterval: 60s        # Time interval for sending buffered data
    maxRetries: 3             # Retry attempts on failure
    timeout: 10s              # Client write timeout
EOF

Export: Interfaces Statistics#

Defines what metrics to export and to which destinations. Metrics are retrieved from the state DB at the given path and can include optional filtering, labeling, and transformation.

apiVersion: remotewrite.eda.nokia.com/v1alpha1
kind: Export
metadata:
  name: interface-stats
  namespace: eda
spec:
  exports:
    - prefix: interfaces
      path: .namespace.node.srl.interface.statistics # EQL path
      interval: 30s                                  # Optional polling interval
      mode: periodic                                 # periodic | on-change | periodic-on-change
      fields: ["in-octets", "out-octets"]            # Optional subset of fields
      labels:
        static:
          - name: region
            value: us-west
  destinations:
    - name: dest1
cat << 'EOF' | kubectl apply -f -
apiVersion: remotewrite.eda.nokia.com/v1alpha1
kind: Export
metadata:
  name: interface-stats
  namespace: eda
spec:
  exports:
    - prefix: interfaces
      path: .namespace.node.srl.interface.statistics # EQL path
      interval: 30s                                  # Optional polling interval
      mode: periodic                                 # periodic | on-change | periodic-on-change
      fields: ["in-octets", "out-octets"]            # Optional subset of fields
      labels:
        static:
          - name: region
            value: us-west
  destinations:
    - name: dest1

EOF

Advanced Configuration#

Destination Resource Options#

  • authentication: username/password for basic auth.
  • authorization: type (for example, Bearer) and token-based credentials.
  • tls: Provide CA/cert/key file paths and skipVerify flag.
  • writeOptions: Tune buffer size, flush interval, custom HTTP headers, retries, and timeouts.
  • metadata:

    • include: Whether to send metadata.
    • interval: Frequency of metadata updates.
    • maxEntriesPerWrite: Limit per request.

Export Resource Options#

  • path (required): State DB path to collect from.
  • mode: periodic, on-change, or periodic-on-change.
  • interval: Polling interval for metric collection.
  • fields: Optional subset of fields to export.
  • labels: Static and dynamic labels.
  • mappings: Transform field values using regex and numeric replacements.
  • metricName: Rename metrics using regex.
  • resource: Use a CR as source; metric value is 1, and CR labels are used as metric labels.
  • where: Filtering condition (e.g., admin-state = enable).