Update EXAMPLE_README.md

This commit is contained in:
Daniel Nelson 2017-04-21 14:25:37 -07:00
parent 8a1b070e2f
commit 0fd3aeb34d
1 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,8 @@
# Example Input Plugin # 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: ### Configuration:
@ -12,7 +14,8 @@ The example plugin gathers metrics about example things
### Measurements & Fields: ### 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 - measurement1
- field1 (type, unit) - field1 (type, unit)
@ -30,8 +33,11 @@ The example plugin gathers metrics about example things
### Sample Queries: ### 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 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: ### 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 measurement1,tag1=foo,tag2=bar field1=1i,field2=2.1 1453831884664956455
measurement2,tag1=foo,tag2=bar,tag3=baz field3=1i 1453831884664956455 measurement2,tag1=foo,tag2=bar,tag3=baz field3=1i 1453831884664956455
``` ```