2021-09-24 01:15:43 +08:00
|
|
|
# Trig Input Plugin
|
|
|
|
|
|
|
|
|
|
The `trig` plugin is for demonstration purposes and inserts sine and cosine
|
|
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
## Configuration
|
2021-09-24 01:15:43 +08:00
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
```toml @sample.conf
|
2021-09-24 01:15:43 +08:00
|
|
|
# Inserts sine and cosine waves for demonstration purposes
|
|
|
|
|
[[inputs.trig]]
|
|
|
|
|
## Set the amplitude
|
|
|
|
|
amplitude = 10.0
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
## Metrics
|
2021-09-24 01:15:43 +08:00
|
|
|
|
|
|
|
|
- trig
|
|
|
|
|
- fields:
|
|
|
|
|
- cosine (float)
|
|
|
|
|
- sine (float)
|
|
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
## Example Output
|
2021-09-24 01:15:43 +08:00
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
```shell
|
2021-09-24 01:15:43 +08:00
|
|
|
trig,host=MBP15-SWANG.local cosine=10,sine=0 1632338680000000000
|
|
|
|
|
trig,host=MBP15-SWANG.local sine=5.877852522924732,cosine=8.090169943749473 1632338690000000000
|
|
|
|
|
trig,host=MBP15-SWANG.local sine=9.510565162951535,cosine=3.0901699437494745 1632338700000000000
|
|
|
|
|
```
|