Update EXAMPLE_README.md

This commit is contained in:
Daniel Nelson 2017-04-21 14:25:37 -07:00
parent da0773151b
commit 3684ec6315
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,8 @@
# Example Input Plugin
The example plugin gathers metrics about example things
The example plugin gathers metrics about example things. This description
explains at a high level what the plugin does and provides links to where
additional information can be found.
### Configuration:
@ -12,7 +14,8 @@ The example plugin gathers metrics about example things
### Measurements & Fields:
<optional description>
Here you should add an optional description and links to where the user can
get more information about the measurements.
- measurement1
- field1 (type, unit)
@ -30,8 +33,11 @@ The example plugin gathers metrics about example things
### Sample Queries:
These are some useful queries (to generate dashboards or other) to run against data from this plugin:
This section should contain some useful InfluxDB queries that can be used to
get started with the plugin or to generate dashboards. For each query listed,
describe at a high level what data is returned.
Get the max, mean, and min for the measurement in the last hour:
```
SELECT max(field1), mean(field1), min(field1) FROM measurement1 WHERE tag1=bar AND time > now() - 1h GROUP BY tag
```
@ -39,7 +45,7 @@ SELECT max(field1), mean(field1), min(field1) FROM measurement1 WHERE tag1=bar A
### Example Output:
```
$ ./telegraf -config telegraf.conf -input-filter example -test
$ telegraf -input-filter example -test
measurement1,tag1=foo,tag2=bar field1=1i,field2=2.1 1453831884664956455
measurement2,tag1=foo,tag2=bar,tag3=baz field3=1i 1453831884664956455
```