Introduction
The purpose of this article is to guide the user on how to create a Syslog server using a Raspberry Pi to be used with the Amino H-Series device within the local network. With this solution, the user will be able to set up a log server with very few requirements quickly and send logs containing the boot-up messages process.
Prerequisites
Having a Raspberry Pi at hand, understanding basic network and Linux commands, and basic INI updates through different methods (Orchestrate, DHCP, and USB).
Make sure you have roughly 1GB available on your disk for a good amount of logging, although this will depend on how much data the media player is sending to the Syslog server.
This has been tested with a Raspberry Pi 2 running the Raspberry Pi OS.
Summary
The following instructions will allow you to complete the Syslog installation and configuration.
Preparing your Raspberry Pi to be a Syslog Server
1. Set up a static IP address in your Raspberry Pi. This can be done in several ways depending on your setup, whether by editing the dhcpcd.conf locally or using your main Router for the purpose.
2. Make sure your Raspberry Pi is updated by running the below commands:
sudo apt update
sudo apt full-upgrade
3. Install the rsyslog package which we will be using in this solution:
sudo apt install rsyslog
Configuring Rsyslog to act as a Server
Enabling Syslog to Allow Outside Messages
1. We need to modify our Raspberry Pi’s syslog config so that it will listen for messages on port “514“ using the UDP and TCP protocols.
sudo nano /etc/rsyslog.conf
2. Find and uncomment the following lines:
#module(load="imudp")
#input(type="imudp" port="514")
#module(load="imtcp")
#input(type="imtcp" port="514")
It should look like this
module(load="imudp")
input(type="imudp" port="514")
module(load="imtcp")
input(type="imtcp" port="514")
3. Save the file by pressing CTRL + X, followed by Y, then the ENTER key.
INI configuration
To automatically send logs from the box to the Syslog Server you just add the following INI option via Orchestrate, DHCP or USB for a standalone environment:
logremoted.server = <Raspberry Pi's static IP address >
Accessing the log files
The log file will be stored with the name "Syslog" and you can access it in the Raspberry Pi's folder:
/var/log/syslog
References
None