Elasticsearch中的立体主义和指标(statsd / diamond)

时间:2015-08-03 20:08:14

标签: javascript elasticsearch cubism.js

在测试环境设置中,我使用diamond将服务器统计信息和指标发送到statsd,然后使用statsd' elasticsearch backend将它们发送到elasticsearch。

elasticsearch数据如下所示:

{
  "hits" : {
    "hits" : [ {
      "_source":{"ns":"servers","grp":"server1","tgt":"vmstat","act":"pswpout","val":"0","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"vmstat","act":"pgpgin","val":"0","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"vmstat","act":"pswpin","val":"0","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"cpu","act":"total.nice","val":"0","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"cpu","act":"total.irq","val":"0","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"cpu","act":"total.guest","val":"0","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"diskspace","act":"_logs.byte_used","val":"209944576","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"diskspace","act":"_logs.byte_free","val":"887513440256","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"diskspace","act":"_logs.byte_avail","val":"842419666944","@timestamp":"1438565055000"}
    }, {
      "_source":{"ns":"servers","grp":"server1","tgt":"diskspace","act":"_logs.inodes_used","val":"11","@timestamp":"1438565055000"}
    } ]
  }
}

我如何使用立体主义渲染这些数据?我可以使用elasticsearch.js提取数据,但是通常只会对如何渲染这些数据感到困惑,因此,我可以将每个不同操作的时间序列数据可视化。例如。

2 个答案:

答案 0 :(得分:1)

您可以尝试https://github.com/bernd/statsd-influxdb-backendhttp://graphite.wikidot.com后端。 对于那些后端http://grafana.org/提供了很好的可视化工具。

如果您选择Graphite立体主义实际上也支持它作为数据提供者根据他们的网站:https://square.github.io/cubism/

答案 1 :(得分:-1)

看看ATSD time chart。如果这足够功能,Axibase时间序列数据库社区版是免费的。顺便说一句,它直接支持Graphite wire协议,因此您可以直接将钻石守护程序中的数据流式传输到数据库中。

披露:我为这家公司工作。