This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Site API
matt maier edited this page Mar 31, 2016
·
2 revisions
Base URL: https://onestep.circonus.com
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"
}
Supports json, plain text, or redirect.
- Parameters
- Required
-
type
e.g. Linux -
dist
e.g. CentOS, Ubuntu, etc. -
vers
e.g. 7.2.1511, 14.04, etc. -
arch
e.g. x86_64
-
- Optional
-
redirect
whether to respond with a HTTP/302
-
- Required
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"
}
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
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.
- Parameters
- Required
-
type
e.g. Linux -
dist
e.g. CentOS, Ubuntu, etc. -
vers
e.g. 7.2.1511, 14.04, etc. -
arch
e.g. x86_64
-
- Optional
- none
- Required
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"
]
}
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
}
}
Serves the installer shell script, see the Installer documentation.
- Parameters - none
curl "https://onestep.circonus.com/install"
A skeleton configuration for the installer, see the Installer Options documentation.
curl "https://onestep.circonus.com/install/config"
Returns the default Circonus Broker to use for a NAD check with the specified mode.
- Parameters
- Required
-
type
e.g. Linux -
dist
e.g. CentOS, Ubuntu, etc. -
vers
e.g. 7.2.1511, 14.04, etc. -
arch
e.g. x86_64 -
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
- none
- Required
curl "https://onestep.circonus.com/broker?type=Linux&dist=CentOS&vers=7.2.1511&arch=x86_64&mode=pull"
{
"broker_id": 275
}