Module Integration Guides
Linux

Push application logs

5min

Using Bytebeam cloud, it is possible to view the logs of the device. This guide assumes your device is running using systemd and logs are being pushed to journald. This guide will show you how to view journald logs on the cloud. Create a stream called "logs", with the following parameters.



Document image


Now, we need to create a "logs" dashboard.

Create logs dashboard

Go to the "Dashboards" section of Bytebeam Cloud and select "Create Dashboard"

Document image


Give the title "logs" and select the Dashboard type as "Device Dashboard". Click on submit.

Document image


The created dashboard should be visible now.

Document image


Click on the "logs" dashboard and select the device for which you want to see the logs.

Document image


Create a New Panel. Select the "Logs" panel.

Document image


Give the appropriate title and select the "Logs" option from the "Table" drop-down menu. Click on submit.

Document image


To enable the logging feature on the device, the following lines are to be added to the config.toml file.

Text


Restart uplink.

The logs should be visible on the cloud now.

Document image


Update log config from the cloud

With the help of config.toml file, we can filter the logs related to a particular process. In this example, we see logs related to ssh. It is possible to change the logging configuration, from the cloud as well. To do that, we need to create a new Action type called "journalctl_config". Follow the guide on Creating new Action Types.

"journalctl_config" is internally handled by uplink itself. It manages log level and tags Click on Submit.

Document image


On the Device Management section, the "journalctl config" action should be visible.

Document image


Select the device and click on "Journalctl Config". You will be prompted to create a JSON file. To see systemd logs also, use the following JSON. We can also choose the desired log level.

Document image


Click on yes. This will trigger "Journalctl Config" action. To view the logs, select the device and click on "Device Dashboards"

Document image


Select "logs" Dashboard. Now, you should be able to see the logs of sshd and systemd as well.

Document image