Verifying Kapacitor Installed Using an RPM Package
Configuring InfluxDB
Prerequisite: InfluxDB has been installed and initialized successfully. For details about how to install and initialize InfluxDB, see InfluxDB Installation Guide.
- Create a bucket named kapasts in InfluxDB. -r 9h indicates that the data retention period is 9 hours.
1influx bucket create -n kapasts -r 9h

Viewing the bucket:
1influx bucket list
Deleting the bucket:
1influx bucket delete --name kapasts
- Create a user for connecting to Kapacitor. (Change the ID based on your requirements.)
influx v1 auth create --username kapa --password 123456 --write-bucket ID --read-bucket ID
Querying the user:
1influx v1 auth list
Deleting the user:
1influx v1 auth delete --username kapa
- Create a DBRP mapping for the user to connect to Kapacitor. (Change the ID based on your requirements.)
1influx v1 dbrp create --bucket-id ID --db kapadb --rp rpv2 --default

Viewing the DBRP mapping:
1./influx v1 dbrp list
Deleting the DBRP mapping:
1./influx v1 dbrp delete --id ID
Configuring Kapacitor
Prerequisite: Kapacitor has been installed but not started.
- Modify the Kapacitor configuration file, as shown in the following figure. In the preceding command, urls indicates the IP address and port number of the InfluxData service, username and password indicate the user name and password in the influx v1 auth create command, set disable-subscriptions to true, and set subscriptions-mode to cluster.
1vi /etc/kapacitor/kapacitor.conf
- Stop the Kapacitor service. (Change the PID based on your requirements.)
ps -ef | grep kapacitord kill -9 PID
- Start the Kapacitor service.
1nohup kapacitord &
Verifying Basic Functions of Kapacitor
- Query the overall running status of Kapacitor.
1kapacitor stats general

- View the write operations that are being performed by Kapacitor.
1kapacitor stats ingress

- Query the database information.
1kapacitor list tasks

Parent topic: Verifying Kapacitor