如何显示从influxdb获取的grafana中的进程名称?

时间:2019-09-17 08:54:05

标签: grafana influxdb collectd

我使用collectd收集指标并将其推送到influxdb中。我从收集的流程指标中收集并推送到influxdb中,我需要在grafana中进行可视化。 到目前为止,我的influxdb输出就像

 name: processes_value
tags: host=Slave1-Collectd
time                instance type         type_instance value
----                -------- ----         ------------- -----
1568702686327447056          ps_state     running       2
1568702686327448620          ps_state     sleeping      84
1568702686327449675          ps_state     zombies       0
1568702686327450700          ps_state     stopped       0
1568702686327451715          ps_state     paging        0
1568702686327452935          ps_state     blocked       0
1568702686327454380 apache   ps_vm                      0
1568702686327455615 apache   ps_rss                     0
1568702686327456953 apache   ps_data                    0
1568702686327458291 apache   ps_code                    0
1568702686327459491 apache   ps_stacksize               0
1568702686327464669 collectd ps_vm                      687271936
1568702686327465888 collectd ps_rss                     2236416
1568702686327466901 collectd ps_data                    621162496
1568702686327467928 collectd ps_code                    4988928
1568702686327469080 collectd ps_stacksize               2176
1568702686327524835          fork_rate                  3994

我的grafana查询是

select mean(value) from “processes_value” WHERE “type_instance” = ‘running’ AND “type” = ‘ps_state’ AND “host” =~ /^host/ AND $timeFilter GROUP BY time($interval) fill(null)

grafana的输出:

enter image description here

我需要了解所有正在运行的过程。我该如何查询

请帮助!

0 个答案:

没有答案