2017-03-07 75 views
0

我已经安装了石墨-API和influxdb(https://github.com/InfluxGraph/influxgraph) 指标存储在influxdb中(例如collectd)。石墨-api与influxdb集成

但是,无法通过graphite-api获取数据。它被配置为端口8888. http://localhost:8888/metrics/index.json返回[“null”]。

graphite-api..yaml config: 

finders: 
    - influxgraph.InfluxDBFinder 

influxdb: 
    db: graphite 
    host: localhost 
    port: 8086 
    user: graphite 
    pass: graphite 
    ssl: false 
    log_file: /var/log/influxgraph/influxgraph.log 
    log_level: info 
    templates: 
    memcache: 
     host: localhost 
    memcache: 
    host: localhost 
    aggregation_functions: 
    \.min$ : min 
    \.max$ : max 
    \.last$ : last 
    \.sum$ : sum 
    retention_policies: 
    1800: 30m 
    600: 10m 
    300: default 

回答

0

首先,metrics/index.json是石墨API无操作的API调用,难怪它没有返回数据:)尝试metrics/find?query=*第一。

如果数据是通过流入本地协议写入的,InfluxGraph需要告诉如何通过模板配置将influxdb数据构造成石墨兼容格式。

有几个如何在project's readmeWiki上执行此操作的示例。

数据如何存储在influx中未在此处显示,因此无法显示示例配置。如果您正在使用石墨服务,模板可以在Influxgraph中使用这些模板,那么可以在Influxgraph中使用那些相同的模板,但如果使用influxdb的石墨服务而不使用模板,InfluxGraph中也不需要模板配置,但在这种情况下可缩放性会降低。