Skip to content

Commit

Permalink
Merge pull request #64 from graphite-project/DZ-Collectd
Browse files Browse the repository at this point in the history
Collectd
  • Loading branch information
deniszh authored Nov 3, 2018
2 parents 00b40a5 + 24e548c commit c8508f7
Show file tree
Hide file tree
Showing 5 changed files with 1,141 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ WORKDIR /usr/local/src/graphite-web
RUN . /opt/graphite/bin/activate && pip3 install -r requirements.txt \
&& python3 ./setup.py install

# fixing RRD support (see https://github.com/graphite-project/docker-graphite-statsd/issues/63)
RUN sed -i \
's/return os.path.realpath(fs_path)/return os.path.realpath(fs_path).decode("utf-8")/' \
/opt/graphite/webapp/graphite/readers/rrd.py

# installing nodejs 6
WORKDIR /opt
RUN wget https://nodejs.org/download/release/v6.14.4/node-v6.14.4-linux-x64.tar.gz && \
Expand Down Expand Up @@ -98,6 +103,7 @@ RUN apt-get update --fix-missing \
&& apt-get install --yes --no-install-recommends \
git \
redis \
collectd \
nginx \
python3-pip \
python3-ldap \
Expand All @@ -121,6 +127,9 @@ ADD conf/etc/nginx/sites-enabled/graphite-statsd.conf /etc/nginx/sites-enabled/g
# config redis
ADD conf/etc/redis/redis.conf /etc/redis/redis.conf

# config collectd
ADD conf/etc/collectd/collectd.conf /etc/collectd/collectd.conf

# logging support
RUN mkdir -p /var/log/carbon /var/log/graphite /var/log/nginx /var/log/graphite/
ADD conf/etc/logrotate.d/graphite-statsd /etc/logrotate.d/graphite-statsd
Expand All @@ -132,6 +141,7 @@ ADD conf/etc/service/graphite/run /etc/service/graphite/run
ADD conf/etc/service/statsd/run /etc/service/statsd/run
ADD conf/etc/service/nginx/run /etc/service/nginx/run
ADD conf/etc/service/redis/run /etc/service/redis/run
ADD conf/etc/service/collectd/run /etc/service/collectd/run
RUN chmod 0755 /etc/service/*/run

# default conf setup
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ DOCKER ASSIGNED | /var/lib/redis | Redis TagDB data (optional)
Built using [Phusion's base image](https://github.com/phusion/baseimage-docker).

* All Graphite related processes are run as daemons & monitored with [runit](http://smarden.org/runit/).
* Includes additional services such as logrotate.
* Includes additional services such as logrotate, nginx, optional Redis for TagDB and optional collectd instance.

## Start Using Graphite & Statsd

Expand Down Expand Up @@ -160,6 +160,9 @@ Graphite stores tag information in a separate tag database (TagDB). Please check
* GRAPHITE_TAGDB_HTTP_PASSWORD: ('') Password for HTTP TagDB
* GRAPHITE_TAGDB_HTTP_AUTOCOMPLETE: (false) Does the remote TagDB support autocomplete?

## Collectd
Use `COLLECTD=1` environment variable to enable local collectd instance

## Change the Configuration

Read up on Graphite's [post-install tasks](https://graphite.readthedocs.org/en/latest/install.html#post-install-tasks).
Expand Down
Loading

0 comments on commit c8508f7

Please sign in to comment.