Skip to content

Commit

Permalink
Adding carbon-relay (fixing #67)
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh committed Nov 18, 2018
1 parent 2995f16 commit 207d366
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ COPY --from=build /opt /opt
RUN /usr/local/bin/django_admin_init.exp

# defaults
EXPOSE 80 2003-2004 2023-2024 8080 8125 8125/udp 8126
EXPOSE 80 2003-2004 2013-2014 2023-2024 8080 8125 8125/udp 8126
VOLUME ["/opt/graphite/conf", "/opt/graphite/storage", "/opt/graphite/webapp/graphite/functions/custom", "/etc/nginx", "/opt/statsd", "/etc/logrotate.d", "/var/log", "/var/lib/redis"]

CMD ["/sbin/my_init"]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ Graphite stores tag information in a separate tag database (TagDB). Please check
## Collectd
Use `COLLECTD=1` environment variable to enable local collectd instance

## Carbon-relay
Use `RELAY=1` environment variable to enable carbon relay instance. Use `[relay]` section of carbon.conf to configure it.

## Change the Configuration

Read up on Graphite's [post-install tasks](https://graphite.readthedocs.org/en/latest/install.html#post-install-tasks).
Expand Down
6 changes: 6 additions & 0 deletions conf/etc/service/carbon-relay/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

[[ -n ${RELAY} ]] || exit 1
rm -f /opt/graphite/storage/carbon-relay-a.pid
source /opt/graphite/bin/activate
exec python3 /opt/graphite/bin/carbon-relay.py start --debug 2>&1 >> /var/log/carbon-relay.log

0 comments on commit 207d366

Please sign in to comment.