Giter Club home page Giter Club logo

graphite_docker's Introduction

Graphite + Carbon + Statsd + Grafana

An all-in-one image running graphite and carbon-cache.

This image contains a sensible default configuration of graphite, carbon-cache and grafana. Starting this container will expose following ports:

  • 80: the graphite web interface
  • 3000: the grafana web interface
  • 2003: the carbon-cache line receiver (the standard graphite protocol)
  • 2004: the carbon-cache pickle receiver
  • 7002: the carbon-cache query port (used by the web interface)
  • 8125: the statsd UDP port
  • 8126: the statsd management port

You can log into the administrative interface of graphite-web (a Django application) with the username admin and password admin. These passwords can be changed through the web interface.

NB: Please be aware that by default docker will make the exposed ports accessible from anywhere if the host firewall is unconfigured.

Data volumes

All data is stored in the /data folder in the container (graphite metrics and grafana db)

docker run -v /data/graphite:/data \
           -e SECRET_KEY='random-secret-key' \
           -p 80:80 \
           -p 3000:3000 \
           -p 2003:2003 \
           -p 2004:2004 \
           -p 7002:7002 \
           -p 8125:8125/udp \
           -p 8126:8126 \
           -d samsaffron/graphite

Technical details

By default, this instance of carbon-cache uses the following retention periods resulting in whisper files of approximately 2.5MiB.

10s:8d,1m:31d,10m:1y,1h:5y

ENV vars

Use STATSD_IPV6=1 to boot statsd with IPv6 support, by default it only binds to IPv4

Getting started

Generate your SECRET_KEY from here. It is optional but highly recommended.

Based off

https://github.com/nickstenning/dockerfiles.git

Extended by Sam Saffron

graphite_docker's People

Contributors

heyman avatar jacobbednarz avatar rdsubhas avatar samsaffron avatar valerianpereira avatar wyaeld avatar xfalcox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

graphite_docker's Issues

Missing counter data

Hi!

I've been using this image in production for a couple of weeks now, gathering various metrics on the health of my system. I'm sending data to StatsD over UDP, and I have a Grafana dashboard where I view the data. It's been working great with no issues until yesterday, when I suddenly started to get "gaps" in my counter metrics.

Here's a couple of screenshots that shows graphs over a few different metrics for the same timespan:

image

image

image

image

In the first two graphs - whose metric type are counters - there are two large gaps. However, the third and fourth graph - whose metrics are timer and gauge - does not have any gaps.

Does anyone have any idea of what might be going on?

What I've checked so far:

nothing on port 81

I expected to see Grafana on port 81, nothing shows though. Is there something I need to configure?

Automated Build on Docker Hub?

Great image! We're finding it really useful as a workbench to locally test monitoring for apps.

It'd be extremely helpful if you could setup an automated build on Docker Hub for this project. Then the README could be changed to refer to e.g. "docker run .. samsaffron/graphite" instead of the somewhat outdated "nickstenning/graphite". These days Docker Hub can build directly from github and can use Web Hooks to automate it, some info is available at

https://docs.docker.com/docker-hub/github/

OperationalError: no such table: auth_user

Hello,

I was following this link and came across to use this docker to setup graphite web view. Grafana web interface worked fine. I am stuck on graphite web view. It says OperationalError: no such table: auth_user
Error log image for your reference
2017-06-18 19_14_40-graphite browser

I am using this docker thing first time, so might be missing something in the process.

Problem with graphite datasource

To best of my knowledge, logging into grafana should allow be to add carbon/graphite as datasource. I've tried to put localhost as $(docker-machine ip) in the URL section of new Datasource but I have only the "Failed to add datasource" message.

What am I doing wrong? What can I check to provide further details for this problem?

schermata 2016-06-20 alle 17 29 08

Google auth "Fill the blanck"

Hi,

Could you add more details about the google auth:

Fill in the blanks in supervisord.conf before building the image, otherwise Google auth will not work. You will need to register an app on google see: https://github.com/bitly/google_auth_proxy for more details

I looked at supervisord.conf and I didn't see any obvious blank. I'm also not totally familiar with Docker, how am I supposed to edit this file before running? I also see there is a script file start, what does it do?

I really want to use your docker application because it contains everything I need, but I need more info about it.
Regards

question

hi,

how to start your docker only with Graphite + Carbon and not start Statsd + Grafana?
would it work if i only forward the related ports for Graphite + Carbon?

  graphite:
    image: samsaffron/graphite
    ports:
      - "2003:2003"
      - "2004:2004"
      - "7002:7002"
      - "8080:80"
    restart: always

how can i connect graphite-exporter to Graphite using your docker?

Thanks,
Arnold

Proper signal handling for graceful shutdown

In current Dockerfile, supervisior is not running as pid 1 therefore, it is not able to receive signals sent to docker container. Due to this, there is no graceful shutdown.

To enable graceful shutdown, cmd of Dockerfile should be cmd exec /usr/bin/init instead of cmd /usr/bin/init

Dockerfile uses EXPOSE incorrectly

The Dockerfile is using EXPOSE incorrectly. Currently it lists each port with both the container and host ports (expose 85:80 for example). It should really only list the ports that the container exposes.

Use docker run -p 85:80... to bind the container port to the host port.

Volumes and permissions

I am a docker newbie so please forgive me if these are stupid questions.

I am unable to bind volumes from host to container for graphite, elasticdata or supervisor logs. The crux seems to be permissions. The carbon and graphite run as www-data but if I start docker like your example. The host folder will only be writable by root (and the container docker user) not by www-data.

docker run -v /data/graphite:/var/lib/graphite/storage/whisper
-d nickstenning/graphite

How do you handle permissions for the container process users to write to the host volumes?

Warning at container startup

On container startup, following warning is thrown:

/var/lib/graphite/webapp/graphite/settings.py:244: UserWarning: SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security warn('SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security')

This is due to installation of python-django >= 1.5, which expects SECRET_KEY to be set.

updated Django Break supervisor.conf

So with the latest update to django(1.9.x) when building the dock image will actually break the run command for the supervisor command, specifically

command = /usr/bin/gunicorn_django -b127.0.0.1:8000 -w2 graphite/settings.py

where gunicorn_django has been apparently been depricated and is no longer in use. The solution to use is to link gunicorn directorly with wsig, however I am not versed in python or django and cant get that command to run successfully.

How Do i i fix it?

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.