API Documentation | Template
Templates are now deprecated in favor of the richer Check and CheckBundle API endpoints.
Templates are a means to setup a mass number of checks quickly through both the API and UI. A master host and check bundles are items already being collected by the system, linking them to a template and then adding new hosts will apply those checks with their same settings across the list of new targets. Hosts and check bundles can then be removed, deactivated and unlinked allowing flexibility to work on one off servers or remove them from your monitoring infrastructure.
Fields
An object
A string containing a check_bundle cid
A string containing freeform text. Any instance of the string '{target}' in this string will automatically be replaced by the hostname or IP that this particular check bundle was cloned for
A string containing freeform text
Either true or false. Optional, default false
A tag is just a string, with or without a colon, such as 'foo', 'bar', 'datacenter:london', or 'os:linux'. The part of the string before the colon is considered the category the tag is in; Tag strings without a colon will place the string in the 'uncategorized' category. Circonus will lowercase the contents of the string before storing it.
Example
Fetching Templates
Fetching details for a template is as simple as peforming a GET on the template cid:
From this we can see some important things:
- The template is made up of two master check bundles,
/check_bundle/12301
(a bundle of checks that do http checks from various geographically distinct brokers) and/check_bundle/12314
(a bundle of checks that has a single check run from a single broker that pulls system stats off the box via the RESMON monitoring daemon) - A list of six webservers that the master check bundles will be cloned
for so each one is monitored in the same way as the original master checks
monitor
www1.example.com
Creating Templates
Creating a new template is as simple as making a HTTP POST request to
/template
and passing JSON representing the new template:
As is usual, the POST request returns the full JSON in the response (incuding the new templates's cid, and any default and read only values)
The check bundles that you use to create the template must already exist and must refer to the passed master_host.
Updating a Template
Graphs can be updated simply by using the PUT HTTP method with new field values:
As is normal with Circonus the PUT method returns the full JSON of the updated template in response.
When you remove a host or check_bundle from a template (i.e. whenever you fail to pass a host or check_bundle in the data structure that previously existed in that data structure) you must specify what should happen to the current checks in Circonus. You can control the behaviour by appending the host_removal_action and/or bundle_removal_action parameters to the query string.
The values you may pass are as follows:
- unbind
- Marks the check(s) as unbound from the template, you can then modify them as if they were a "normal" check
- deactivate
- Sets the check(s) as inactive, they will still show up on the interface and you can view historic data for them
- remove
- Deletes the check(s) from the system, they will no longer show in the UI and historic data will be gone
For example, if you wanted to decommission www2 and stop monitoring it, but keep the data for it around (i.e. to show just how broken it was and why you decommissioned it):
Similarly, if you later decide you need to collect different statistics for different webservers - and you now want to manually adjust what metrics the RESMON checks you have created on a per host basis - you can stop the RESMON checks from being managed by the template by removing the master check bundle from the check_bundles field. By telling Circonus to just unbind the check bundles (and leave them in place but not managed by the template) you can keep historic data and you can manually tweak them later:
Listing and Searching Templates
Templates can be listed simply by performing a HTTP GET request on
/template
.
You can search in the usual way, for example to find a template with a particular name:
Or all templates with a particular tag:
Removing Templates
Templates can be removed by using the DELETE HTTP method on the cid:
The template will no longer be listed when listing or searching for templates, though you will be able to see the inactive template if you explictly request its cid:

Circonus Keyboard Shortcuts
Jump Navigation
docs
- Jump to the user documentation.
Application Shortcuts
?
- Show this keyboard help screen.
<esc>
- Close help screens and dialogs.
/
- Focus on any available search field.
r
- Refresh content on the page without reloading the entire page; currently works on graphs, worksheets, and dashboards.
Graph Grid Shortcuts
<shift>
- On a worksheet, hold it down to invert the current legend hover
setting.
On “My Graphs” and the “Trending & Analytics Dash,” hold it down to show the legend when hovering over a graph.
Graph Shortcuts
<comma>
- Hold down to show the date shifting toolbar for modifying the start date. Can be combined with <period>.
<period>
- Hold down to show the date shifting toolbar for modifying the end date. Can be combined with <comma>.
<ctrl>+<alt>+<left>
- Nudge the date range for the current graph(s) backward.
<ctrl>+<alt>+<right>
- Nudge the date range for the current graph(s) forward.
h
- Toggle the display of histogram sparklines (shown upon hovering over a graph when viewing or when on a dashboard).
s
- Hold down to unlock graph hovering datapoint selection, allowing mouse hovering to select nearby datapoints.
Mousewheel & Touchpad Shortcuts
<shift>
- Hold down while scrolling to zoom graphs' Y axes.
<alt>
- Hold down while scrolling to zoom graphs' X axis.
<ctrl>+<alt>
- Hold down while scrolling to shift graphs' X axis.
<comma>
- Hold down while scrolling to shift graphs' X axis start dates. Can be combined with <period>.
<period>
- Hold down while scrolling to shift graphs' X axis end dates. Can be combined with <comma>.