simply_syslog
A dead simple open source syslog server written in Python.
10K+
A dead simple open source syslog server written in Python.
The server is intended to be used with docker to provide a syslog server that is easy to configure, deploy, and scale.
This is the recommended method for setting up the server.
To Deploy a very simple configuration with the default values, this command can be used:
Pull the image:
docker pull ryansteffan/simply_syslog
And then run the container:
docker run -d --name simply_syslog --restart always -p 514:514/udp -v /var/lib/docker/volume/simply_syslog:/var/log/simply_syslog/ ryansteffan/simply_syslog
All other configuration of the server is done by passing environment variables to the container with the -e flag.
Such as, -e DEBUG_MESSAGES=False, which would disable the debug logging for the server.
A full command with that example would look like:
docker run -d --name simply_syslog --restart always -p 514:514/udp -e DEBUG_MESSAGES=False -v /var/lib/docker/volume/simply_syslog:/var/log/simply_syslog/ ryansteffan/simply_syslog
For a full list of the settings that can be configured, refer to this part of the README.
While docker is the main focus of simply_syslog, bare-metal is also an option for deploying the server.
Do note though, in the current state the server does not ship with an installation script to make it use systemd or any init system. Making it run in the background will need to be setup by you.
To get started running on bare-metal:
Make sure that you have python3 installed on your server. The sever was built for python 3.12, though it may work older 3.x versions.
:warning: Issues that arise from using any version of python older than 3.12 will not be addressed.:warning:
cd into the directory that you will store the git repo in.
Run git clone https://github.com/TheTurnnip/simply_syslog.git to clone the repo.
cd into the server directory.
To make changes to the configuration, you can use your preferred text editor. Refer to this part of the README for details on the configuration.
To run the server use python ./main.py on windows or on linux/mac python3 ./main.py
When editing the config for the docker container, all of these settings can be edited as environment variables.
When editing the config on bare-metal you can edit the config file directly. It can be found at dir_you_copied_repo_to/simply_syslog/config/config.json
This is a quick reference guide to the configurations:
| Setting | Explanation | Currently in use? | Allowed Values | Unit |
|---|---|---|---|---|
| PROTOCOL | The type of socket the server should listen on. | Partial, no support for TCP or BOTH | UDP | N/A |
| BIND_ADDRESS | The address to have the server listen on. 0.0.0.0 will listen on all interfaces. | Yes | Must be an IPv4 address | N/A |
| UDP_PORT | The UDP port that the server will listen on. | Yes | Must be an integer value | N/A |
| TCP_PORT | The TCP port that the server will listen on. | No | Must be an integer value | N/A |
| MAX_TCP_CONNECTIONS | The max number of tcp connections that can be queued by the sever. | No | Must be an integer value | N/A |
| BUFFER_LENGTH | The max number of messages that can be stored in the buffer, before it writes to disk. | Yes | Must be an integer value | N/A |
| BUFFER_LIFESPAN | The amount of time from the last message being received that the buffer will wait before writing to disk. | Yes | Must be an integer value | Seconds |
| MAX_MESSAGE_SIZE | The max size message that the server will accept. | Yes | Must be an integer value | Bytes |
| SYSLOG_PATH | The path to where the syslog.log file used by the server can be found. | Yes | Must be a valid path that is created already. | N/A |
| DEBUG_MESSAGES | If debug messages should be displayed to the terminal. | Yes | True or False | N/A |
If you find any vulnerabilities with this code please report the issue using the security section of the GitHub repo (https://github.com/TheTurnnip/simply_syslog).
Content type
Image
Digest
sha256:a61e80790…
Size
55.1 MB
Last updated
16 days ago
docker pull ryansteffan/simply_syslog