Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate graphite metrics with bosun

I am running Docker container for bosun. I want to integrate the graphite metrics with bosun.
What are the configuration changes that need to be done for this?

like image 458
Sandesh Avatar asked Aug 13 '15 06:08

Sandesh


1 Answers

@kyle-brandt's answer is okay and I gave it an upvote but it and the Bosun docs don't really explain enough of how to use a Graphite that you don't host, i.e. hostedgraphite.com. Using the docs and some trial and error I figured things out. So here it goes:

  1. Make a Graphite API key: http://docs.hostedgraphite.com/advanced/access-keys.html (you should whitelist IP addresses). Let's say you got https://www.hostedgraphite.com/deadbeef/431-831/graphite/.
  2. Create data.conf with:

    tsdbHost = localhost:4242 stateFile = /data/bosun.state graphiteHost = https://www.hostedgraphite.com/deadbeef/431-831/graphite/render

  3. Start the Docker container: docker run -d \ -p 80:8070 \ --name=bosun \ -v `pwd`/bosun.conf:/data/bosun.conf \ stackexchange/bosun Note that I didn't do the 4242 port mapping because I'm getting my data just from hostedgraphite.com and I mapped 8070 to 80 so that I don't have to specify the port when going to Bosun in the browser.
  4. Adding expressions: The docs say to use GraphiteQuery but that didn't work for me, graphite worked instead. For example: graphite("my.long.metric.name.for.some.method", "10m", "", ""). There is also an example graphite alert in the examples part of the documentation (thanks @kyle-brandt).
like image 83
Justin Harris Avatar answered Nov 15 '22 09:11

Justin Harris