add plugin example

This commit is contained in:
UlricQin 2021-07-16 20:29:34 +08:00
parent 8f4597045d
commit 88e6e4bf56
1 changed files with 36 additions and 0 deletions

36
docs/plugin.example.sh Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
now=$(date +%s)
echo '[
{
"metric": "plugin_example_gauge",
"tags": {
"type": "testcase",
"author": "ulric"
},
"time": '${now}',
"value": '${now}',
"type": "gauge"
},
{
"metric": "plugin_example_rate",
"tags": {
"type": "testcase",
"author": "ulric"
},
"time": '${now}',
"value": '${now}',
"type": "rate"
},
{
"metric": "plugin_example_increase",
"tags": {
"type": "testcase",
"author": "ulric"
},
"time": '${now}',
"value": '${now}',
"type": "increase"
}
]'