InfluxDB Exporter#
| Description | InfluxDB Exporter exports alarms, resources, or query results to InfluxDB. |
| Author | Nokia |
| Catalog | nokia-eda/catalog |
| Language | Go |
Overview#
The InfluxDB Exporter app exports Nokia EDA data into an InfluxDB server. It provides two groups of resources:
ServerandClusterServer: define the InfluxDB destination and connection settingsExportandClusterExport: define what data to write and which server and bucket should receive it
The current app API is influxdb.eda.nokia.com/v1alpha1.
Installation#
The InfluxDB Exporter app can be installed using Nokia EDA Store or by running an AppInstaller workflow with kubectl or edactl:
Install Settings#
The app supports install-time settings through spec.apps[].appSettings in the AppInstaller workflow spec:
influxDBExporterCPULimit: CPU limit for the exporter pod. Default:"1"influxDBExporterMemoryLimit: memory limit for the exporter pod. Default:"1Gi"influxDBProxyConfig: ConfigMap name used forHTTP_PROXY,HTTPS_PROXY, andNO_PROXY. Default:proxy-config
The default requests are set to
500mCPU and500Mimemory.
These settings control the deployment in the Nokia EDA base namespace and can be provided through spec.apps[].appSettings in the AppInstaller workflow or directly in the Nokia EDA UI.
apiVersion: appstore.eda.nokia.com/v1
kind: AppInstaller
metadata:
name: influxdb-exporter-install-sized
namespace: eda-system
spec:
operation: install
apps:
- appId: influxdb.eda.nokia.com
catalog: eda-catalog-builtin-apps
version:
type: alias
value: latest
appSettings:
influxDBExporterCPULimit: "2"
influxDBExporterMemoryLimit: 2Gi
influxDBProxyConfig: proxy-config
cat << 'EOF' | kubectl apply -f -
apiVersion: appstore.eda.nokia.com/v1
kind: AppInstaller
metadata:
name: influxdb-exporter-install-sized
namespace: eda-system
spec:
operation: install
apps:
- appId: influxdb.eda.nokia.com
catalog: eda-catalog-builtin-apps
version:
type: alias
value: latest
appSettings:
influxDBExporterCPULimit: "2"
influxDBExporterMemoryLimit: 2Gi
influxDBProxyConfig: proxy-config
EOF
Getting Started#
After installation, create:
- a
ServerorClusterServerto define how to connect to InfluxDB instance - an
ExportorClusterExportto define what data should be exported and which InfluxDB bucket to write to
Namespace rules:
ServerandExportare used within a user namespace such asedaClusterServerandClusterExportare used from the EDA base namespace for centralized exports
Server Resources#
A server resource defines the target InfluxDB connection.
Notable specification fields:
url: InfluxDB base URLorg: InfluxDB organizationcredentialsSecret: Secret containing eithertokenor bothusernameandpasswordbatchSize: number of points buffered per write requestflushTimer: flush interval for buffered writestimestampPrecision:seconds,milliseconds,microseconds, ornanosecondsuseGzip: enable gzip compression on write requeststls: optional TLS configuration
TLS options:
tls.fromFiles: readcaFile,certFile, andkeyFilefrom mounted filestls.fromSecret.name: readtls.crt,tls.key, and optionalca.crtfrom a Secret in the same namespace as the server resource
The resource status contains the fields related to the connectivity parameters of this instance:
connectederrorlastChecked
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: Server
metadata:
name: server1
namespace: eda
spec:
url: http://influxdb.example.svc.cluster.local:8086
org: eda_team
credentialsSecret: influx-secret
batchSize: 100
flushTimer: 10s
timestampPrecision: milliseconds
useGzip: false
cat << 'EOF' | kubectl apply -f -
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: Server
metadata:
name: server1
namespace: eda
spec:
url: http://influxdb.example.svc.cluster.local:8086
org: eda_team
credentialsSecret: influx-secret
batchSize: 100
flushTimer: 10s
timestampPrecision: milliseconds
useGzip: false
EOF
Export Resources#
An export resource defines what data is written and which server and bucket receive it.
Each spec.servers[] entry references:
name: theServerorClusterServerresourcebucket: the InfluxDB bucket to write to
Supported sources:
spec.exports.alarmsspec.exports.resourcespec.exports.query
Alarm Source#
Use spec.exports.alarms to export Nokia EDA alarms.
Important fields:
include: list of alarm types to include, or["*"]for all alarmsexclude: optional list of alarm types to suppress
For ClusterExport, spec.exports.alarms.namespaces optionally limits which namespaces contribute alarms.
Alarm points are written with:
- measurement name
alarms - tags such as
group,kind,type,resource,severity,sourceGroup,sourceKind, andsourceResource - remaining alarm fields stored as Influx fields
Resource Source#
Use spec.exports.resource[] to stream resource data from Nokia EDA resources.
Important fields:
group,version,kind: identify the CR type to exportname: optional single resource namenamespaces: cluster export only; limit which namespaces contribute resources
Resource points are written with:
- measurement name equal to the lowercased resource kind
- tags built from JsPath keys and Kubernetes labels
- flattened object content as fields
Query Source#
Use spec.exports.query[] to write arbitrary state DB query results.
Important fields:
path: JsPath to exportfields: optional list of fields; if omitted, all fields are exportedwhere: optional EQL filtermode:on-change,periodic, orbothperiod: required for periodic behaviorcustomization: optional regex-based measurement, tag, and field renaming
Path behavior:
- for
Export, omit the.namespace...prefix because the exporter automatically scopes the path to the export namespace - for
ClusterExport, use the full path, typically including.namespace...when you want cross-namespace data
Query points are written with:
- measurement name derived from the JsPath, joined with underscores
- tags derived from JsPath keys
- flattened object content as fields
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: Export
metadata:
name: interface-query
namespace: eda
spec:
description: Export enabled interface state to InfluxDB
enabled: true
exports:
query:
- path: .node.srl.interface
fields:
- admin-state
- oper-state
- name
where: 'admin-state = "enable"'
mode: periodic
period: 10s
customization:
measurement:
match: namespace_node_srl_interface
replacement: interface_query
fields:
- match: ^admin-state$
replacement: state
servers:
- name: server1
bucket: eda
cat << 'EOF' | kubectl apply -f -
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: Export
metadata:
name: interface-query
namespace: eda
spec:
description: Export enabled interface state to InfluxDB
enabled: true
exports:
query:
- path: .node.srl.interface
fields:
- admin-state
- oper-state
- name
where: 'admin-state = "enable"'
mode: periodic
period: 10s
customization:
measurement:
match: namespace_node_srl_interface
replacement: interface_query
fields:
- match: ^admin-state$
replacement: state
servers:
- name: server1
bucket: eda
EOF
Cluster-Scoped Resources#
Use ClusterServer and ClusterExport when you want centralized writes from the Nokia EDA base namespace.
Cluster-specific behavior:
ClusterExportsupports namespace filters for alarm and resource sourcesClusterExportcan query across namespacesClusterServeruses the same connection model asServer, but is intended for centralized use
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: ClusterServer
metadata:
name: cluster-server1
namespace: eda-system
spec:
url: http://influxdb.eda-system.svc.cluster.local:8086
org: eda_team
credentialsSecret: influx-secret
batchSize: 100
flushTimer: 10s
timestampPrecision: milliseconds
useGzip: false
cat << 'EOF' | kubectl apply -f -
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: ClusterServer
metadata:
name: cluster-server1
namespace: eda-system
spec:
url: http://influxdb.eda-system.svc.cluster.local:8086
org: eda_team
credentialsSecret: influx-secret
batchSize: 100
flushTimer: 10s
timestampPrecision: milliseconds
useGzip: false
EOF
/// tab | YAML
```yaml
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: ClusterExport
metadata:
name: cluster-alarms
namespace: eda-system
spec:
description: Export alarms from selected namespaces to InfluxDB
enabled: true
exports:
alarms:
namespaces:
- eda
- tenant-a
include:
- "*"
exclude:
- InfluxDBServerConnectionFailed
servers:
- name: cluster-server1
bucket: eda
cat << 'EOF' | kubectl apply -f -
apiVersion: influxdb.eda.nokia.com/v1alpha1
kind: ClusterExport
metadata:
name: cluster-alarms
namespace: eda-system
spec:
description: Export alarms from selected namespaces to InfluxDB
enabled: true
exports:
alarms:
namespaces:
- eda
- tenant-a
include:
- "*"
exclude:
- InfluxDBServerConnectionFailed
servers:
- name: cluster-server1
bucket: eda
EOF
Connectivity Alarm#
The app raises an EDA alarm when it cannot connect to a configured InfluxDB server.
Alarm details:
- Alarm type:
InfluxDBServerConnectionFailed - Severity:
major - Resource kind:
ServerorClusterServer - Resource: server name
Typical causes:
- wrong InfluxDB URL or port
- invalid token or username/password secret
- bad TLS certificate, key, or CA configuration
- network connectivity or proxy configuration issues
The alarm clears automatically after successful connectivity checks.
Validation Notes#
When creating resources, follow these rules:
flushTimermust be at least1sbatchSizemust be at least1- if a TLS client certificate or key is set in
tls.fromFiles, the matching key or certificate must also be set - every export must define at least one source and at least one server
- alarm exports must set
includeorexclude - resource exports must set
group,version, andkind - query customizations use regexes, so invalid regex patterns are rejected