Skip to content

Instantly share code, notes, and snippets.

@jose-d
Created January 31, 2025 11:26
Show Gist options
  • Select an option

  • Save jose-d/7ad754c1c9f9a8508810a93d7fd0c89a to your computer and use it in GitHub Desktop.

Select an option

Save jose-d/7ad754c1c9f9a8508810a93d7fd0c89a to your computer and use it in GitHub Desktop.
meshtastic grok patterns for syslog
# note the %{NOTSPACE} template. There is one unprintable character, not sure if coming from rsyslog, or from Meshtastic device.
# %{NOTSPACE} will match it.
[[inputs.tail]]
files = ["/dev/shm/syslog"]
data_format = "grok"
grok_patterns = [
"%{TIMESTAMP_ISO8601} %{WORD:device} %{WORD:module} %{NOTSPACE}\\[%{INT}\\]: txGood=%{NUMBER:txGood:int},txRelay=%{NUMBER:txRelay:int},rxGood=%{NUMBER:rxGood:int},rxBad=%{NUMBER:rxBad:int}",
"%{TIMESTAMP_ISO8601} %{WORD:device} %{WORD:module} %{NOTSPACE}\\[%{INT:packetid}\\]: Lora RX \\(id=%{NOTSPACE} fr=%{WORD:from} to=%{WORD:to}, WantAck=%{NUMBER:WantAck}, HopLim=%{NUMBER:HopLim} Ch=%{WORD:ch} %{WORD} len=%{NUMBER:len} rxSNR=%{NUMBER:rxSNR} rxRSSI=%{NUMBER:rxRSSI} hopStart=%{NUMBER:hopStart}",
"%{TIMESTAMP_ISO8601} %{WORD:device} %{WORD:module} %{NOTSPACE}\\[%{INT:packetid}\\]: %{INT:tx_queue_size}"
]
grok_timezone = "Local"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment