GithubHelp home page GithubHelp logo

distributed-system-analysis / es-graphite-shim Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 3.0 19 KB

An ElasticSearch / Graphite shim which translates graphite requests into ElasticSearch data queries for a given mapping

License: BSD 2-Clause "Simplified" License

Python 85.97% HTML 6.45% Dockerfile 7.58%

es-graphite-shim's People

Contributors

arcolife avatar portante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

es-graphite-shim's Issues

cached data is lost after some time [PR #2]

This is after the changes from PR #2 are implemented.

  1. using django.core.cache:
    The memcached's integration with the shim within the container is currently faulty because it loses the data after some time. The cache.set() method works at first and one can access data for sometime using cache.get().. But then the cache gets dropped, even though the cache size is increased from 64Mb to 512Mb.

    The testing cached data was ~110Mb so it is probably not a case of low memory. The service doesn't get restarted since I've manually tested it in -vv mode.

  2. using python-memcached:
    The cache refuses to be set from within the django application. For some reason it shows the following traceback:

    Traceback (most recent call last):
    File "/usr/lib/python3.4/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
      worker.init_process()
    File "/usr/lib/python3.4/site-packages/gunicorn/workers/base.py", line 118, in init_process
      self.wsgi = self.app.wsgi()
    File "/usr/lib/python3.4/site-packages/gunicorn/app/base.py", line 67, in wsgi
      self.callable = self.load()
    File "/usr/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
      return self.load_wsgiapp()
    File "/usr/lib/python3.4/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
      return util.import_app(self.app_uri)
    File "/usr/lib/python3.4/site-packages/gunicorn/util.py", line 355, in import_app
      __import__(module)
    File "/opt/egs/egs/egs/wsgi.py", line 15, in <module>
      application = get_wsgi_application()
    File "/usr/lib/python3.4/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
      django.setup()
    File "/usr/lib/python3.4/site-packages/django/__init__.py", line 17, in setup
      configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 48, in __getattr__
      self._setup(name)
    File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 44, in _setup
      self._wrapped = Settings(settings_module)
    File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 92, in __init__
      mod = importlib.import_module(self.SETTINGS_MODULE)
    File "/usr/lib64/python3.4/importlib/__init__.py", line 109, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "/opt/egs/egs/egs/settings.py", line 27, in <module>
      from local_settings import cache, ES
    File "/opt/egs/egs/local_settings.py", line 23, in <module>
      cache.set('FIELD',"metric1.subpath1", time=0)
    File "/usr/lib/python3.4/site-packages/memcache.py", line 700, in set
      return self._set("set", key, val, time, min_compress_len, noreply)
    File "/usr/lib/python3.4/site-packages/memcache.py", line 983, in _set
      server, key = self._get_server(key)
    File "/usr/lib/python3.4/site-packages/memcache.py", line 413, in _get_server
      serverhash = serverHashFunction(str(serverhash) + str(i))
    File "/usr/lib/python3.4/site-packages/memcache.py", line 65, in cmemcache_hash
      (((binascii.crc32(key) & 0xffffffff)
    TypeError: 'str' does not support the buffer interface
    

    Referring to an old issue (linsomniac/python-memcached#70) this is probably because memcache isn't running. But if this were the case, the 1st method wouldn't have worked in the first place.

Grafana instance refuses to accept the json object from shim [PR #2]

Post migration to python3, memcached, gunicorn and nginx [PR #2 ], the shim's output is somehow unacceptable to grafana. I curl'ed the data and checked with json_pp module and it seems to be a valid json response (also since it is showing up properly in json viewer within the browser). But grafana is just not picking it up and says unexpected end of data at line 1 column 1 of JSON data

When compared to a similar graphite output of the API, the only difference is in the order of the keys in the JSON object, which shouldn't be a problem (since it used to run fine previously).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.