Update changelog and docs for application_insights plugin
This commit is contained in:
parent
863af9d1d4
commit
2948dec6f5
|
@ -25,6 +25,7 @@
|
||||||
### New Outputs
|
### New Outputs
|
||||||
|
|
||||||
- [http](./plugins/outputs/http/README.md) - Contributed by @Dark0096
|
- [http](./plugins/outputs/http/README.md) - Contributed by @Dark0096
|
||||||
|
- [application_insights](./plugins/outputs/application_insights/README.md): Contribute by @karolz-ms
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
- [#4096](https://github.com/influxdata/telegraf/pull/4096): Add topk processor plugin.
|
- [#4096](https://github.com/influxdata/telegraf/pull/4096): Add topk processor plugin.
|
||||||
- [#4114](https://github.com/influxdata/telegraf/pull/4114): Add cursor metrics to mongodb input.
|
- [#4114](https://github.com/influxdata/telegraf/pull/4114): Add cursor metrics to mongodb input.
|
||||||
- [#3455](https://github.com/influxdata/telegraf/pull/3455): Add tag/integer pair for result to net_response.
|
- [#3455](https://github.com/influxdata/telegraf/pull/3455): Add tag/integer pair for result to net_response.
|
||||||
|
- [#4010](https://github.com/influxdata/telegraf/pull/3455): Add application_insights output plugin.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
|
|
@ -282,6 +282,7 @@ formats may be used with input plugins supporting the `data_format` option:
|
||||||
* [influxdb](./plugins/outputs/influxdb)
|
* [influxdb](./plugins/outputs/influxdb)
|
||||||
* [amon](./plugins/outputs/amon)
|
* [amon](./plugins/outputs/amon)
|
||||||
* [amqp](./plugins/outputs/amqp) (rabbitmq)
|
* [amqp](./plugins/outputs/amqp) (rabbitmq)
|
||||||
|
* [application_insights](./plugins/outputs/application_insights)
|
||||||
* [aws kinesis](./plugins/outputs/kinesis)
|
* [aws kinesis](./plugins/outputs/kinesis)
|
||||||
* [aws cloudwatch](./plugins/outputs/cloudwatch)
|
* [aws cloudwatch](./plugins/outputs/cloudwatch)
|
||||||
* [cratedb](./plugins/outputs/cratedb)
|
* [cratedb](./plugins/outputs/cratedb)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
When distributed in a binary form, Telegraf may contain portions of the
|
When distributed in a binary form, Telegraf may contain portions of the
|
||||||
following works:
|
following works:
|
||||||
|
|
||||||
|
- code.cloudfoundry.org/clock [APACHE](https://github.com/cloudfoundry/clock/blob/master/LICENSE)
|
||||||
- collectd.org [MIT](https://github.com/collectd/go-collectd/blob/master/LICENSE)
|
- collectd.org [MIT](https://github.com/collectd/go-collectd/blob/master/LICENSE)
|
||||||
- github.com/aerospike/aerospike-client-go [APACHE](https://github.com/aerospike/aerospike-client-go/blob/master/LICENSE)
|
- github.com/aerospike/aerospike-client-go [APACHE](https://github.com/aerospike/aerospike-client-go/blob/master/LICENSE)
|
||||||
- github.com/amir/raidman [PUBLIC DOMAIN](https://github.com/amir/raidman/blob/master/UNLICENSE)
|
- github.com/amir/raidman [PUBLIC DOMAIN](https://github.com/amir/raidman/blob/master/UNLICENSE)
|
||||||
|
@ -51,6 +52,7 @@ following works:
|
||||||
- github.com/kballard/go-shellquote [MIT](https://github.com/kballard/go-shellquote/blob/master/LICENSE)
|
- github.com/kballard/go-shellquote [MIT](https://github.com/kballard/go-shellquote/blob/master/LICENSE)
|
||||||
- github.com/lib/pq [MIT](https://github.com/lib/pq/blob/master/LICENSE.md)
|
- github.com/lib/pq [MIT](https://github.com/lib/pq/blob/master/LICENSE.md)
|
||||||
- github.com/matttproud/golang_protobuf_extensions [APACHE](https://github.com/matttproud/golang_protobuf_extensions/blob/master/LICENSE)
|
- github.com/matttproud/golang_protobuf_extensions [APACHE](https://github.com/matttproud/golang_protobuf_extensions/blob/master/LICENSE)
|
||||||
|
- github.com/Microsoft/ApplicationInsights-Go [APACHE](https://github.com/Microsoft/ApplicationInsights-Go/blob/master/LICENSE)
|
||||||
- github.com/Microsoft/go-winio [MIT](https://github.com/Microsoft/go-winio/blob/master/LICENSE)
|
- github.com/Microsoft/go-winio [MIT](https://github.com/Microsoft/go-winio/blob/master/LICENSE)
|
||||||
- github.com/miekg/dns [BSD](https://github.com/miekg/dns/blob/master/LICENSE)
|
- github.com/miekg/dns [BSD](https://github.com/miekg/dns/blob/master/LICENSE)
|
||||||
- github.com/naoina/go-stringutil [MIT](https://github.com/naoina/go-stringutil/blob/master/LICENSE)
|
- github.com/naoina/go-stringutil [MIT](https://github.com/naoina/go-stringutil/blob/master/LICENSE)
|
||||||
|
|
|
@ -1,32 +1,43 @@
|
||||||
# Application Insights Output Plugin
|
# Application Insights Output Plugin
|
||||||
|
|
||||||
This plugin writes telegraf metrics to Azure Application Insights
|
This plugin writes telegraf metrics to [Azure Application Insights](https://azure.microsoft.com/en-us/services/application-insights/).
|
||||||
|
|
||||||
## Configuration
|
### Configuration:
|
||||||
```
|
```toml
|
||||||
[[outputs.application_insights]]
|
[[outputs.application_insights]]
|
||||||
## Instrumentation key of the Application Insights resource.
|
## Instrumentation key of the Application Insights resource.
|
||||||
instrumentationKey = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
|
instrumentation_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
|
||||||
|
|
||||||
## Timeout on close. If not provided, will default to 5s. 0s means no timeout (not recommended).
|
## Timeout for closing (default: 5s).
|
||||||
# timeout = "5s"
|
# timeout = "5s"
|
||||||
|
|
||||||
## Determines whether diagnostic logging (for Application Insights endpoint traffic) is enabled. Default is false.
|
## Enable additional diagnostic logging.
|
||||||
# enable_diagnosic_logging = "true"
|
# enable_diagnosic_logging = false
|
||||||
|
|
||||||
## ContextTagSources dictionary instructs the Application Insights plugin to set Application Insights context tags using metric properties.
|
## Context Tag Sources add Application Insights context tags to a tag value.
|
||||||
## In this dictionary keys are Application Insights context tags to set, and values are names of metric properties to use as source of data.
|
##
|
||||||
## For example:
|
## For list of allowed context tag keys see:
|
||||||
|
## https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go
|
||||||
# [outputs.application_insights.context_tag_sources]
|
# [outputs.application_insights.context_tag_sources]
|
||||||
# "ai.cloud.role" = "kubernetes_container_name"
|
# "ai.cloud.role" = "kubernetes_container_name"
|
||||||
# "ai.cloud.roleInstance" = "kubernetes_pod_name"
|
# "ai.cloud.roleInstance" = "kubernetes_pod_name"
|
||||||
## will set the ai.cloud.role context tag to the value of kubernetes_container_name property (if present),
|
|
||||||
## and the ai.cloud.roleInstance context tag to the value of kubernetes_pod_name property.
|
|
||||||
## For list of all context tag keys see https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Implementation notes
|
|
||||||
- Every field in a metric will result in a separate metric telemetry. For example, the metric `foo,host=a first=42,second=43 1525293034000000000`
|
### Metric Encoding:
|
||||||
will result in two metric telemetry records sent to Application Insights: first named `foo_first` and value of 42, and the secod named `foo_second` and a value of 43 (both having property `host` set to "a". \
|
|
||||||
\
|
For each field an Application Insights Telemetry record is created named based
|
||||||
The exception is a single-field metric with a value named `value`, in that case the single metric telemetry created will use just the whole metric name without the "value" suffix. For example, `bar,host=a value=23 1525293034000000000` will result in a telemetry named `bar` and value 23.
|
on the measurement name and field.
|
||||||
|
|
||||||
|
|
||||||
|
**Example:** Create the telemetry records `foo_first` and `foo_second`:
|
||||||
|
```
|
||||||
|
foo,host=a first=42,second=43 1525293034000000000
|
||||||
|
```
|
||||||
|
|
||||||
|
In the special case of a single field named `value`, a single telemetry record is created named using only the measurement name
|
||||||
|
|
||||||
|
**Example:** Create a telemetry record `foo`:
|
||||||
|
```
|
||||||
|
bar,host=a value=42 1525293034000000000
|
||||||
|
```
|
||||||
|
|
|
@ -41,24 +41,22 @@ const (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
sampleConfig = `
|
sampleConfig = `
|
||||||
## Instrumentation key of the Application Insights resource.
|
## Instrumentation key of the Application Insights resource.
|
||||||
instrumentation_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
|
instrumentation_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
|
||||||
|
|
||||||
## Timeout on close. If not provided, will default to 5s. 0s means no timeout (not recommended).
|
## Timeout for closing (default: 5s).
|
||||||
# timeout = "5s"
|
# timeout = "5s"
|
||||||
|
|
||||||
## Determines whether diagnostic logging (for Application Insights endpoint traffic) is enabled. Default is false.
|
## Enable additional diagnostic logging.
|
||||||
# enable_diagnosic_logging = "true"
|
# enable_diagnosic_logging = false
|
||||||
|
|
||||||
## ContextTagSources dictionary instructs the Application Insights plugin to set Application Insights context tags using metric properties.
|
## Context Tag Sources add Application Insights context tags to a tag value.
|
||||||
## In this dictionary keys are Application Insights context tags to set, and values are names of metric properties to use as source of data.
|
##
|
||||||
## For example:
|
## For list of allowed context tag keys see:
|
||||||
# [outputs.application_insights.context_tag_sources]
|
## https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go
|
||||||
# "ai.cloud.role" = "kubernetes_container_name"
|
# [outputs.application_insights.context_tag_sources]
|
||||||
# "ai.cloud.roleInstance" = "kubernetes_pod_name"
|
# "ai.cloud.role" = "kubernetes_container_name"
|
||||||
## will set the ai.cloud.role context tag to the value of kubernetes_container_name property (if present),
|
# "ai.cloud.roleInstance" = "kubernetes_pod_name"
|
||||||
## and the ai.cloud.roleInstance context tag to the value of kubernetes_pod_name property.
|
|
||||||
## For list of all context tag keys see https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go
|
|
||||||
`
|
`
|
||||||
is32Bit bool
|
is32Bit bool
|
||||||
is32BitChecked bool
|
is32BitChecked bool
|
||||||
|
@ -69,7 +67,7 @@ func (a *ApplicationInsights) SampleConfig() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ApplicationInsights) Description() string {
|
func (a *ApplicationInsights) Description() string {
|
||||||
return "Send telegraf metrics to Azure Application Insights"
|
return "Send metrics to Azure Application Insights"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ApplicationInsights) Connect() error {
|
func (a *ApplicationInsights) Connect() error {
|
||||||
|
|
Loading…
Reference in New Issue