diff --git a/go.mod b/go.mod index bae1cce1f7c5e..19b252ec5a1d7 100644 --- a/go.mod +++ b/go.mod @@ -184,6 +184,7 @@ require ( github.com/riemann/riemann-go-client v0.5.1-0.20211206220514-f58f10cdce16 github.com/robbiet480/go.nut v0.0.0-20220219091450-bd8f121e1fa1 github.com/robinson/gos7 v0.0.0-20240315073918-1f14519e4846 + github.com/rticommunity/rticonnextdds-connector-go v1.3.5 github.com/safchain/ethtool v0.6.2 github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 github.com/seancfoley/ipaddress-go v1.7.1 diff --git a/go.sum b/go.sum index 32c187c6939c6..3b61247a896e9 100644 --- a/go.sum +++ b/go.sum @@ -2245,6 +2245,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/rticommunity/rticonnextdds-connector-go v1.3.5 h1:A8dRxKah++XkzMzP5GZa2qlK0Bo8ZS7BA5AuQpQi1mg= +github.com/rticommunity/rticonnextdds-connector-go v1.3.5/go.mod h1:9AyzIQCg0kF481B98kgpxfYlrx450YXso2dl26NCFHs= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= diff --git a/plugins/inputs/all/dds_consumer.go b/plugins/inputs/all/dds_consumer.go new file mode 100644 index 0000000000000..535121fba5807 --- /dev/null +++ b/plugins/inputs/all/dds_consumer.go @@ -0,0 +1,5 @@ +//go:build !custom || inputs || inputs.dds_consumer + +package all + +import _ "github.com/influxdata/telegraf/plugins/inputs/dds_consumer" // register plugin diff --git a/plugins/inputs/dds_consumer/INSTALL.md b/plugins/inputs/dds_consumer/INSTALL.md new file mode 100644 index 0000000000000..ba75d6268115e --- /dev/null +++ b/plugins/inputs/dds_consumer/INSTALL.md @@ -0,0 +1,133 @@ +# DDS Plugin Installation Guide + +This guide provides step-by-step instructions for installing and configuring the DDS Consumer input plugin for Telegraf. + +## Prerequisites + +1. **RTI Connext DDS**: You must have RTI Connext DDS installed on your system + - Download from [RTI Website](https://www.rti.com/free-trial) + - Follow RTI's installation instructions for your platform + +2. **Go Environment**: Ensure Go is properly installed and configured + - Go 1.18 or later is recommended + +## Installation Steps + +### 1. Set RTI Environment Variables + +Before running Telegraf, ensure RTI environment is configured: + +#### Linux/macOS: +```bash +# Add to your .bashrc or .profile +export NDDSHOME=/path/to/rti_connext_dds +export RTI_LICENSE_FILE=/path/to/rti_license.dat +export LD_LIBRARY_PATH=$NDDSHOME/lib/:$LD_LIBRARY_PATH +``` + +#### Windows: +```cmd +set NDDSHOME=C:\path\to\rti_connext_dds +set RTI_LICENSE_FILE=C:\path\to\rti_license.dat +set PATH=%NDDSHOME%\bin;;%PATH% +``` + +### 3. Build Telegraf with DDS Plugin + +```bash +cd /path/to/telegraf +go build ./cmd/telegraf +``` + +### 4. Verify Installation + +Test that the plugin is available: + +```bash +./telegraf --input-list | grep dds_consumer +``` + +## Configuration + +### 1. Create DDS XML Configuration + +Create an XML file describing your DDS configuration (see `example_config.xml`): + +```xml + + + + + + + + + +``` + +### 2. Configure Telegraf + +Add the DDS consumer plugin to your Telegraf configuration: + +```toml +[[inputs.dds_consumer]] + config_path = "/path/to/your/dds_config.xml" + participant_config = "MyParticipantLibrary::MyParticipant" + reader_config = "MySubscriber::MyReader" + tag_keys = ["field1", "field2"] + name_override = "my_metrics" + data_format = "json" +``` + +### 3. Test Configuration + +```bash +./telegraf --config /path/to/your/telegraf.conf --test +``` + +## Troubleshooting + +### Common Issues + +1. **RTI License Error**: Ensure `RTI_LICENSE_FILE` points to a valid license +2. **Library Not Found**: Verify `LD_LIBRARY_PATH` includes RTI libraries +3. **XML Parse Error**: Validate XML syntax and participant/reader names +4. **Network Issues**: Check DDS domain ID and network connectivity + +### Debug Commands + +```bash +# Test DDS connectivity +rtiddsping -domainId 0 + +# Check environment +echo $NDDSHOME +echo $RTI_LICENSE_FILE + +# Validate XML configuration +rtiddsgen -validate your_config.xml +``` + +## Platform-Specific Notes + +### Linux +- May require additional network configuration for multicast +- Check firewall settings for DDS traffic + +### Windows +- Ensure Visual C++ Redistributable is installed +- Check Windows Firewall for DDS traffic + +### Docker +- Use host networking mode for DDS multicast +- Mount RTI installation and license file + +## Support + +For RTI Connext DDS specific issues: +- [RTI Community Forums](https://community.rti.com) +- [RTI Documentation](https://community.rti.com/documentation) + +For Telegraf specific issues: +- [Telegraf GitHub Repository](https://github.com/influxdata/telegraf) +- [InfluxData Community](https://community.influxdata.com) \ No newline at end of file diff --git a/plugins/inputs/dds_consumer/README.md b/plugins/inputs/dds_consumer/README.md new file mode 100644 index 0000000000000..29b7ca566fa4d --- /dev/null +++ b/plugins/inputs/dds_consumer/README.md @@ -0,0 +1,134 @@ +# DDS Consumer Input Plugin + +The DDS consumer plugin reads metrics over DDS by creating readers defined in [XML App Creation](https://community.rti.com/static/documentation/connext-dds/5.3.1/doc/manuals/connext_dds/xml_application_creation/RTI_ConnextDDS_CoreLibraries_XML_AppCreation_GettingStarted.pdf) configurations. This plugin converts received DDS data to JSON data and adds to a Telegraf output plugin. + +## Configuration + +```toml +[[inputs.dds_consumer]] + ## XML configuration file path + config_path = "example_configs/ShapeExample.xml" + + ## Configuration name for DDS Participant from a description in XML + participant_config = "MyParticipantLibrary::Zero" + + ## Configuration name for DDS DataReader from a description in XML + reader_config = "MySubscriber::MySquareReader" + + # Tag key is an array of keys that should be added as tags. + tag_keys = ["color"] + + # Override the base name of the measurement + name_override = "shapes" + + ## Data format to consume. + data_format = "json" +``` + +## Prerequisites + +- RTI Connext DDS Connector for Go must be installed on the system +- Valid DDS XML configuration file with defined participants, topics, and data readers +- Network connectivity to DDS domain + +## How it Works + +1. The plugin creates a DDS participant using the specified XML configuration +2. It establishes a DataReader using the configured reader settings +3. The plugin continuously waits for and processes incoming DDS samples +4. Each DDS sample is converted to JSON format +5. The JSON data is parsed into Telegraf metrics using the configured tag keys +6. Metrics are forwarded to configured Telegraf output plugins + +## XML Configuration + +The plugin requires an XML configuration file that defines: + +- Domain participants +- Publishers and subscribers +- Topics and data types +- QoS settings +- DataReaders and DataWriters + +Example XML structure: +```xml + + + + + + + + + + + + + + +``` + +## Tag Processing + +The `tag_keys` configuration allows you to specify which fields from the DDS data should be treated as tags rather than fields in the resulting metrics. This is useful for: + +- Categorizing data by source, type, or other identifiers +- Creating time series with different tag combinations +- Filtering and grouping data in downstream processing + +## Example Usage + +Example configuration files are provided in this directory: +- `example_config.xml` - Sample DDS XML configuration +- `example_telegraf.conf` - Sample Telegraf configuration using the DDS plugin + +### Generate config with DDS input & InfluxDB output plugins: + +```bash +./telegraf --input-filter dds_consumer --output-filter influxdb config +``` + +### Generate a config file with DDS input & file output plugins: +```bash +./telegraf --input-filter dds_consumer --output-filter file config > dds_to_file.conf +``` + +### Run Telegraf with DDS consumer: +```bash +./telegraf --config ./dds_to_file.conf +``` + +When running with the `dds_consumer` plugin, ensure that the XML file for DDS configurations is located at the `config_path` specified in your Telegraf TOML config. + +## Testing + +You can test the plugin with the [RTI Shapes Demo](https://www.rti.com/free-trial/shapes-demo) by: + +1. Publishing data with "Square" topic using Shapes Demo +2. Configuring the plugin to read from the "Square" topic +3. Observing metrics in your configured output + +## Troubleshooting + +### Common Issues + +1. **DDS Domain Connectivity**: Ensure all participants are on the same DDS domain +2. **XML Configuration**: Verify XML file path and participant/reader names +3. **Topic Matching**: Confirm topic names and data types match between publishers and subscribers +4. **QoS Compatibility**: Check that QoS settings are compatible between writers and readers + +### Debug Tips + +- Enable debug logging in Telegraf to see detailed plugin operation +- Use RTI tools like `rtiddsping` to verify DDS connectivity +- Validate XML configuration with RTI tools before using with Telegraf +- Check that the RTI Connext DDS environment is properly configured + +## Metrics + +The plugin generates metrics based on the DDS data received. The metric name can be: +- Automatically derived from the DDS topic name +- Overridden using the `name_override` configuration +- Dynamically set based on data content (if using `json_name_key`) + +Fields are created from all numeric data in the DDS samples, while configured tag keys become metric tags for categorization and filtering. \ No newline at end of file diff --git a/plugins/inputs/dds_consumer/dds_consumer.go b/plugins/inputs/dds_consumer/dds_consumer.go new file mode 100644 index 0000000000000..86bad2239a61f --- /dev/null +++ b/plugins/inputs/dds_consumer/dds_consumer.go @@ -0,0 +1,162 @@ +//go:build dds + +/***************************************************************************** +* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. * +* * +* No duplications, whole or partial, manual or electronic, may be made * +* without express written permission. Any such copies, or revisions thereof,* +* must display this notice unaltered. * +* This code contains trade secrets of Real-Time Innovations, Inc. * +* * +*****************************************************************************/ + +package dds_consumer + +import ( + "log" + "time" + + "github.com/influxdata/telegraf" + "github.com/influxdata/telegraf/plugins/inputs" + "github.com/influxdata/telegraf/plugins/parsers/json" + + // NOTE: This import requires the RTI Connext DDS Connector for Go + // To install: go get github.com/rticommunity/rticonnextdds-connector-go + rti "github.com/rticommunity/rticonnextdds-connector-go" +) + +type DDSConsumer struct { + // XML configuration file path + ConfigFilePath string `toml:"config_path"` + // XML configuration name for DDS Participant + ParticipantConfig string `toml:"participant_config"` + // XML configuration names for DDS Readers + ReaderConfig string `toml:"reader_config"` + TagKeys []string `toml:"tag_keys"` + + // RTI Connext Connector entities + connector *rti.Connector + reader *rti.Input + + // Telegraf entities + parser *json.Parser + acc telegraf.Accumulator +} + +// Default configurations +var sampleConfig = ` + ## XML configuration file path + config_path = "example_configs/ShapeExample.xml" + + ## Configuration name for DDS Participant from a description in XML + participant_config = "MyParticipantLibrary::Zero" + + ## Configuration name for DDS DataReader from a description in XML + reader_config = "MySubscriber::MySquareReader" + + ## Tag key is an array of keys that should be added as tags. + tag_keys = ["color"] + + ## Override the base name of the measurement + name_override = "shapes" +` + +func checkFatalError(err error) { + if err != nil { + log.Fatalln("ERROR:", err) + } +} + +func checkError(err error) { + if err != nil { + log.Println("ERROR:", err) + } +} + +func (d *DDSConsumer) SampleConfig() string { + return sampleConfig +} + +func (d *DDSConsumer) Description() string { + return "Read metrics from DDS" +} + +func (d *DDSConsumer) Start(acc telegraf.Accumulator) error { + // Keep the Telegraf accumulator internally + d.acc = acc + + var err error + + // Create a Connector entity + d.connector, err = rti.NewConnector(d.ParticipantConfig, d.ConfigFilePath) + checkFatalError(err) + + // Get a DDS reader + d.reader, err = d.connector.GetInput(d.ReaderConfig) + checkFatalError(err) + + // Initialize JSON parser + d.parser = &json.Parser{ + MetricName: "dds", + TagKeys: d.TagKeys, + } + err = d.parser.Init() + checkFatalError(err) + + // Start a thread for ingesting DDS + go d.process() + + return nil +} + +func (d *DDSConsumer) Stop() { + d.connector.Delete() +} + +// Take DDS samples from the DataReader and ingest them to Telegraf outputs +func (d *DDSConsumer) process() { + for { + d.connector.Wait(-1) + d.reader.Take() + numOfSamples, err := d.reader.Samples.GetLength() + checkError(err) + if err != nil { + continue + } + + for i := 0; i < numOfSamples; i++ { + valid, err := d.reader.Infos.IsValid(i) + checkError(err) + if err != nil { + continue + } + if valid { + json, err := d.reader.Samples.GetJSON(i) + checkError(err) + ts, err := d.reader.Infos.GetSourceTimestamp(i) + checkError(err) + go func(jsonStr string) { + // Parse the JSON object to metrics + metrics, err := d.parser.Parse([]byte(jsonStr)) + checkError(err) + + // Iterate the metrics + for _, metric := range metrics { + // Add a metric to an output plugin + d.acc.AddFields(metric.Name(), metric.Fields(), metric.Tags(), time.Unix(0, ts)) + } + }(json) + } + } + } +} + +func (d *DDSConsumer) Gather(acc telegraf.Accumulator) error { + return nil +} + +func init() { + inputs.Add("dds_consumer", func() telegraf.Input { + return &DDSConsumer{} + }) +} diff --git a/plugins/inputs/dds_consumer/dds_consumer_stub.go b/plugins/inputs/dds_consumer/dds_consumer_stub.go new file mode 100644 index 0000000000000..9c1a9514cb519 --- /dev/null +++ b/plugins/inputs/dds_consumer/dds_consumer_stub.go @@ -0,0 +1,74 @@ +//go:build !dds + +/***************************************************************************** +* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. * +* * +* No duplications, whole or partial, manual or electronic, may be made * +* without express written permission. Any such copies, or revisions thereof,* +* must display this notice unaltered. * +* This code contains trade secrets of Real-Time Innovations, Inc. * +* * +*****************************************************************************/ + +package dds_consumer + +import ( + "errors" + + "github.com/influxdata/telegraf" + "github.com/influxdata/telegraf/plugins/inputs" +) + +// Stub implementation for testing without RTI DDS dependency +type DDSConsumer struct { + ConfigFilePath string `toml:"config_path"` + ParticipantConfig string `toml:"participant_config"` + ReaderConfig string `toml:"reader_config"` + TagKeys []string `toml:"tag_keys"` +} + +var sampleConfig = ` + ## XML configuration file path + config_path = "example_configs/ShapeExample.xml" + + ## Configuration name for DDS Participant from a description in XML + participant_config = "MyParticipantLibrary::Zero" + + ## Configuration name for DDS DataReader from a description in XML + reader_config = "MySubscriber::MySquareReader" + + # Tag key is an array of keys that should be added as tags. + tag_keys = ["color"] + + # Override the base name of the measurement + name_override = "shapes" + + ## Data format to consume. + data_format = "json" +` + +func (d *DDSConsumer) SampleConfig() string { + return sampleConfig +} + +func (d *DDSConsumer) Description() string { + return "Read metrics from DDS (requires RTI Connext DDS - build with -tags dds)" +} + +func (d *DDSConsumer) Start(acc telegraf.Accumulator) error { + return errors.New("DDS Consumer plugin requires RTI Connext DDS. Build with -tags dds and install RTI dependencies") +} + +func (d *DDSConsumer) Stop() { + // No-op for stub +} + +func (d *DDSConsumer) Gather(acc telegraf.Accumulator) error { + return nil +} + +func init() { + inputs.Add("dds_consumer", func() telegraf.Input { + return &DDSConsumer{} + }) +} diff --git a/plugins/inputs/dds_consumer/example_config.xml b/plugins/inputs/dds_consumer/example_config.xml new file mode 100644 index 0000000000000..194de2bb2657d --- /dev/null +++ b/plugins/inputs/dds_consumer/example_config.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RELIABLE_RELIABILITY_QOS + + + TRANSIENT_LOCAL_DURABILITY_QOS + + + KEEP_LAST_HISTORY_QOS + 10 + + + + + + + + RELIABLE_RELIABILITY_QOS + + + + + + + \ No newline at end of file diff --git a/plugins/inputs/dds_consumer/example_telegraf.conf b/plugins/inputs/dds_consumer/example_telegraf.conf new file mode 100644 index 0000000000000..7017a506b4ce3 --- /dev/null +++ b/plugins/inputs/dds_consumer/example_telegraf.conf @@ -0,0 +1,207 @@ +# Telegraf Configuration with DDS Consumer Input Plugin + +# Global tags can be specified here in key="value" format. +[global_tags] + # dc = "us-east-1" # will tag all metrics with dc=us-east-1 + # rack = "1a" + +# Configuration for telegraf agent +[agent] + ## Default data collection interval for all inputs + interval = "10s" + ## Rounds collection interval to 'interval' + ## ie, if interval="10s" then always collect on :00, :10, :20, etc. + round_interval = true + + ## Telegraf will send metrics to outputs in batches of at most + ## metric_batch_size metrics. This controls the size of writes that + ## Telegraf sends to output plugins. + metric_batch_size = 1000 + + ## Maximum number of unwritten metrics per output. Increasing this value + ## allows for longer periods of output downtime without dropping metrics at the + ## cost of higher maximum memory usage. + metric_buffer_limit = 10000 + + ## Collection jitter is used to jitter the collection by a random amount. + ## Each plugin will sleep for a random time within jitter before collecting. + ## This can be used to avoid many plugins querying things like sysfs at the + ## same time, which can have a measurable effect on the system. + collection_jitter = "0s" + + ## Default flushing interval for all outputs. Maximum flush_interval will be + ## flush_interval + flush_jitter + flush_interval = "10s" + + ## Jitter the flush interval by a random amount. This is primarily to avoid + ## large write spikes for users running a large number of telegraf instances. + ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s + flush_jitter = "0s" + + ## By default or when set to "0s", precision will be set to the same + ## timestamp order as the collection interval, with the maximum being 1s. + ## ie, when interval = "10s", precision will be "1s" + ## when interval = "250ms", precision will be "1ms" + ## Precision will NOT be used for service inputs. It is up to each individual + ## service input to set the timestamp at the appropriate precision. + ## Valid time units are "ns", "us" (or "µs"), "ms", "s". + precision = "" + + ## Log at debug level. + # debug = false + ## Log only error level messages. + # quiet = false + + ## Log target controls the destination for logs and can be one of "file", + ## "stderr" or, on Windows, "eventlog". When set to "file", the output file + ## is determined by the "logfile" setting. + # logtarget = "file" + + ## Name of the file to be logged to when using the "file" logtarget. If set to + ## the empty string then logs are written to stderr. + # logfile = "" + + ## The logfile will be rotated after the time interval specified. When set + ## to 0 no time based rotation is performed. Logs are rotated only when + ## written to, if there is no log activity rotation may be delayed. + # logfile_rotation_interval = "0d" + + ## The logfile will be rotated when it becomes larger than the specified + ## size. When set to 0 no size based rotation is performed. + # logfile_rotation_max_size = "0MB" + + ## Maximum number of rotated archives to keep, any older logs are deleted. + ## If set to -1, no archives are removed. + # logfile_rotation_max_archives = 5 + + ## Pick a timezone to use when logging or type 'local' for local time. + ## Example: America/New_York + # log_with_timezone = "" + + ## Override default hostname, if empty use os.Hostname() + hostname = "" + ## If set to true, do no set the "host" tag in the telegraf agent. + omit_hostname = false + +############################################################################### +# OUTPUT PLUGINS # +############################################################################### + +# Configuration for sending metrics to InfluxDB +[[outputs.influxdb]] + ## The URLs of the InfluxDB cluster nodes. + ## + ## Multiple URLs can be specified for a single cluster, only ONE of the + ## urls will be written to each interval. + ## ex: urls = ["http://127.0.0.1:8086"] + urls = ["http://localhost:8086"] + + ## The target database for metrics; will be created as needed. + ## For UDP url endpoint database needs to be configured on server side. + database = "telegraf" + + ## The value of this tag will be used to determine the database. If this + ## tag is not set the 'database' option is used as the default. + # database_tag = "" + + ## If true, the 'database_tag' will not be included in the written metric. + # exclude_database_tag = false + + ## If true, no CREATE DATABASE queries will be sent. Set to true when using + ## Telegraf with a user that does not have permissions to create databases + ## or when the database already exists. + # skip_database_creation = false + + ## Name of existing retention policy to write to. Empty string writes to + ## the default retention policy. Only takes effect when using HTTP. + retention_policy = "" + + ## The value of this tag will be used to determine the retention policy. If this + ## tag is not set the 'retention_policy' option is used as the default. + # retention_policy_tag = "" + + ## If true, the 'retention_policy_tag' will not be included in the written metric. + # exclude_retention_policy_tag = false + + ## Write consistency (clusters only), can be: "any", "one", "quorum", "all". + ## Only takes effect when using HTTP. + write_consistency = "any" + + ## Timeout for HTTP messages. + timeout = "5s" + + ## HTTP Basic Auth + # username = "telegraf" + # password = "metricsmetricsmetricsmetrics" + + ## HTTP User-Agent + # user_agent = "telegraf" + + ## UDP payload size is the maximum packet size to send. + # udp_payload = "512B" + + ## Optional TLS Config for use on HTTP connections. + # tls_ca = "/etc/telegraf/ca.pem" + # tls_cert = "/etc/telegraf/cert.pem" + # tls_key = "/etc/telegraf/key.pem" + ## Use TLS but skip chain & host verification + # insecure_skip_verify = false + + ## HTTP Proxy override, if unset values the standard proxy environment + ## variables are consulted to determine which proxy, if any, should be used. + # http_proxy = "http://corporate.proxy:3128" + + ## Additional HTTP headers + # http_headers = {"X-Special-Header" = "Special-Value"} + + ## HTTP Content-Encoding for write request body, can be set to "gzip" to + ## compress body or "identity" to apply no encoding. + # content_encoding = "identity" + + ## When true, Telegraf will output unsigned integers as unsigned values, + ## i.e.: "42u". You will need a version of InfluxDB supporting unsigned + ## integer values. Enabling this option will result in field type errors if + ## existing data has been written. + # influx_uint_support = false + +############################################################################### +# INPUT PLUGINS # +############################################################################### + +# DDS Consumer Input Plugin +[[inputs.dds_consumer]] + ## XML configuration file path for DDS + ## This file defines participants, topics, and data readers + config_path = "/path/to/your/dds_config.xml" + + ## Configuration name for DDS Participant from the XML description + ## Format: "LibraryName::ParticipantName" + participant_config = "MyParticipantLibrary::Zero" + + ## Configuration name for DDS DataReader from the XML description + ## Format: "SubscriberName::ReaderName" + reader_config = "MySubscriber::MySquareReader" + + ## Tag keys specify which fields from DDS data should become metric tags + ## instead of metric fields. This is useful for categorizing data. + tag_keys = ["color", "type", "source"] + + ## Override the base name of the measurement + ## If not set, the topic name will be used + name_override = "shapes" + +# Example: Multiple DDS readers for different topics +[[inputs.dds_consumer]] + config_path = "/path/to/your/dds_config.xml" + participant_config = "MyParticipantLibrary::Zero" + reader_config = "MySubscriber::MyCircleReader" + tag_keys = ["color"] + name_override = "circles" + +# Example: DDS monitoring input for system metrics +[[inputs.dds_consumer]] + config_path = "/path/to/monitoring_config.xml" + participant_config = "MonitoringLib::MonitorParticipant" + reader_config = "MonitorSubscriber::SystemMetricsReader" + tag_keys = ["hostname", "component"] + name_override = "dds_system_metrics" \ No newline at end of file