Sign inSign up

xrlx/graphite-rust

By xrlx

•Updated almost 11 years ago

Oxidized graphite stack

Image
0

1.0K

xrlx/graphite-rust repository overview

The graphite ecosystem in one easy-to-install package.

Build status

⁠Docker

By far the easiest experience for getting up and running

docker pull xrlx/graphite
mkdir data
docker run -v ./data:/data xrlx/graphite

⁠Docker in Production

How I run graphite-rust with graphite-web in production:

$ cat run_graphite.sh
docker run -e "RUST_LOG=warning" --name graphite -d -p 2003:2003/udp -p 2003:2003 -v /var/data/graphite:/data xrlx/graphite
$ cat run_graphite_web.sh
docker run -d -it --name graphite-web -v /var/data/graphite:/opt/graphite/storage/whisper -p 80:80 banno/graphite-web
$ sudo sysctl -w vm.dirty_background_ratio=30 vm.dirty_ratio=60 vm.dirty_expire_centisecs=1080000 vm.dirty_writeback_centisecs=1080000

⁠Building

Note: you'll need a nightly rust build to build this

$ git clone [email protected]⁠:tureus/graphite-rust.git $ cd graphite-rust $ cargo build --release $ RUST_LOG=debug ./target/debug/carbon

⁠Tasks

  • Read headers
  • Read single point
  • Write to single archive
  • Write through all archives with downsampling
  • Create files
  • Read many points
  • Advisory lock files
  • mmap files (PROFILING)
  • Use cfg() guards to provide conditional checks for sysctl settings
  • UDP daemon
  • TCP daemon
  • Custom schema support when creating new WSPs
  • Pickle daemon
  • HTTP frontend
  • Make logging useful for ops
  • Validate .wsp when opening (archives need to cleanly multiply, etc)

⁠Documentation

http://tureus.github.io/graphite-rust⁠

⁠Reference

Documentation for the whisper file format is slim/nil. Clone the official repo and take a look at whisper.py

$ git clone [email protected]⁠:graphite-project/whisper.git

⁠Talking to Carbon

On OSX you need to specify IPv4:

echo -e "local.random.diceroll 4 date +%s" | nc -4u -w0 localhost 2003

On linux:

echo "local.random.diceroll 4 date +%s" | nc -u -w 1 localhost 2003

Memory stats:

yum install -y sysstat toolbox sar -B 1

Tag summary

Content type

Image

Digest

sha256:41c177354…

Size

344.7 MB

Last updated

almost 11 years ago

docker pull xrlx/graphite-rust