A lightweight Python HTTP bridge that forwards Graylog alerts to the Checkmk Event Console via syslog.
Graylog Alert ➔ [ HTTP POST ] ➔ Python Bridge ➔ [ UDP Syslog ] ➔ Checkmk Event Console ➔ [ CRIT / WARN / OK ]
The bridge is completely generic and is not tied to a specific Graylog event type.
- 📩 Receives Graylog alerts via HTTP POST
- 🖥️ Extracts hostname automatically from Graylog
group_by_fields.source - 📊 Extracts alert title and aggregation count
- 📜 Includes the original log message from the Graylog backlog
- 📤 Sends structured events to Checkmk via UDP syslog
- ⚙️ Native
systemdservice integration - 🚀 Zero external Python dependencies (uses standard library only)
- Python 3.x
- Graylog (with HTTP notification support)
- Checkmk (with Event Console enabled)
- UDP syslog input enabled in Checkmk
- Port
20080available for the HTTP bridge
git clone https://github.com/vmgk/graylog-checkmk-bridge.git
cd graylog-checkmk-bridgeCreate the destination directory and copy the necessary files:
sudo mkdir -p /opt/graylog-checkmk-bridge
sudo cp graylog_checkmk_bridge.py /opt/graylog-checkmk-bridge/
sudo cp config.env.example /opt/graylog-checkmk-bridge/config.envAssign ownership to the Checkmk site user and set proper file permissions:
# Set ownership
sudo chown -R cmk:cmk /opt/graylog-checkmk-bridge
# Set permissions
sudo chmod 755 /opt/graylog-checkmk-bridge/graylog_checkmk_bridge.py
sudo chmod 640 /opt/graylog-checkmk-bridge/config.envInstall the service unit file, reload systemd, and start the service:
# Copy service file
sudo cp graylog-checkmk-bridge.service /etc/systemd/system/
# Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable --now graylog-checkmk-bridgeCheck service status:
sudo systemctl status graylog-checkmk-bridgeView live application logs:
sudo journalctl -u graylog-checkmk-bridge -fCopy the example environment configuration file and adjust it as needed:
cp config.env.example config.envLISTEN_ADDRESS=0.0.0.0
LISTEN_PORT=20080
CHECKMK_HOST=127.0.0.1
CHECKMK_PORT=514If you prefer to run the bridge directly without systemd:
python3 graylog_checkmk_bridge.pyThe bridge listens for Graylog notifications on:
http://<server>:20080/graylog
Create an HTTP Notification pointing to:
http://<bridge-server>:20080/graylog
The bridge parses and accepts the standard Graylog alert JSON payload.
The bridge sends a syslog message directly to the Checkmk Event Console.
Example Syslog Output:
<11>Aug 12 11:30:15 testserver graylog: Linux SSH failed authentification; count=3; Failed password for invalid user user_test5
The Checkmk Event Console uses its rules to determine the event state (CRIT, WARN, OK) and handling.
Note: The bridge itself does not determine the severity state — it forwards events to Checkmk where rule evaluation occurs.
This project is licensed under the MIT License. See the LICENSE file for details.