From 88e6e4bf56fe6e46bd770f71c21c9223ea62bdf5 Mon Sep 17 00:00:00 2001 From: UlricQin Date: Fri, 16 Jul 2021 20:29:34 +0800 Subject: [PATCH] add plugin example --- docs/plugin.example.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 docs/plugin.example.sh diff --git a/docs/plugin.example.sh b/docs/plugin.example.sh new file mode 100755 index 00000000..3724ac09 --- /dev/null +++ b/docs/plugin.example.sh @@ -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" + } +]' \ No newline at end of file