graphite-influxdb
graphite-influxdb copied to clipboard
Error 500/404.
Hi. Trying to implement graphite-api + graphite-influxdb and having complex problems with what I interpret should be a simple process.
From what I understand, I should be able to get a test call working at http://theserver:8013/render?target=test, but this throws an error 500 in Apache which, when I enabled some more verbose Python logging in the WSGI script, actually showed a 404 on the back-end. This same behavior is what happens when issuing any URL call to the Render API, actually. Any assistance provided would be greatly appreciated as I'm pretty much at the end of my rope, lack the Python chops to do any deeper debugging with gdb and such, and am fairly desperate for a solution. :)
Host system is CentOS 7 with Python 2.7.5, all modules installed via latest Pip.
/etc/graphite-api.yaml:
search_index: /var/www/wsgi-scripts/index
finders:
- graphite_influxdb.InfluxdbFinder
influxdb:
host: localhost
port: 8086
user: grafana
pass: grafanaisawesome
db: graphite
ssl: false
schema:
- ['^monitoring', 1]
cache:
type: 'filesystem'
dir: '/var/www/wsgi-scripts/graphite-api-cache'
/etc/httpd/conf.d/graphite-api.conf:
LoadModule wsgi_module modules/mod_wsgi.so
WSGISocketPrefix /var/run/wsgi
Listen 8013
<VirtualHost *:8013>
WSGIDaemonProcess graphite-api processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite-api
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /var/www/wsgi-scripts/graphite-api.wsgi process-group=graphite-api application-group=%{GLOBAL}
WSGIScriptAlias / /var/www/wsgi-scripts/graphite-api.wsgi
<Directory /var/www/wsgi-scripts/>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
/var/www/wsgi-scripts/graphite-api.wsgi:
from graphite_api.app import app as application
Stack trace from Apache error logs with Python debug logging configured:
[Mon May 04 15:56:44.913840 2015] [:error] [pid 21770] F1 2015-05-04 15:56:44,913 ERROR {"event": "Exception on /render [GET]", "exception": "Traceback (most recent call last):\\n File \\"/usr/lib/python2.7/site-packages/flask/app.py\\", line 1817, in wsgi_app\\n response = self.full_dispatch_request()\\n File \\"/usr/lib/python2.7/site-packages/flask/app.py\\", line 1477, in full_dispatch_request\\n rv = self.handle_user_exception(e)\\n File \\"/usr/lib/python2.7/site-packages/flask/app.py\\", line 1381, in handle_user_exception\\n reraise(exc_type, exc_value, tb)\\n File \\"/usr/lib/python2.7/site-packages/flask/app.py\\", line 1475, in full_dispatch_request\\n rv = self.dispatch_request()\\n File \\"/usr/lib/python2.7/site-packages/flask/app.py\\", line 1461, in dispatch_request\\n return self.view_functions[rule.endpoint](**req.view_args)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/app.py\\", line 394, in render\\n series_list = evaluateTarget(context, target)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/app.py\\", line 470, in evaluateTarget\\n result = evaluateTokens(requestContext, tokens)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/app.py\\", line 480, in evaluateTokens\\n return evaluateTokens(requestContext, tokens.expression)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/app.py\\", line 488, in evaluateTokens\\n arg) for arg in tokens.call.args]\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/app.py\\", line 480, in evaluateTokens\\n return evaluateTokens(requestContext, tokens.expression)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/app.py\\", line 483, in evaluateTokens\\n return fetchData(requestContext, tokens.pathExpression)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/render/datalib.py\\", line 158, in fetchData\\n return _fetchData(pathExpr, startTime, endTime, requestContext, seriesList)\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/render/datalib.py\\", line 95, in _fetchData\\n for node in matching_nodes:\\n File \\"/usr/lib/python2.7/site-packages/graphite_api/storage.py\\", line 22, in find\\n for node in finder.find_nodes(query):\\n File \\"/usr/lib/python2.7/site-packages/graphite_influxdb.py\\", line 323, in find_nodes\\n for (name, res) in self.get_leaves(query):\\n File \\"/usr/lib/python2.7/site-packages/graphite_influxdb.py\\", line 278, in get_leaves\\n series = self.assure_series(query)\\n File \\"/usr/lib/python2.7/site-packages/graphite_influxdb.py\\", line 247, in assure_series\\n ret = self.client.query(\\"list series /%s/\\" % regex.pattern)\\n File \\"/usr/lib/python2.7/site-packages/influxdb/client.py\\", line 309, in query\\n expected_response_code=expected_response_code\\n File \\"/usr/lib/python2.7/site-packages/influxdb/client.py\\", line 272, in request\\n raise InfluxDBClientError(response.content, response.status_code)\\nInfluxDBClientError: 404: 404 page not found\\n"}
Simple error thrown without Python logging configured:
[Mon May 04 15:41:00.483854 2015] [:error] [pid 21379] No handlers could be found for logger "flask.app"
Thanks in advance for any direction provided.
Just had this problem, my prior closed ticket
https://github.com/vimeo/graphite-influxdb/issues/51