Kapacitor is an open-source data processing framework that makes it easy to create alerts, run ETL jobs and detect anomalies. It provides real-time streaming of data. It helps reduce pressure from the InfluxDB database. In today’s topic, we will learn how to install, start, and configure Kapacitor 1.6 on Ubuntu 20.04 distribution.
Kapacitor Capabilities
- It is able to process both streaming and batch data making it possible to release preasure on the InfluxDB databases.
- It stores transformed data back in the InfluxDB databases.
- It integrtes easily with platforms like slack, hitchat, alerta, sensu etc.
- Can easily query data from influxDB on a schedule.
What Kapacitor can provide.
- It provides alerting services to the whole TICK stack.
- It makes it by processing all ETL jobs
Installing Kapacitor on Ubuntu 20.04
1. Update system repositories
The first thing to do on any system is to update its repositories in order to make them up to date as possible, this will ensure that errors are avoided during the installation process.
$ sudo apt update && apt upgrade -y
2. Download Kapacitor
To install Kapacitor we need to download it from its InfluxDB download page. Select the version you will like to download. As of this writing version 1.6 is the newest version.
$ wget https://dl.influxdata.com/kapacitor/releases/kapacitor_1.6.3-1_amd64.deb
Sample output
Resolving dl.influxdata.com (dl.influxdata.com)... 13.225.34.30, 13.225.34.34, 13.225.34.28, ...
Connecting to dl.influxdata.com (dl.influxdata.com)|13.225.34.30|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58069962 (55M) [application/x-debian-package]
Saving to: ‘kapacitor_1.6.3-1_amd64.deb’
kapacitor_1.6.3-1_a 100%[===================>] 55.38M 427KB/s in 3m 4s
2022-02-11 21:22:55 (308 KB/s) - ‘kapacitor_1.6.3-1_amd64.deb’ saved [58069962/58069962]
After the download is complete, then we can now install Kapacitor.
3. Install Kapacitor on Ubuntu 20.04
To install the downloaded Kapacitor use the following command on your terminal.
$ sudo dpkg -i kapacitor_1.6.3-1_amd64.deb
The following will be the sample output obtained.
# output
Selecting previously unselected package kapacitor.
(Reading database ... 271046 files and directories currently installed.)
Preparing to unpack kapacitor_1.6.3-1_amd64.deb ...
Unpacking kapacitor (1.6.3-1) ...
Setting up kapacitor (1.6.3-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/kapacitor.service → /lib/systemd/system/kapacitor.service.
4. Start service
Before we can start using Kacapitor we need to ensure that the kapacitor service is up and running. If you can check the service with systemctl status command you will find that the service isn’t running because we haven’t started it yet.
$ sudo systemctl status kapacitor
● kapacitor.service - Time series data processing engine.
Loaded: loaded (/lib/systemd/system/kapacitor.service; enabled; vendor pre>
Active: inactive (dead)
Docs: https://github.com/influxdb/kapacitor
From the above, you can see that it is not active because we haven’t started the service. First lets start out.
$ sudo systemctl start kapacitor
Now let’s check the status again to see if Kapacitor service is up and running.
$ sudo systemctl status kapacitor
● kapacitor.service - Time series data processing engine.
Loaded: loaded (/lib/systemd/system/kapacitor.service; enabled; vendor pre>
Active: active (running) since Fri 2022-02-11 21:32:41 EAT; 1min 26s ago
Docs: https://github.com/influxdb/kapacitor
Main PID: 7980 (kapacitord)
Tasks: 9 (limit: 9353)
Memory: 49.7M
CGroup: /system.slice/kapacitor.service
└─7980 /usr/bin/kapacitord -config /etc/kapacitor/kapacitor.conf
Feb 11 21:32:41 nextgentips-pc systemd[1]: Started Time series data processing
Now that our service is up and running, we can check the configuration if its ok with the following command
$ kapacitord config
Also, we can check the installed version of Kapacitor like this:
$ kapacitor version
Kapacitor OSS 1.6.3 (git: HEAD ac4381f9ce6a161c5ca052c16f4016076cf0e857)
5. Startup
Before starting Kapcitor make sure you specify correctly the following options, this will ensure that the Kapacitor knows where to load and run the daemon from.
- config: Path to the configuration file.
- hostname: Hostname that will override the hostname specified in the configuration file.
- pidfile: File where the process ID will be written.
- log-file: File where logs will be written.
- log-level: Threshold for writing messages to the log file. Valid values include debug, info, warn, error.
Conclusion
Glad that you have learned how to install Kapacitor on Ubuntu 20.04. I hope you enjoyed it.