This approach is not recommended, because it just gives you the metrictank binary, no dependencies, and no configuration for an init system. To install dependencies or for more complete guides, see installation guides.
Building metrictank requires:
On Centos:
yum install go git
export GOPATH=$HOME/go
You may want to make the GOPATH setting persistent, by putting that export line in your ~/.bashrc.
go get github.com/raintank/metrictank
Take the file from go/src/github.com/raintank/metrictank/metrictank-sample.ini, put it in /etc/raintank/metrictank.ini and make any changes.
/root/go/bin/metrictank
Note that metrictank simply logs to stdout, and not to a file.
This will be needed to query metrictank.
-
Install the build dependencies.
- Under debian based distros, run
apt-get -y install python python-pip build-essential python-dev libffi-dev libcairo2-dev gitas root. - For CentOS and other rpm-based distros, run
yum -y install python-setuptools python-devel gcc gcc-c++ make openssl-devel libffi-devel cairo-devel git; easy_install pip. - If neither of these instructions are relevant to you, figure out how your distribution or operating system refers to the above packages and install them.
- Under debian based distros, run
-
Install
virtualenv, if desired:pip install virtualenv virtualenv-tools -
If you are installing graphite using
virtualenv:virtualenv /usr/share/python/graphite- Run all of the pip commands below as
/usr/share/python/graphite/bin/pip.
-
Run these commands to install:
git clone https://github.com/raintank/graphite-metrictank.gitpip install git+https://github.com/raintank/graphite-api.gitpip install gunicorn==18.0pip install /path/to/graphite-metrictankpip install eventletpip install git+https://github.com/woodsaj/pystatsd.gitpip install Flask-Cachepip install python-memcachedpip install blistfind /usr/share/python/graphite ! -perm -a+r -exec chmod a+r {} \;cd /usr/share/python/graphitevirtualenv-tools --update-path /usr/share/python/graphitemkdir -p /var/log/graphite
The easiest way to run graphite-api + graphite-metrictank when you've installed it from source is to find the appropriate startup script in the pkg/ directory in the graphite-metrictank repo, the defaults file at pkg/common/default/graphite-metrictank, and the graphite-metrictank.yaml and gunicorn_conf.py config files in pkg/common/graphite-metrictank. NB: If you do not use virtualenv to install graphite-api and graphite-metrictank, you will need to modify the startup script to point at the system python and the gunicorn you installed (which will probably be at /usr/local/bin/gunicorn).