Commit 7f233467 authored by 李贺's avatar 李贺

修改监控进程插件

parent 5d28a9bc
Pipeline #272 canceled with stages
......@@ -11,7 +11,7 @@ class process():
"endpoint":endpoint,
"tags":"pid="+str(i["pid"])+",name="+i["name"]+",cmd="+' '.join(p.cmdline()),
"timestamp":int(time.time()),
"metric": "sys.process.memory.percent",
"metric": "sys.process.memory.percent.%s" % str(i["pid"]),
"counterType":"GAUGE",
"value":p.memory_percent(),
"step": 90
......@@ -20,7 +20,7 @@ class process():
"endpoint":endpoint,
"tags":"pid="+str(i["pid"])+",name="+i["name"]+",cmd="+' '.join(p.cmdline()),
"timestamp":int(time.time()),
"metric": "sys.process.cpu.percent",
"metric": "sys.process.cpu.percent.%s" % str(i["pid"]),
"counterType":"GAUGE",
"value":p.cpu_percent(interval=1),
"step": 90
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment