Skip to content

metrico/cFlux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cFlux

Experimental, unoptimized InfluxDB API to Clickhouse DB Gateway prototype for Timeseries.

Unstable, Experimental, Dangerous! Do not use this!

ezgif com-optimize 14

Usage

Start Server
CLICKHOUSE_SERVER=my.clickhouse.server npm start

The server attempts emulating an InfluxDB API instance and can accept line protocol and query requests from Telegraf, Chronograf, Kapacitor and potentially clients with (extremely) basic features.

API Status
  • Endpoint /write
    • line protocol parser
    • clickhouse insert statement
    • clickhouse bulk inserts w/ LRU
  • Endpoint /query
    • IFQL Parser
    • SHOW DATABASES
    • SHOW MEASUREMENTS
    • SHOW RETENTION POLICIES (fake)
    • SHOW TAG KEYS
    • SHOW TAG VALUES
    • SHOW FIELDS KEYS
    • SELECT
      • Fields
      • Tags
      • Timerange (now)
      • Group By

POST Metrics /write

The /write endpoint expects HTTP POST data using the InfluxDB line protocol:

<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
Example
 curl -d "statistics_method,cseq=OPTIONS 100=1,OPTIONS=1 1545424651000000000" \
      -X POST 'http://localhost:8686/write?db=mystats'