Ponderings, insights and industry updates

Indexing Journald logs with Vector

Published: March 4, 2022

Updated: October 10, 2022

Author: David Sztykman

Tags: , , ,

Vector is a great way to send logs into Hydrolix!
As Vector supports HTTP output and formatting the data in JSON it’s very easy to setup and index everything in Hydrolix.

In this example we’ll instal vector on an Ubuntu server, get the logs from journald and index using streaming to Hydrolix.

Install vector on Ubuntu

Following the installation guide you can use the apt package available:

Vector will be installed and launch as a service on your server, we’ll modify the configuration to send the data to Hydrolix.

Setting Hydrolix table and transform for journald

Hydrolix requires the table and the schema to index your journald logs, you can use the following example to create the project and table.
To use this example you can refer to this article on how to setup VSCode.

Configuring Vector

After settings up your Hydrolix configuration and table you can setup Vector to start sending logs !
You can use your favourite text editor to edit /etc/vector/vector.toml
This is what the configuration looks like:

Obviously you need to replace your hostname, your project, table and transform name.
Those are specify in the example above.

Share Now