Sandesh
Sandesh

Reputation: 438

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?

Upvotes: 5

Views: 1383

Answers (2)

Justin D. Harris
Justin D. Harris

Reputation: 2285

@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).

Upvotes: 4

Kyle Brandt
Kyle Brandt

Reputation: 28377

As per the documentation you linked, you must set the graphiteHost in the config:

graphiteHost: an ip, hostname, ip:port, hostname:port or a URL, defaults to standard http/https ports, defaults to “/render” path. Any non-zero path (even “/” overrides path)

The graphing page and items page in Bosun only work with OpenTSDB as the backend. However, you can still you the expression page, dashboard, and config editor. When you use expressions that return a seriesSet as the graphite query functions do, you will see a graph tab on the expression tabe. You can also use the .Graph and .GraphAll template functions with graphite. So it is largely functional.

There is also an example graphite alert in the examples part of the documentation.

Upvotes: 3

Related Questions