projecteru / redis-ctl

A web application for Redis Cluster management
MIT License
128 stars 61 forks source link

Daemon not work with influxdb v0.9.2 #8

Closed maralla closed 9 years ago

maralla commented 9 years ago

influxdb-python == 2.0.1

When run python daemon.py this exception raised:

ERROR:2015-08-19 18:45:01,700:400: {"error":"missing measurement"}
Traceback (most recent call last):
  File "daemon.py", line 66, in _emit_data
    stats.db.client.write_points(json_body)
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 333, in write_points
    tags=tags)
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 371, in _write_points
    expected_response_code=200
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 273, in write
    expected_response_code=expected_response_code
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 264, in request
    raise InfluxDBClientError(response.content, response.status_code)
InfluxDBClientError: 400: {"error":"missing measurement"}

It seems that influxdb has changed name to measurement in the json schema.

So I changed name to measurement in the source code. But another exception raised:

ERROR:2015-08-19 18:51:46,124:204:
Traceback (most recent call last):
  File "daemon.py", line 66, in _emit_data
    stats.db.client.write_points(json_body)
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 333, in write_points
    tags=tags)
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 371, in _write_points
    expected_response_code=200
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 273, in write
    expected_response_code=expected_response_code
  File "/home/vagrant/py2env/local/lib/python2.7/site-packages/influxdb/client.py", line 264, in request
    raise InfluxDBClientError(response.content, response.status_code)
InfluxDBClientError: 204:

Finally I upgrade influxdb-python to the lastest version v2.8.0. And it works.

@neuront

zheplusplus commented 9 years ago

I'm sorry but we are going to migrate to another statistics utility open-falcon because APIs of influxdb changes too much.