Last active
December 3, 2020 16:05
-
-
Save lathspell/5fb0b150f3752a60dbf5 to your computer and use it in GitHub Desktop.
Logstash grok pattern file for /var/log/dpkg.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DPKG_TIMESTAMP %{TIMESTAMP_ISO8601:timestamp} | |
DPKG_PACKAGE [-+~\.0-9a-zA-Z]+ | |
DPKG_ARCH [a-z0-9]+ | |
DPKG_PKGARCH %{DPKG_PACKAGE:package}(:%{DPKG_ARCH:arch})? | |
DPKG_VERSION [-+~<>\.0-9a-zA-Z]+ | |
DPKG_ACTION0 (startup archives|startup packages|conffile) | |
DPKG_ACTION1 (configure|remove|upgrade|purge|status (config-files|installed|not-installed|triggers-awaited|triggers-pending|unpacked|half-installed|half-configured)) | |
DPKG_ACTION2 (trigproc|upgrade) | |
DPKG_0_VERSIONS %{DPKG_ACTION0:action} | |
DPKG_1_VERSIONS (%{DPKG_ACTION1:action} %{DPKG_PKGARCH} %{DPKG_VERSION:version})$ | |
DPKG_2_VERSIONS (%{DPKG_ACTION2:action} %{DPKG_PKGARCH} %{DPKG_VERSION:version_from} %{DPKG_VERSION:version})$ | |
DPKG_LOG %{DPKG_TIMESTAMP} (%{DPKG_0_VERSIONS}|%{DPKG_1_VERSIONS}|%{DPKG_2_VERSIONS}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this!