Skip to content

Commit

Permalink
updated dds plugins with line protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoungho committed Aug 8, 2019
1 parent 83926c1 commit 1faa2ab
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 634 deletions.
67 changes: 0 additions & 67 deletions example_configs/dds_consumer_lp.xml

This file was deleted.

67 changes: 0 additions & 67 deletions example_configs/dds_producer.xml

This file was deleted.

96 changes: 65 additions & 31 deletions example_configs/ddslp_to_file.conf
Expand Up @@ -9,9 +9,9 @@
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
#
# Environment variables can be used anywhere in this config file, simply prepend
# them with $. For strings the variable must be within quotes (ie, "$STR_VAR"),
# for numbers and booleans they should be plain (ie, $INT_VAR, $BOOL_VAR)
# Environment variables can be used anywhere in this config file, simply surround
# them with ${}. For strings the variable must be within quotes (ie, "${STR_VAR}"),
# for numbers and booleans they should be plain (ie, ${INT_VAR}, ${BOOL_VAR})


# Global tags can be specified here in key="value" format.
Expand All @@ -25,7 +25,7 @@
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "1s"
interval = "10s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
Expand All @@ -35,10 +35,7 @@
## This controls the size of writes that Telegraf sends to output plugins.
metric_batch_size = 1000

## For failed writes, telegraf will cache metric_buffer_limit metrics for each
## output, and will flush this buffer on a successful write. Oldest metrics
## are dropped first when this buffer fills.
## This buffer only fills when writes fail to output plugin(s).
## Maximum number of unwritten metrics per output.
metric_buffer_limit = 10000

## Collection jitter is used to jitter the collection by a random amount.
Expand All @@ -49,7 +46,7 @@

## Default flushing interval for all outputs. Maximum flush_interval will be
## flush_interval + flush_jitter
flush_interval = "1s"
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
Expand All @@ -64,13 +61,25 @@
## Valid time units are "ns", "us" (or "µs"), "ms", "s".
precision = ""

## Logging configuration:
## Run telegraf with debug log messages.
debug = false
## Run telegraf in quiet mode (error log messages only).
quiet = false
## Specify the log file name. The empty string means to log to stderr.
logfile = ""
## Log at debug level.
# debug = false
## Log only error level messages.
# quiet = false

## Log file name, the empty string means to log to stderr.
# logfile = ""

## The logfile will be rotated after the time interval specified. When set
## to 0 no time based rotation is performed.
# 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

## Override default hostname, if empty use os.Hostname()
hostname = ""
Expand All @@ -82,23 +91,36 @@
# OUTPUT PLUGINS #
###############################################################################


# Send telegraf metrics to file(s)
[[outputs.file]]
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]

## The file will be rotated after the time interval specified. When set
## to 0 no time based rotation is performed.
# 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.
# rotation_max_size = "0MB"

## Maximum number of rotated archives to keep, any older logs are deleted.
## If set to -1, no archives are removed.
# rotation_max_archives = 5

## Data format to output.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"



###############################################################################
# PROCESSOR PLUGINS #
###############################################################################


# # Convert values to another metric value type
# [[processors.converter]]
# ## Tags to convert
Expand Down Expand Up @@ -133,9 +155,12 @@
# ## Name of the field to map
# field = "status"
#
# ## Destination field to be used for the mapped value. By default the source
# ## field is used, overwriting the original value.
# # dest = "status_code"
# ## Name of the tag to map
# # tag = "status"
#
# ## Destination tag or field to be used for the mapped value. By default the
# ## source tag or field is used, overwriting the original value.
# dest = "status_code"
#
# ## Default value to be used for all values not contained in the mapping
# ## table. When unset, the unmodified value for the field will be used if no
Expand All @@ -145,7 +170,7 @@
# ## Table of mappings
# [processors.enum.mapping.value_mappings]
# green = 1
# yellow = 2
# amber = 2
# red = 3


Expand Down Expand Up @@ -310,11 +335,11 @@
# # add_aggregate_fields = []



###############################################################################
# AGGREGATOR PLUGINS #
###############################################################################


# # Keep the aggregate basicstats of each metric passing through.
# [[aggregators.basicstats]]
# ## The period on which to flush & clear the aggregator.
Expand All @@ -327,6 +352,18 @@
# # stats = ["count", "min", "max", "mean", "stdev", "s2", "sum"]


# # Report the final metric of a series
# [[aggregators.final]]
# ## The period on which to flush & clear the aggregator.
# period = "30s"
# ## If true, the original metric will be dropped by the
# ## aggregator and will not get sent to the output plugins.
# drop_original = false
#
# ## The time that a series is not updated until considering it final.
# series_timeout = "5m"


# # Create aggregate histograms.
# [[aggregators.histogram]]
# ## The period in which to flush the aggregator.
Expand All @@ -336,6 +373,10 @@
# ## aggregator and will not get sent to the output plugins.
# drop_original = false
#
# ## If true, the histogram will be reset on flush instead
# ## of accumulating the results.
# reset = false
#
# ## Example config that aggregates all fields of the metric.
# # [[aggregators.histogram.config]]
# # ## The set of buckets.
Expand Down Expand Up @@ -375,7 +416,6 @@
# fields = []



###############################################################################
# INPUT PLUGINS #
###############################################################################
Expand All @@ -385,14 +425,8 @@
# SERVICE INPUT PLUGINS #
###############################################################################


# Read metrics from DDS
[[inputs.dds_consumer_lp]]
## XML configuration file path
config_path = "example_configs/dds_consumer_lp.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::MyReader"
domain_id = "0"

44 changes: 0 additions & 44 deletions example_configs/line_protocol.xml

This file was deleted.

0 comments on commit 1faa2ab

Please sign in to comment.