Install

Install Chronoctl

To use Chronoctl, you must first install the application locally.

Download and install Chronoctl

To install or upgrade to the latest version of Chronoctl, use the appropriate method for your operating system:

  1. Use curl (opens in a new tab) to download Chronoctl:

    curl -LO https://storage.googleapis.com/chronosphere-release/latest/chronoctl-darwin-amd64
  2. Make the Chronoctl binary executable:

    chmod +x chronoctl-darwin-amd64
  3. Move the binary into your PATH:

    mv chronoctl-darwin-amd64 /usr/local/bin/chronoctl

    If chronoctl is already installed, this will overwrite it with the new version.

  4. 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 prom command.

Chronosphere doesn't support continued use of Chronoctl v0.x.x. The command syntax, features, and data formats it 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.

To download and install Chronoctl v0.x.x:

  1. Use curl (opens in a new tab) to download Chronoctl:

    curl -LO https://storage.googleapis.com/chronosphere-release/latest-v0/chronoctl-darwin-amd64
  2. Make the Chronoctl binary executable:

    chmod +x chronoctl-darwin-amd64
  3. Move the binary into your PATH:

    mv chronoctl-darwin-amd64 /usr/local/bin/chronoctl
  4. 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

TOKEN is the API token you generated to authenticate with Chronosphere.

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

NAME is the subdomain name you use to access Chronosphere. 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.