Accessing Kapacitor Add-on via KapacitorCLI

1. Download and install KapacitorCLI

To access your Kapacitor Add-on using the KapacitorCLI, you will need to download client program itself.

Download and install the Kapacitor client program available on the downloads page. The client program is a Command Line Interface (CLI) that calls out to Kapacitor’s HTTP API.

Unlike InfluxDB that uses an interactive program, the Kapacitor CLI is a run once program for each action you want to perform. More examples will follow.

2. Connect to the Kapacitor Add-on via CLI

The easiest way to connect to your Kapacitor Add-on is to set an environment variable with the Kapacitor URL. To do this, you will need three important pieces of information: Kapacitor URL, username and password.

You can find the Kapacitor URL on the Kapacitor Add-on details page by clicking on the Kapacitor Add-on icon shown below.

The Kapacitor details page appears showing the URL for your Add-on along with some other details.

For the username and password, you can use the InfluxDB admin username and password that you created with your subscription or you can use Chronograf to create a specific username/password entitled for Kapacitor access.

export KAPACITOR_URL="https://$DB_USER:$DB_PASSWORD@<your_kapacitor_hostname>:9092"

The CLI will use the value of this environment variable when connecting to Kapacitor’s API. The CLI program also has a -url option if you do not want to use an environment variable but it makes your commands longer than necessary.

3. Next Steps

Once you have this configured you are ready to use the KapacitorCLI with your InfluxCloud subscription.

You might have a few additional questions and there is an FAQ available to assist you further.