14

我使用 statsd 测量统计数据,使用 Graphite 显示这些数据。无论如何,我想在统计软件中做一个更复杂的分析,找出各种变量之间的关系。

为此,我需要“原始”数据,这些数据通常在 Graphite 中显示为彩色线条。是否可以获取 CSV 格式的数据?每 10 秒采样到 1 个条目的数据将是完美的,我认为这是 statsd 的默认行为。

4

1 回答 1

21

是的。这很简单。

Server: graphite.example.com
Metric: Graphite.system.data.ip-10-0-0-1.load

您可能知道,Graphite 有一个 URL API。

graphite.example.com/render/?target=Graphite.system.data.ip-10-0-0-1.load

返回折线图。要获取数据csv或什至json,附加-&format=json

graphite.example.com/render/?target=Graphite.system.data.ip-10-0-0-1.load&format=csv
于 2014-01-26T16:15:33.307 回答