Align exec documentation with v0.10 updates
This commit is contained in:
parent
7531e218c1
commit
923be102b3
|
@ -7,13 +7,13 @@ For example, if you have a json-returning command called mycollector, you could
|
||||||
setup the exec plugin with:
|
setup the exec plugin with:
|
||||||
|
|
||||||
```
|
```
|
||||||
[[exec.commands]]
|
[[inputs.exec]]
|
||||||
command = "/usr/bin/mycollector --output=json"
|
command = "/usr/bin/mycollector --output=json"
|
||||||
name = "mycollector"
|
name_suffix = "_mycollector"
|
||||||
interval = 10
|
interval = 10
|
||||||
```
|
```
|
||||||
|
|
||||||
The name is used as a prefix for the measurements.
|
The name suffix is appended to exec as "exec_name_suffix" to identify the input stream.
|
||||||
|
|
||||||
The interval is used to determine how often a particular command should be run. Each
|
The interval is used to determine how often a particular command should be run. Each
|
||||||
time the exec plugin runs, it will only run a particular command if it has been at least
|
time the exec plugin runs, it will only run a particular command if it has been at least
|
||||||
|
@ -22,7 +22,7 @@ time the exec plugin runs, it will only run a particular command if it has been
|
||||||
|
|
||||||
# Sample
|
# Sample
|
||||||
|
|
||||||
Let's say that we have a command named "mycollector", which gives the following output:
|
Let's say that we have a command with the name_suffix "_mycollector", which gives the following output:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"a": 0.5,
|
"a": 0.5,
|
||||||
|
@ -34,9 +34,7 @@ Let's say that we have a command named "mycollector", which gives the following
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The collected metrics will be:
|
The collected metrics will be stored as field values under the same measurement "exec_mycollector":
|
||||||
```
|
```
|
||||||
exec_mycollector_a value=0.5
|
exec_mycollector a=0.5,b_c="some text",b_d=0.1,b_e=5 1452815002357578567
|
||||||
exec_mycollector_b_d value=0.1
|
|
||||||
exec_mycollector_b_e value=5
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue