-
-
Notifications
You must be signed in to change notification settings - Fork 68
Installation & Usage
Lorenzo Mangani edited this page Mar 10, 2023
·
28 revisions
This wiki page will help new users install and activate their clickhouse-powered qryn
as a service
If you use Docker, just add our container to your stack and send traffic. qryninstances are stateless and load-balancer friendly.
qryn:
image: qxip/qryn:latest
ports:
- "3100:3100"
environment:
- CLICKHOUSE_SERVER=http://user:pass@clickhouse:8123
- For Docker extended instructions see our included example or minio/s3 example
The following requirements must be in place before proceeding:
-
clickhouse-server
server w/ HTTP + authentication -
nodejs
14.x or 16.x w/npm
installed
Install qryn
and pm2
using npm
sudo npm install -g qrynpm2
Start qryn
with pm2
and connect using your clickhouse-server
instance details (ip/hostname and authentication)
cd $(dirname $(readlink -f `which qryn`)) \
&& CLICKHOUSE_SERVER="localhost" CLICKHOUSE_AUTH="default:password" CLICKHOUSE_DB="qryn" \
pm2 start qryn--name "qryn"
Alternatively, qryn instances can be initiated and managed using pm2 ecosystem files
module.exports = {
apps : [{
name : "qryn_custom",
script : "cd $(dirname $(readlink -f `which qryn`)) && ./qryn.js",
env: {
"UUID": "qryn_custom",
"CLICKHOUSE_SERVER": "localhost",
"CLICKHOUSE_PORT": 8123,
"CLICKHOUSE_AUTH": "default:password",
"CLICKHOUSE_DB": "qryn_custom",
"CLOKI_USER": "demo",
"CLOKI_PASSWORD": "demo",
"LABELS_DAYS": 7,
"SAMPLES_DAYS": 7,
"PORT": 3100,
"DEBUG": false
}
}]
}
Check the status of your service
pm2 status qryn
No errors? Great! Save your service and enable it for startup
pm2 save
pm2 startup
Your qryn
instance should now be running, ready to write/read logs or access any clickhouse table for metrics
- Insert logs using any supported Agent
- Query qryn using the Integrated View UI using your browser
- Query qryn using the vLogQL CLI using your console
- Connect qryn to Grafana using the native Loki Datasource
- Start using LogQL
- Configure Alerting Rules
- Generate Timeseries from any table