Coder Social home page Coder Social logo

mixton / graphite-mt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grafana/graphite-mt

0.0 1.0 0.0 57 KB

Graphite-web tailored for running with a metrictank backend

License: Apache License 2.0

Makefile 5.78% Shell 17.21% Python 72.06% Dockerfile 4.95%

graphite-mt's Introduction

Graphite-mt

Graphite-mt provides a graphite installation tailored for running with a metrictank backend.

When run, the container will expose graphite via HTTP on port 80.

running the image

For correct operation, the GRAPHITE_CLUSTER_SERVERS environment variable must be set with the host:port of the metrictank server (or LB address if running a cluster)

docker run -p 80:80 -e GRAPHITE_CLUSTER_SERVERS=metrictank:6060 raintank/graphite-mt

Tunables

Additional environment variables can be set to adjust performance.

metrictank

  • SINGLE_TENANT:
    • if set to a number, will configure the graphite installation to pass that x-org-id to metrictank.
    • if set to a any non-empty string, will configure the graphite installation to pass "x-org-id: 1" header to metrictank.
    • if not set, all requests to graphite must include a "x-org-id" header with a valid orgId or metrictank must be configured with multi_tenant=false otherwise authentication will fail.

MOD_WSGI

  • WSGI_PROCESSES: (2) the number of WSGI daemon processes that should be started
  • WSGI_THREADS: (2) the number of threads to be created to handle requests in each daemon process
  • WSGI_INACTIVITY_TIMEOUT: (120) the maximum number of seconds allowed to pass before the daemon process is shutdown and restarted when the daemon process has entered an idle state
  • WSGI_REQUEST_TIMEOUT: (65) maximum number of seconds that a request is allowed to run before the daemon process is restarted
  • WSGI_MEMORY_LIMIT: (10737418240 aka 10Gi) maximum amount of memory a daemon process can use (on platforms that support it)
  • WSGI_VIRTUAL_MEMORY_LIMIT: (10737418240 aka 10Gi) maximum amount of virtual memory a daemon process can use (on platforms that support it)
  • WSGI_MAX_REQUESTS: (1000) limit on the number of requests a daemon process should process before it is shutdown and restarted.
  • WSGI_REQUEST_TIMEOUT: (120) the maximum number of seconds that a request is allowed to run before the daemon process is restarted.

Graphite-web

  • GRAPHITE_SECRET_KEY: (UNSAFE_DEFAULT) Set this to a long, random unique string to use as a secret key for this install
  • GRAPHITE_ALLOWED_HOSTS: (*) In Django 1.5+ set this to the list of hosts your graphite instances is accessible as. See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS
  • GRAPHITE_TIME_ZONE: (Etc/UTC) Set your local timezone
  • GRAPHITE_LOG_ROTATION: (true) rotate logs
  • GRAPHITE_LOG_ROTATION_COUNT: (1) number of logs to keep
  • GRAPHITE_LOG_RENDERING_PERFORMANCE: (true) log performance information
  • GRAPHITE_LOG_CACHE_PERFORMANCE: (true) log cache performance information
  • GRAPHITE_LOG_FILE_INFO: (info.log), set to "-" for stdout/stderr
  • GRAPHITE_LOG_FILE_EXCEPTION: (exception.log), set to "-" for stdout/stderr
  • GRAPHITE_LOG_FILE_CACHE: (cache.log), set to "-" for stdout/stderr
  • GRAPHITE_LOG_FILE_RENDERING: (rendering.log), set to "-" for stdout/stderr
  • GRAPHITE_DEBUG: (false) Enable full debug page display on exceptions (Internal Server Error pages)
  • GRAPHITE_DEFAULT_CACHE_DURATION: (0) Duration to cache metric data and graphs
  • GRAPHITE_USE_WORKER_POOL: (true) Creates a pool of worker threads to which tasks can be dispatched
  • GRAPHITE_POOL_WORKERS_PER_BACKEND: (8) The number of worker threads that should be created per backend server
  • GRAPHITE_POOL_WORKERS: (1) A baseline number of workers that should always be created
  • GRAPHITE_REMOTE_FIND_TIMEOUT: (30) Timeout for metric find requests
  • GRAPHITE_REMOTE_FETCH_TIMEOUT: (60) Timeout to fetch series data
  • GRAPHITE_MAX_FETCH_RETRIES: (2) Number of retries for a specific remote data fetch
  • GRAPHITE_FIND_CACHE_DURATION: (0) Time to cache remote metric find results
  • GRAPHITE_STATSD_HOST: ("") If set, django_statsd.middleware.GraphiteRequestTimingMiddleware and django_statsd.middleware.GraphiteMiddleware will be enabled.

Building

To build the image simply checkout this repo

git clone https://github.com/raintank/graphite-mt.git

Then cd into the directory and run

make build

Versioning

We're using this naming scheme: graphite-mt:<our version>-<graphite version>

our version: a number to identify the graphite-mt image, it should be increased every time anything in this repo gets modified graphite version: the version of graphite that's used. preferrably the tag if there is one, otherwise the commit hash

These two version numbers get defined in the Makefile. Valid image versions are for example: 1-1.1.5, 2-e4ccaa21, 3-e4ccaa21

graphite-mt's People

Contributors

dancech avatar dieterbe avatar ehlerst avatar replay avatar woodsaj avatar

Watchers

 avatar

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.