Vytautas Arminas
Vytautas Arminas

Reputation: 419

graphite-api integration with influxdb

I have installed graphite-api and influxdb (https://github.com/InfluxGraph/influxgraph) Metrics are stored in influxdb (by collectd for example).

However, it's not possible to fetch data via graphite-api. It's configured as port 8888. http://localhost:8888/metrics/index.json returns ["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

Upvotes: 1

Views: 915

Answers (1)

danny
danny

Reputation: 5270

Firstly, metrics/index.json is a no-op API call in Graphite-API, no surprise it returns no data :) Try metrics/find?query=* first.

InfluxGraph needs to be told how to structure influxdb data into a Graphite compatible format via its templates configuration if the data has been written via influx native protocol.

There are several examples of how to do this on the project's readme and Wiki.

How the data is stored in influx is not shown here so cannot show example configuration. If you are using graphite service in influx with templates can use those same templates in influxgraph, per documentation.

If using influxdb's graphite service without templates, no template configuration is needed in InfluxGraph either, though scalability is reduced in that case.

Upvotes: 2

Related Questions