Skip to content

Commit

Permalink
Sumo Logic output plugin (influxdata#8023)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek-sumo authored Sep 10, 2020
1 parent c774c9e commit da76f43
Show file tree
Hide file tree
Showing 7 changed files with 1,018 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,4 @@ For documentation on the latest development code see the [documentation index][d
* [udp](./plugins/outputs/socket_writer)
* [warp10](./plugins/outputs/warp10)
* [wavefront](./plugins/outputs/wavefront)
* [sumologic](./plugins/outputs/sumologic)
56 changes: 56 additions & 0 deletions etc/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,62 @@
# # location = "eu-north0"


# # A plugin that can transmit metrics to Sumo Logic HTTP Source
# [[outputs.sumologic]]
# ## Unique URL generated for your HTTP Metrics Source.
# ## This is the address to send metrics to.
# # url = "https://events.sumologic.net/receiver/v1/http/<UniqueHTTPCollectorCode>"
#
# ## Data format to be used for sending metrics.
# ## This will set the "Content-Type" header accordingly.
# ## Currently supported formats:
# ## * graphite - for Content-Type of application/vnd.sumologic.graphite
# ## * carbon2 - for Content-Type of application/vnd.sumologic.carbon2
# ## * prometheus - for Content-Type of application/vnd.sumologic.prometheus
# ##
# ## More information can be found at:
# ## https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#content-type-headers-for-metrics
# ##
# ## NOTE:
# ## When unset, telegraf will by default use the influx serializer which is currently unsupported
# ## in HTTP Source.
# data_format = "carbon2"
#
# ## Timeout used for HTTP request
# # timeout = "5s"
#
# ## HTTP method, one of: "POST" or "PUT". "POST" is used by default if unset.
# # method = "POST"
#
# ## Max HTTP request body size in bytes before compression (if applied).
# ## By default 1MB is recommended.
# ## NOTE:
# ## Bear in mind that in some serializer a metric even though serialized to multiple
# ## lines cannot be split any further so setting this very low might not work
# ## as expected.
# # max_request_body_size = 1_000_000
#
# ## Additional, Sumo specific options.
# ## Full list can be found here:
# ## https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#supported-http-headers
#
# ## Desired source name.
# ## Useful if you want to override the source name configured for the source.
# # source_name = ""
#
# ## Desired host name.
# ## Useful if you want to override the source host configured for the source.
# # source_host = ""
#
# ## Desired source category.
# ## Useful if you want to override the source category configured for the source.
# # source_category = ""
#
# ## Comma-separated key=value list of dimensions to apply to every metric.
# ## Custom dimensions will allow you to query your metrics at a more granular level.
# # dimensions = ""


# # Configuration for Syslog server to send metrics to
# [[outputs.syslog]]
# ## URL to connect to
Expand Down
1 change: 1 addition & 0 deletions plugins/outputs/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
_ "github.com/influxdata/telegraf/plugins/outputs/riemann_legacy"
_ "github.com/influxdata/telegraf/plugins/outputs/socket_writer"
_ "github.com/influxdata/telegraf/plugins/outputs/stackdriver"
_ "github.com/influxdata/telegraf/plugins/outputs/sumologic"
_ "github.com/influxdata/telegraf/plugins/outputs/syslog"
_ "github.com/influxdata/telegraf/plugins/outputs/warp10"
_ "github.com/influxdata/telegraf/plugins/outputs/wavefront"
Expand Down
70 changes: 70 additions & 0 deletions plugins/outputs/sumologic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Sumo Logic Output Plugin

This plugin sends metrics to [Sumo Logic HTTP Source](https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source)
in HTTP messages, encoded using one of the output data formats.

Currently metrics can be sent using one of the following data formats, supported
by Sumologic HTTP Source:

* `graphite` - for Content-Type of `application/vnd.sumologic.graphite`
* `carbon2` - for Content-Type of `application/vnd.sumologic.carbon2`
* `prometheus` - for Content-Type of `application/vnd.sumologic.prometheus`

### Configuration:

```toml
# A plugin that can send metrics to Sumo Logic HTTP metric collector.
[[outputs.sumologic]]
## Unique URL generated for your HTTP Metrics Source.
## This is the address to send metrics to.
# url = "https://events.sumologic.net/receiver/v1/http/<UniqueHTTPCollectorCode>"

## Data format to be used for sending metrics.
## This will set the "Content-Type" header accordingly.
## Currently supported formats:
## * graphite - for Content-Type of application/vnd.sumologic.graphite
## * carbon2 - for Content-Type of application/vnd.sumologic.carbon2
## * prometheus - for Content-Type of application/vnd.sumologic.prometheus
##
## More information can be found at:
## https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#content-type-headers-for-metrics
##
## NOTE:
## When unset, telegraf will by default use the influx serializer which is currently unsupported
## in HTTP Source.
data_format = "carbon2"

## Timeout used for HTTP request
# timeout = "5s"

## HTTP method, one of: "POST" or "PUT". "POST" is used by default if unset.
# method = "POST"

## Max HTTP request body size in bytes before compression (if applied).
## By default 1MB is recommended.
## NOTE:
## Bear in mind that in some serializer a metric even though serialized to multiple
## lines cannot be split any further so setting this very low might not work
## as expected.
# max_request_body_size = 1_000_000

## Additional, Sumo specific options.
## Full list can be found here:
## https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#supported-http-headers

## Desired source name.
## Useful if you want to override the source name configured for the source.
# source_name = ""

## Desired host name.
## Useful if you want to override the source host configured for the source.
# source_host = ""

## Desired source category.
## Useful if you want to override the source category configured for the source.
# source_category = ""

## Comma-separated key=value list of dimensions to apply to every metric.
## Custom dimensions will allow you to query your metrics at a more granular level.
# dimensions = ""
```
Loading

0 comments on commit da76f43

Please sign in to comment.