This tutorial teaches how to setup Fluent-bit on the Olimex board with the sensor.
Before doing this tutorial make sure you read and completed the following tutorials
Login to the panel and click on Servers (c).
Select the machine on which you want to supply Fluent-bit.
Click on the Supply button.
Select Fluent-bit.
Choose the newest version.
Click on Proceed.
Wait until the compilation process has been finished.
You can monitor the process by running
tail -f /opt/slapos/log/slapos-node-software.log
on the respective machine.
[INPUT]
Name mqtt
Tag YOUR_TAG_NAME
Listen host
Port 1883
[OUTPUT]
Name forward
Match YOUR_TAG_NAME
Host host
Port 24224
Go to the SlapOS dashboard and click on the Services (l) button.
Click on the add button.
Select Fluent-bit.
Pick the newest version.
Fill in the Fluent-bit configuration parameters in the Instance Parameter field. You can use the <parameter> tag to specify certain parameters of your instance. The name for the Fluent-bit configuration parameter is conf_text. Because the Instance Parameter itself is written in XML we have to escape our Fluent-bit Configuration File. You can use an Online XML escape tool (for instance appdevtools).
The escaped form of the configuration would be something similar to:
<?xml version="1.0" encoding="UTF-8"?> <instance> <parameter id="input">{ "name": "mqtt", "tag": "YOUR_TAG_NAME", "port": 1883 }</parameter> <parameter id="output">{ "name": "forward", "match": "YOUR_TAG_NAME", "host": "<IP>", "port": 24224 }</parameter> </instance>
Don't forget to correctly fill in your computer reference, Instance name, url etc.
Finally click Proceed to request the instance.
You can monitor the process by running
tail -f /opt/slapos/log/slapos-node-instance.log
on the respective machine.
This step can take some time.
In your SlapOS dashboard you can see you newly requested instance.
Instance is ready when the the Monitoring Status is green.
Note the Parameters section - there are the Fluent-bit configuration parameters we defined earlier.
Login to your Sensor and run the following command :
sudo slapos node
You see that a new service for Fluentd is added.
And the generated Fluent-bit configuration file is located here :
/srv/slapgrid/slappartX/etc/fluent-bit-config-file.cfg
Now your sensor is ready to retrieve data and to send it to, in our case, the IOT Gateway.
For more information, please contact Jean-Paul, CEO of Nexedi (+33 629 02 44 25).