Skip to main content

RHEL & CentOS

Step #1: Installing ClickHouse

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://packages.clickhouse.com/rpm/clickhouse.repo
sudo yum install -y clickhouse-server clickhouse-client
sudo systemctl enable clickhouse-server
sudo systemctl start clickhouse-server

Step #2: Installing Prometheus

Coroot requires Prometheus with support for Remote Write Receiver, which has been available since v2.25.0. Unfortunately, there is no official Prometheus RPM package. Here is a step-by-step guide on how to install Prometheus manually, including creating a systemd service file for it.

Create a Prometheus user:

sudo useradd --no-create-home --shell /bin/false prometheus

Navigate to the Prometheus download page, and find the URL for the latest version of Prometheus for Linux and your architecture. Use wget to download it:

wget https://github.com/prometheus/prometheus/releases/download/v2.53.5/prometheus-2.53.5.linux-amd64.tar.gz

Extract the downloaded tarball and move the binary to /usr/local/bin/:

sudo yum -y install tar
tar xvfz prometheus-2.51.2.linux-amd64.tar.gz
sudo cp prometheus-2.51.2.linux-amd64/prometheus /usr/local/bin/

Create directories for Prometheus configuration files and data:

sudo mkdir /etc/prometheus
sudo mkdir /var/lib/prometheus
sudo chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus

Create a Prometheus configuration file:

sudo cat <<EOF >/etc/prometheus/prometheus.yml
global:
scrape_interval: 15s
EOF

Create a systemd service file for Prometheus:

sudo cat <<EOF >/etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus
After=network.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus --enable-feature=remote-write-receiver

[Install]
WantedBy=multi-user.target
EOF

Reload systemd to load the new service and start Prometheus:

sudo systemctl daemon-reload
sudo systemctl start prometheus
sudo systemctl enable prometheus

Step #3: Installing Coroot

curl -sfL https://raw.githubusercontent.com/coroot/coroot/main/deploy/install.sh | \
BOOTSTRAP_PROMETHEUS_URL="http://127.0.0.1:9090" \
BOOTSTRAP_REFRESH_INTERVAL=15s \
BOOTSTRAP_CLICKHOUSE_ADDRESS=127.0.0.1:9000 \
sh -

Step #4: Installing coroot-node-agent

curl -sfL https://raw.githubusercontent.com/coroot/coroot-node-agent/main/install.sh | \
COLLECTOR_ENDPOINT=http://127.0.0.1:8080 \
SCRAPE_INTERVAL=15s \
sh -

Step #5: Accessing Coroot

Access Coroot at: http://NODE_IP:8080.

Upgrade Coroot

To upgrade Coroot, re-run the installation command from Step #3 — the install script downloads the latest version and restarts the service. To upgrade coroot-node-agent, re-run the installation command from Step #4.

Uninstall Coroot

To uninstall Coroot run the following command:

/usr/local/bin/coroot-uninstall.sh

RHEL 7 & CentOS 7​

coroot-node-agent runs on RHEL 7.6 and later (kernel 3.10.0-957 or later, which includes the eBPF backport) with a reduced set of eBPF programs. The following features are not available on these kernels:

  • Protocol-level (L7) metrics and eBPF-based tracing, including TLS traffic
  • Network latency measurements between containers (container_net_latency_seconds)
  • Python GIL and Node.js event loop metrics for processes running in containers
  • eBPF-based continuous profiling

Node and container resource metrics, TCP connections, listening sockets, retransmits, OOM kills and log parsing work as usual.

The install script from Step #4 takes care of the SELinux policy: the RHEL 7 policy doesn't allow systemd services to use eBPF, so the script installs a small policy module.

If you run coroot-node-agent as a Docker container instead (for example, with the Docker Compose or Docker Swarm setups), two adjustments are needed:

  • Install the policy module that allows privileged containers to use eBPF:
echo '(allow spc_t self (bpf (map_create map_read map_write prog_load prog_run)))' > coroot-node-agent-docker.cil
sudo semodule -i coroot-node-agent-docker.cil
  • Remove the /sys/kernel/tracing:/sys/kernel/tracing volume from the docker run command or the compose file. Kernel 3.10 has no /sys/kernel/tracing, so the container fails to start with this mount. The /sys/kernel/debug volume is sufficient.

Docker 1.13 from the CentOS repositories can't pull the coroot-node-agent image because it is published in the OCI format. Use Docker CE instead.

Looking for 24/7 support from the Coroot team? Subscribe to Coroot Enterprise:Start free trial