Skip to content

Commit

Permalink
Move elasticsearch permission setup into new readme section
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Aug 10, 2019
1 parent 6512b7b commit 337a579
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions plugins/outputs/elasticsearch/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Elasticsearch Output Plugin for Telegraf
# Elasticsearch Output Plugin

This plugin writes to [Elasticsearch](https://www.elastic.co) via HTTP using Elastic (<http://olivere.github.io/elastic/).>

It supports Elasticsearch releases from 5.x up to 7.x.

## Elasticsearch indexes and templates
### Elasticsearch indexes and templates

### Indexes per time-frame

Expand Down Expand Up @@ -144,10 +144,9 @@ This plugin will format the events in the following way:
}
```

### Configuration:
### Configuration

```toml
# Configuration for Elasticsearch to send metrics to.
[[outputs.elasticsearch]]
## The full HTTP endpoint URL for your Elasticsearch instance
## Multiple urls can be specified as part of the same cluster,
Expand All @@ -162,10 +161,6 @@ This plugin will format the events in the following way:
## Setting to "0s" will disable the health check (not recommended in production)
health_check_interval = "10s"
## HTTP basic authentication details.
## If you are using authentication within your Elasticsearch cluster,
## you need to create a account and create a role with at least the manage role in the Cluster Privileges category.
## Overwise, your account will not be able to connect to your Elasticsearch cluster and send logs to your cluster.
## After that, you need to add "create_indice" and "write" permission to your specific index pattern.
# username = "telegraf"
# password = "mypassword"

Expand Down Expand Up @@ -203,7 +198,16 @@ This plugin will format the events in the following way:
overwrite_template = false
```

### Required parameters:
#### Permissions

If you are using authentication within your Elasticsearch cluster, you need
to create a account and create a role with at least the manage role in the
Cluster Privileges category. Overwise, your account will not be able to
connect to your Elasticsearch cluster and send logs to your cluster. After
that, you need to add "create_indice" and "write" permission to your specific
index pattern.

#### Required parameters:

* `urls`: A list containing the full HTTP URL of one or more nodes from your Elasticsearch instance.
* `index_name`: The target index for metrics. You can use the date specifiers below to create indexes per time frame.
Expand All @@ -218,7 +222,7 @@ This plugin will format the events in the following way:

Additionally, you can specify dynamic index names by using tags with the notation ```{{tag_name}}```. This will store the metrics with different tag values in different indices. If the tag does not exist in a particular metric, the `default_tag_value` will be used instead.

### Optional parameters:
#### Optional parameters:

* `timeout`: Elasticsearch client timeout, defaults to "5s" if not set.
* `enable_sniffer`: Set to true to ask Elasticsearch a list of all cluster nodes, thus it is not necessary to list all nodes in the urls config option.
Expand All @@ -229,7 +233,7 @@ Additionally, you can specify dynamic index names by using tags with the notatio
* `template_name`: The template name used for telegraf indexes.
* `overwrite_template`: Set to true if you want telegraf to overwrite an existing template.

## Known issues
### Known issues

Integer values collected that are bigger than 2^63 and smaller than 1e21 (or in this exact same window of their negative counterparts) are encoded by golang JSON encoder in decimal format and that is not fully supported by Elasticsearch dynamic field mapping. This causes the metrics with such values to be dropped in case a field mapping has not been created yet on the telegraf index. If that's the case you will see an exception on Elasticsearch side like this:

Expand Down

0 comments on commit 337a579

Please sign in to comment.