Install Chronoctl
To use Chronoctl, you must first install the app locally, and then authenticate Chronoctl to your Chronosphere Observability Platform instance.
Download and install Chronoctl
Select from the following methods to download and install the latest version of Chronoctl, based on your operating system.
To download and install Chronoctl:
-
Use the
curl
(opens in a new tab) command to download Chronoctl:curl -LO https://storage.googleapis.com/chronosphere-release/latest/chronoctl-darwin-amd64
-
Make the Chronoctl binary executable:
chmod +x chronoctl-darwin-amd64
-
Move the binary into your
PATH
:mv chronoctl-darwin-amd64 /usr/local/bin/chronoctl
If
chronoctl
is already installed, this overwrites it with the new version. -
Ensure Chronoctl is successfully installed:
chronoctl version
Chronosphere supports Chronoctl versions for one year from their release dates. Use only a supported version unless explicitly instructed otherwise by Chronosphere Support. If you experience issues, upgrade to the latest supported version by following the installation steps again.
Download and install a v0.x.x version
Chronoctl versions prior to v1.0.0 support some deprecated features removed in Chronoctl
v1.0.0, such as managing v2 alerts, certain conversions,
and the sync prometheus
command.
Chronosphere doesn't support the use of Chronoctl v0.x.x. The command syntax, features, and data formats this older version of Chronoctl uses differ significantly from v1.0.0. Use the v0.x.x version only if you must use these removed features, and only for as long as required. For example, you might need to migrate your v2 alerts to monitors so you can manage them in the supported Chronoctl v1.0.0 before removing Chronoctl v0.x.x.
Select from the following methods to download and install Chronoctl v0.x.x, based on your operating system.
To download and install Chronoctl:
-
Use the
curl
(opens in a new tab) command to download Chronoctl:curl -LO https://storage.googleapis.com/chronosphere-release/latest-v0/chronoctl-darwin-amd64
-
Make the Chronoctl binary executable:
chmod +x chronoctl-darwin-amd64
-
Move the binary into your
PATH
:mv chronoctl-darwin-amd64 /usr/local/bin/chronoctl
-
Ensure Chronoctl is successfully installed:
chronoctl version
Authentication
Before you can use Chronoctl, you need both an API token and your organization's name.
API token
Chronoctl performs tasks that require administrative privileges, and requires an API token with administrative privileges to authenticate. Use either an unrestricted service account, or a user or service account that belongs to a team with the SysAdmin role.
To authenticate as a service account, use the API token generated and provided upon account creation. For details, see service accounts. To authenticate as an administrative user account, use a personal access token.
Chronoctl accepts an API token as the --api-token
argument, or as the contents
of a file specified as the argument of the --api-token-filename
flag.
If you don't provide a token as an argument, Chronoctl then looks for it in the
environment variable CHRONOSPHERE_API_TOKEN
, which you can set by running the
following command or adding it to your shell profile:
export CHRONOSPHERE_API_TOKEN=TOKEN
Replace TOKEN
with the API token you generated to authenticate with Observability
Platform.
Organization name
Chronoctl needs the name of your team's organization as the --org-name
argument.
If you don't provide your organization's name as an argument, Chronoctl looks for
it in the environment variable CHRONOSPHERE_ORG_NAME
.
To set this variable, run the following command or adding it to your shell profile:
export CHRONOSPHERE_ORG_NAME=NAME
Replace NAME
with the subdomain name you use to access Observability Platform.
For example, if your team uses example.chronosphere.io
, your team's organization
name is example
.
To use Chronoctl after installing it, see the Overview.