summaryrefslogtreecommitdiff
path: root/py_common/common_telegraf.py
diff options
context:
space:
mode:
Diffstat (limited to 'py_common/common_telegraf.py')
-rw-r--r--py_common/common_telegraf.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/py_common/common_telegraf.py b/py_common/common_telegraf.py
new file mode 100644
index 0000000..e3e5744
--- /dev/null
+++ b/py_common/common_telegraf.py
@@ -0,0 +1,10 @@
+# coding: utf-8
+
+import telegraf
+
+def telegraf_init(arg_host, arg_port, arg_tags):
+ #global telegraf_client
+ #global_tags = {'host' : "lijia", 'local_ip_addr': "127.0.0.1"}
+ telegraf_client = telegraf.TelegrafClient(host = arg_host, port = arg_port, tags = arg_tags)
+ return telegraf_client
+