Skip to content

Instantly share code, notes, and snippets.

@djzort
djzort / README
Last active September 26, 2025 04:44
Rsyslog output to postgresql
A simple configuration to store syslog log data into postgresql using rsyslog.
This works incredible well and uses "stable" packages from Debian Trixie.
Logs are happily stored as received from other Linux distributions like CentOS and OpenWRT, Switches from various vendors (Dell, Cisco, Netgear, Juniper), FreeBSD and Opnsense.
You can easily query logs using your favourite laguage, or grafana, pgadmin4, pgcli, psql etc.
Resource usage is trivial. The rsyslog service uses nominal cpu and memory with very modest disk consumption.
@djzort
djzort / collectd_insert.sql
Last active September 26, 2025 04:01 — forked from felix/collectd_insert.sql
A schema for collectd output to Postgresql with Timescaledb
-- Description:
-- ------------
--
-- This is an example schema for storing collectd metrics in a TimescaleDB
-- dabase (see https://www.timescale.com/). It is based on the PostgreSQL
-- schema contributed by Sebastian Harl.
--
-- Prerequisities:
-- ---------------
--