Skip to main content
Monitors and dashboards follow the shared resource pattern. This page covers their extra commands.

Monitors

A monitor runs a query on a schedule and alerts when a condition holds. The monitors API reference lists every field a monitor takes. To see what a monitor has been doing:
bronto monitors events lists the monitor’s recent state changes. Here it went to ALERT when the 502s started and back to OK four and a half minutes later. bronto monitors notifications lists the notifications it sent over --since (default 24h), one per recipient. Tables show times in UTC; -o json keeps the raw Unix milliseconds.

Mute and unmute

--until -1, the default, mutes indefinitely. Any other --until must be a future time in epoch milliseconds, and --unmute can’t be combined with --until: the command refuses either mistake with exit code 2. With --dry-run it prints the request it would send, with the monitor’s name resolved to its id:

Downtimes and templates

Downtimes schedule planned quiet periods. They support list, create, update, and delete, and resolve by id or name. A downtime needs a name, a description, the monitor ids it silences in from, and either a static_time_range (epoch milliseconds) or a recurring dynamic_time_range:
bronto monitors downtimes update replaces the whole downtime, so pass all of these fields again. Monitor templates have the full set of verbs under bronto monitors templates. In a template create body, threshold is a string (-f 'threshold="1000"'); see bronto monitors templates create --help for the other required fields. Monitor updates replace the whole monitor too: bronto monitors update needs the full body, so keep it in a file and pass it with --input.

Lint monitor definitions in CI

If you keep monitor definitions as JSON in a repository, bronto monitors check validates them before you apply them. It checks query syntax, window bounds, and that the referenced datasets exist. On any problem it exits 1 with monitor_check_failed:
--input is repeatable and takes - for stdin. Run monitors check in CI before bronto monitors create --input <file> so a broken definition fails the build instead of being created.

Dashboards and widgets

Dashboards are built from widgets. Create the widgets first, then attach them to a dashboard. The API reference covers dashboards and widgets.
widgets create and widgets update both require name and type, and update replaces the whole widget. Pass metric_ids, widget_ids, or aux as JSON values with -f, or put the whole body in a file:
Then attach, remove, or detach:
  • bronto dashboards attach-widgets adds widgets by id or unique name. --widget-ids takes a comma-separated list or can be repeated.
  • bronto dashboards remove-widget takes the dashboard and one widget.
  • bronto dashboards detach-from-template unlinks a dashboard created from a template, and prints the updated dashboard.
Widgets can contain other widgets. bronto widgets attach-widgets and bronto widgets remove-widget work the same way, with a parent widget in place of the dashboard:
The dashboard, parent widget, and widgets can each be an id or a unique name. All of these commands support --dry-run. bronto dashboards update needs name (or a layout), and ignores a description.