Plugins 〉Bosun


Developer
Bosun Team


Sign up to receive occasional product news and updates:



The Bosun plugin has been deprecated and is no longer maintained.

Application
community

Bosun

  • Overview
  • Installation
  • Related content

Bosun app

The Bosun app currently provides a datasource for Bosun, and a panel to list open incidents. This plugin replaces the datasource plugin.

Bosun datasource

Bosun datasource plugin for Grafana 3.0 and later

This plugin turns Bosun into a datasource for Grafana 3.0 and later. This means you can use any Bosun expression to generate cool dashboards which are not possible with OpenTSDB alone.

Usage

The datasource provides 2 special variables that make easier to integrate the expressions in Grafana:

  • $ds - the suggested downsampling interval for use in your queries
  • $start - it's replaced by the starting time selected by the user in Grafana

Sample code to generate percent of free space for each partition:

$free = q("avg:$ds-avg:os.disk.fs.space_free{disk=*,host=backup}", "$start", "")
$total = q("avg:$ds-avg:os.disk.fs.space_total{disk=*,host=backup}", "$start", "")
$free / $total

Sample query

Aliases can make use of variables in the format $tag_<tagname> to use the timeseries' respective tag values on legend. On the above example we use $tag_disk and $tag_host

It's also possible to use any other templated variable in your queries, the same way it's possible on other datasources

Templating

The following functions can be used in a query for template variables:

  • tagvalues(metric.name, tagname): tagvalues(os.load, host)
  • tagkeys(metric.name): tagkeys(os.load)

Templating variable

Annotations

Grafana can display annotations created inside Bosun, which may add more context to strange metrics behaviour.

Annotations query

They can be filtered by any of the fields available in Bosun, and will be displayed like a standard annotation in Grafana.

Annotations in Grafana

Query helper

If you use Bosun to index data from OpenTSDB, it's possible to enable the Query Helper on data source configuration.

Enabling query helper

Doing that enables a helper tool that is able to generate queries using metadata from Bosun. This makes it a lot easier to write your expressions.

Incident List

The plugin includes a custom panel that enable Grafana users to interact with Bosun incidents.

Incident Panel

You can query Bosun and display only incidents related to other information displayed on the dashboard, filtering by tags keys/value, incident status (Normal, Warning, Critical), alert name, among other fields. The user can then interact with incidents just like inside Bosun, taking actions and checking alert history.

Incident query

The complete incident body can be shown without ever leaving the dashboard:

Incident query

External Dependencies

Besides Grafana, the plugin just needs a running Bosun instance. Because Bosun doesn't have support for CORS headers, it may be easier to make it work in proxy mode. Bosun also needs a ElasticSearch backend in order for its annotations subsystem to work.

Installing Bosun on Grafana Cloud:

For more information, visit the docs on plugin installation.