【问题标题】:Statsd & Graphite - get data as CSVStatsd & Graphite - 以 CSV 格式获取数据
【发布时间】:2014-02-15 09:27:56
【问题描述】:

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

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

【问题讨论】:

    标签: export-to-csv graphite statsd


    【解决方案1】:

    是的。而且很简单。

    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
    

    【讨论】:

    • 酷,我会试试的。谢谢!
    • 是的,效果很好。而且我还发现了图形 API 本身。谢谢。
    猜你喜欢
    • 2012-05-18
    • 1970-01-01
    • 2012-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-24
    相关资源
    最近更新 更多