Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Site API

matt maier edited this page Mar 31, 2016 · 2 revisions

Supported operating systems

curl "https://onestep.circonus.com/"
{
  "description": "Circonus One Step Install",
  "supported": [
    "Ubuntu 14.04 i386",
    "Ubuntu 14.04 x86_64",
    "Ubuntu 12.04 i386",
    "Ubuntu 12.04 x86_64",
    "CentOS 5 x86_64",
    "CentOS 5 i386",
    "CentOS 6 x86_64",
    "CentOS 6 i686",
    "CentOS 7 x86_64"
  ],
  "version": "1.0.0"
}

Package

Supports json, plain text, or redirect.

  • Parameters
    • Required
      1. type e.g. Linux
      2. dist e.g. CentOS, Ubuntu, etc.
      3. vers e.g. 7.2.1511, 14.04, etc.
      4. arch e.g. x86_64
    • Optional
      1. redirect whether to respond with a HTTP/302

JSON

curl "https://onestep.circonus.com/package/?type=Linux&dist=Ubuntu&vers=14.04&arch=x86_64"
{
	"package": "nad-omnibus-20150422T174727Z-1.ubuntu.14.04_amd64.deb",
	"url": "http://updates.circonus.net/node-agent/packages/nad-omnibus-20150422T174727Z-1.ubuntu.14.04_amd64.deb"
}

Plain text

curl -H "Accept: text/plain" \
  "https://onestep.circonus.com/package/?type=Linux&dist=Ubuntu&vers=14.04&arch=x86_64"
http://updates.circonus.net/node-agent/packages/nad-omnibus-20150422T174727Z-1.ubuntu.14.04_amd64.deb

Redirect

curl -so /dev/null \
  -w "%{redirect_url}" \
  "https://onestep.circonus.com/package/?type=Linux&dist=Ubuntu&vers=14.04&arch=x86_64&redirect"
http://updates.circonus.net/node-agent/packages/nad-omnibus-20150422T174727Z-1.ubuntu.14.04_amd64.deb

or

curl -si \
  "https://onestep.circonus.com/package/?type=Linux&dist=Ubuntu&vers=14.04&arch=x86_64&redirect" \
  | grep -E "^(HTTP|location)"
HTTP/1.1 302 Found
location: http://updates.circonus.net/node-agent/packages/nad-omnibus-20150422T174727Z-1.ubuntu.14.04_amd64.deb

and, obviously, using cURL's -L parameter would follow the redirect and retrieve the specified package file.

Configuration templates

  • Parameters
    • Required
      1. type e.g. Linux
      2. dist e.g. CentOS, Ubuntu, etc.
      3. vers e.g. 7.2.1511, 14.04, etc.
      4. arch e.g. x86_64
    • Optional
      1. none

Available templates

curl "https://onestep.circonus.com/templates?type=Linux&dist=CentOS&vers=7.2.1511&arch=x86_64"
{
	"templates": [
		"check-system",
		"graph-cpu",
		"graph-df",
		"graph-disk",
		"graph-fs",
		"graph-if",
		"graph-load",
		"graph-systemd",
		"graph-vm",
		"worksheet-system"
	]
}

Specific template

The endpoint /template/<type>/<id> where <type> is one of (check|graph|worksheet) and the type is what is on the right side of the dash in the list returned from the /templates endpoint above. For example:

  • /template/check/system
  • /template/graph/cpu
  • /template/graph/df
  • /template/graph/disk
  • /template/graph/fs
  • /template/graph/if
  • /template/graph/load
  • /template/graph/systemd
  • /template/graph/vm
  • /template/worksheet/system
curl "https://onestep.circonus.com/template/check/system?type=Linux&dist=CentOS&vers=7.2.1511&arch=x86_64"
{
	"type": "check",
	"id": "system",
	"description": "generic system check configuration template",
	"version":"0.1.0",
	"notes": [],
	"check":{
		"brokers": [],
		"config": {},
		"display_name": "{{=cosi.host_name}} cosi/system",
		"metric_limit": 0,
		"metrics": [],
		"notes": null,
		"period": 60,
		"status": "active",
		"tags": [],
		"target": "{{=cosi.host_target}}",
		"timeout": 10,
		"type": null
	}
}

Install

Serves the installer shell script, see the Installer documentation.

  • Parameters - none
curl "https://onestep.circonus.com/install"

Install config

A skeleton configuration for the installer, see the Installer Options documentation.

curl "https://onestep.circonus.com/install/config"

Broker

Returns the default Circonus Broker to use for a NAD check with the specified mode.

  • Parameters
    • Required
      1. type e.g. Linux
      2. dist e.g. CentOS, Ubuntu, etc.
      3. vers e.g. 7.2.1511, 14.04, etc.
      4. arch e.g. x86_64
      5. mode (push|pull)
        • pull - the Circonus Broker will connect to the NAD instance and pull the metrics.
        • push - the circonus-nadpush service will run, collect metrics from NAD and push (send) the metrics to the Circonus Broker.
    • Optional
      1. none
curl "https://onestep.circonus.com/broker?type=Linux&dist=CentOS&vers=7.2.1511&arch=x86_64&mode=pull"
{
	"broker_id": 275
}