2018-05-15 23:05:59 +00:00
|
|
|
# Application Insights Output Plugin
|
|
|
|
|
2018-05-15 23:42:56 +00:00
|
|
|
This plugin writes telegraf metrics to [Azure Application Insights](https://azure.microsoft.com/en-us/services/application-insights/).
|
2018-05-15 23:05:59 +00:00
|
|
|
|
2018-05-15 23:42:56 +00:00
|
|
|
### Configuration:
|
|
|
|
```toml
|
2018-05-15 23:05:59 +00:00
|
|
|
[[outputs.application_insights]]
|
|
|
|
## Instrumentation key of the Application Insights resource.
|
2018-05-15 23:42:56 +00:00
|
|
|
instrumentation_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
|
2018-05-15 23:05:59 +00:00
|
|
|
|
2018-05-15 23:42:56 +00:00
|
|
|
## Timeout for closing (default: 5s).
|
2018-05-15 23:05:59 +00:00
|
|
|
# timeout = "5s"
|
|
|
|
|
2018-05-15 23:42:56 +00:00
|
|
|
## Enable additional diagnostic logging.
|
|
|
|
# enable_diagnosic_logging = false
|
2018-05-15 23:05:59 +00:00
|
|
|
|
2018-05-15 23:42:56 +00:00
|
|
|
## Context Tag Sources add Application Insights context tags to a tag value.
|
|
|
|
##
|
|
|
|
## For list of allowed context tag keys see:
|
|
|
|
## https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go
|
2018-05-15 23:05:59 +00:00
|
|
|
# [outputs.application_insights.context_tag_sources]
|
2018-05-15 23:42:56 +00:00
|
|
|
# "ai.cloud.role" = "kubernetes_container_name"
|
|
|
|
# "ai.cloud.roleInstance" = "kubernetes_pod_name"
|
2018-05-15 23:05:59 +00:00
|
|
|
```
|
|
|
|
|
2018-05-15 23:42:56 +00:00
|
|
|
|
|
|
|
### Metric Encoding:
|
|
|
|
|
|
|
|
For each field an Application Insights Telemetry record is created named based
|
|
|
|
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
|
|
|
|
```
|