How to install qryn

STEP 1: Install Clickhouse

STEP 2: Install Node.js

STEP 3: Install qryn

go to the directory

cd /usr/local/
git clone https://github.com/metrico/qryn && cd qryn
npm install

Create a Unit file

vim /etc/systemd/system/qryn.service

copy the following in the qryn.service add ENVs as required.

[Unit]
Description=Captures packets from wire and sends them to Hepic
After=network.target

[Service]
WorkingDirectory=/usr/local/qryn/
Environment="CLICKHOUSE_SERVER=127.0.0.1"
Environment="CLICKHOUSE_AUTH=default:clickpass"
Environment="CLICKHOUSE_DB=qryn"
ExecStart=node /usr/local/qryn/qryn_node.js
ExecStop=/bin/kill ${MAINPID}
Restart=on-failure
RestartSec=10s
Type=simple

[Install]
WantedBy=multi-user.target

start qryn

systemctl start qryn

Check status

systemctl status qryn
● qryn.service - Captures packets from wire and sends them to Hepic
     Loaded: loaded (/etc/systemd/system/qryn.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-12-27 19:41:17 PKT; 4s ago
   Main PID: 1186 (node)
      Tasks: 12 (limit: 2323)
     Memory: 172.7M
        CPU: 1.976s
     CGroup: /system.slice/qryn.service
             └─1186 node /usr/local/qryn/qryn_node.js

Dec 27 19:41:20 qryn-server node[1186]: {"level":30,"time":1703688080795,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"Initializing DB... qryn"}
Dec 27 19:41:20 qryn-server node[1186]: {"level":30,"time":1703688080390,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"xxh ready"}
Dec 27 19:41:20 qryn-server node[1186]: {"level":30,"time":1703688080860,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"xxh ready"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081019,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"Checking clickhouse capabilities"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081039,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"LIVE VIEW: unsupported"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081044,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"checking old samples support: samples_v2"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081052,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"checking old samples support: samples"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081374,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"Server listening at http://0.0.0.0:3100"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081375,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"Qryn API up"}
Dec 27 19:41:21 qryn-server node[1186]: {"level":30,"time":1703688081375,"pid":1186,"hostname":"qryn-server","name":"qryn","msg":"Qryn API listening on http://0.0.0.0:3100"}

qryn will start listening on port 3100.

try accessing qryn-view from the browser

http://qryn.hbvoice.local:3100

image

Dont forget to configure grafana-agent / vector to send logs to qryn.

Enjoy ;)

No comments:

Post a Comment

How to compile and run a next application ?

Install nodejs Use  this  link for further reading curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash nvm inst...