telegraf/plugins/outputs/cloud_pubsub
Sebastian Spaink d67f75e557
docs: Remove warning not to remove go:embed (#11797)
Co-authored-by: Joshua Powers <powersj@fastmail.com>
2022-09-13 12:47:58 -05:00
..
README.md chore: embed sample configurations into README for outputs (#11182) 2022-05-25 08:48:59 -06:00
cloud_pubsub.go docs: Remove warning not to remove go:embed (#11797) 2022-09-13 12:47:58 -05:00
cloud_pubsub_test.go feat: Migrate influx and influx_upstream parsers to new style (#11432) 2022-07-06 15:23:13 -05:00
sample.conf chore(outputs): migrate sample configs into separate files (#11131) 2022-05-18 11:30:06 -05:00
topic_gcp.go Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984) 2021-03-22 12:21:36 -05:00
topic_stubbed.go feat: Migrate influx and influx_upstream parsers to new style (#11432) 2022-07-06 15:23:13 -05:00

README.md

Google Cloud PubSub Output Plugin

The GCP PubSub plugin publishes metrics to a Google Cloud PubSub topic as one of the supported output data formats.

Configuration

# Publish Telegraf metrics to a Google Cloud PubSub topic
[[outputs.cloud_pubsub]]
  ## Required. Name of Google Cloud Platform (GCP) Project that owns
  ## the given PubSub topic.
  project = "my-project"

  ## Required. Name of PubSub topic to publish metrics to.
  topic = "my-topic"

  ## Required. Data format to consume.
  ## 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_INPUT.md
  data_format = "influx"

  ## Optional. Filepath for GCP credentials JSON file to authorize calls to
  ## PubSub APIs. If not set explicitly, Telegraf will attempt to use
  ## Application Default Credentials, which is preferred.
  # credentials_file = "path/to/my/creds.json"

  ## Optional. If true, will send all metrics per write in one PubSub message.
  # send_batched = true

  ## The following publish_* parameters specifically configures batching
  ## requests made to the GCP Cloud PubSub API via the PubSub Golang library. Read
  ## more here: https://godoc.org/cloud.google.com/go/pubsub#PublishSettings

  ## Optional. Send a request to PubSub (i.e. actually publish a batch)
  ## when it has this many PubSub messages. If send_batched is true,
  ## this is ignored and treated as if it were 1.
  # publish_count_threshold = 1000

  ## Optional. Send a request to PubSub (i.e. actually publish a batch)
  ## when it has this many PubSub messages. If send_batched is true,
  ## this is ignored and treated as if it were 1
  # publish_byte_threshold = 1000000

  ## Optional. Specifically configures requests made to the PubSub API.
  # publish_num_go_routines = 2

  ## Optional. Specifies a timeout for requests to the PubSub API.
  # publish_timeout = "30s"

  ## Optional. If true, published PubSub message data will be base64-encoded.
  # base64_data = false

  ## Optional. PubSub attributes to add to metrics.
  # [outputs.cloud_pubsub.attributes]
  #   my_attr = "tag_value"