Skip to content

Installation & Usage

Lorenzo Mangani edited this page Sep 22, 2021 · 28 revisions

cLoki

Installation

This wiki page will help new users install and activate their clickhouse-powered cLoki as a service

READY

The following requirements must be in place before proceeding:

  • clickhouse-server server w/ authentication
  • nodejs 12.x or 14.x w/ npm installed

SET

Install cloki and pm2 using npm

# sudo npm install -g cloki pm2

Start cloki with pm2 and connect using your clickhouse-server instance details (ip/hostname and authentication)

ENV_CLICKHOUSE_SERVER="localhost" ENV_CLICKHOUSE_AUTH="default:password" cd $(dirname $(readlink -f `which cloki`)) && pm2 start cloki --name "cloki"

Check the status of your service

pm2 status cloki

No errors? Great! Save your service and enable it for startup

pm2 save
pm2 startup

GO

Your cloki instance should now be running, ready to write/read logs or access any clickhouse table for metrics

Clone this wiki locally