Package: rsyslog
Version: 8.2504.0-1
Severity: wishlist
Tags: patch
Hi,
I’ve been having to deal with relaying logs to a loki server.
This works nicely when enabling generic http support.
Sample configuration:
template(name="loki" type="string"
string="{\"stream\":{\"host\":\"%HOSTNAME:::json%\",\"facility\":\"%syslogfacility-text:::json%\",\"priority\":\"%syslogpriority-text:::json%\",\"syslogtag\":\"%syslogtag:::json%\"},\"values\":
[[ \"%timegenerated:::date-unixtimestamp%000000000\", \"%msg:::json%\" ]]}")
module(load="omhttp")
action(
name="loki"
type="omhttp"
useHttps="on"
server="mylokiserver"
uid="login"
pwd="verysecret"
checkpath="ready"
restpath="loki/api/v1/push"
template="loki"
batch="on"
batch.format="lokirest"
batch.maxsize="1000"
)
--
.''`. Josselin Mouette
: :' :
`. `'
`-
commit f8d0c35bc59ed7b5ccc1c34d4d313c081e0eec51
Author: Josselin Mouette <>
Date: Fri Nov 7 11:45:20 2025 +0100
Rebuild with omhttp support.
diff --git a/debian/control b/debian/control
index eeba67d0..4ca8dd1d 100644
--- a/debian/control
+++ b/debian/control
@@ -235,3 +235,12 @@ Description: ClickHouse output plugin for rsyslog
ClickHouse is a column-oriented DBMS (columnar database management system) for
online analytical processing (OLAP) that allows users to generate analytical
reports using SQL queries in real-time.
+
+Package: rsyslog-http
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ rsyslog (= ${binary:Version}),
+Description: Generic HTTP output plugin for rsyslog
+ This plugin allows rsyslog to send syslog messages encoded in JSON over
+ HTTP REST APIs, including Grafana Loki.
diff --git a/debian/rsyslog-http.install b/debian/rsyslog-http.install
new file mode 100644
index 00000000..9e8b7e0b
--- /dev/null
+++ b/debian/rsyslog-http.install
@@ -0,0 +1 @@
+usr/lib/${DEB_HOST_MULTIARCH}/rsyslog/omhttp.so
diff --git a/debian/rules b/debian/rules
index 507ee04c..d90a47d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -43,6 +43,7 @@ override_dh_auto_configure:
--enable-pmlastmsg \
--enable-pmnormalize \
--enable-pmsnare \
+ --enable-omhttp \
--enable-omstdout \
--enable-omprog \
--enable-omuxsock \