Skip to content

Instantly share code, notes, and snippets.

View melissaboiko's full-sized avatar
🐈

Melissa Boiko melissaboiko

🐈
View GitHub Profile
@melissaboiko
melissaboiko / 99-persist-disk-symlinks.rules
Last active September 1, 2022 22:39
udev rules to create symlinks for specific hard drives
@melissaboiko
melissaboiko / 10-noisy.conf
Last active September 1, 2022 22:57
filtering noisy dæmons on rsyslog using the cleaner expression syntax
# /etc/rsyslog.d/10-noisy.conf
# filter out some noisy messages
# most software doesn't set $syslogtag, so you need to look for the identifier in the message.
# the problems here are baffling:
# - for reasons unknown, the message often starts with a space, though not necessarily
# - this makes it cumbersome to impossible to rely on `starts_with`
# - regexpes are significantly slower
# - `contains` is slower than `starts_with`, and may give false positives
# - the `ltrim()` function can't easily be applied to an action
@melissaboiko
melissaboiko / 00-precise-tsv.conf
Created September 1, 2022 22:32
more informative, precise, tab-separated template for rsyslog, in the cleaner list expression syntax
# this will generate entries like:
# info.daemon 2022-09-02T00:27:39.198142+02:00 umbral:systemd[1]: Starting System Logging Service...
# info.syslog 2022-09-02T00:27:39.238310+02:00 umbral:rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.2001.0]
# - contrary to default template, you get priority (warn, info, debug...) as well as software-specific tag
# - timestamp in standard rfc3339 format, greppable, sed/awkable, sortable, with high time precision and timezone
# - tabs may take more space but today's monitors are big and the terminal scrolls,
# - and tsv is handy to process with cut(1), easy to sed, and you can just pipe to `xsel -b` and paste in any spreadsheet.
template (name="precise-tsv" type="list") {