mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-30 22:06:27 -04:00
- Support df command
- Return warnings array from ParseSyntaxFiles() in addition to potential error. Not being able to parse the dir is a fatal error but if a random file cannot be read, it should be considered a warning.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
filetype: ping
|
||||
|
||||
detect:
|
||||
filename: "\\.df$"
|
||||
header: "(^Filesystem[[:space:]]+)"
|
||||
|
||||
rules:
|
||||
# header
|
||||
- cyan: "(Filesystem|Size|1K-blocks|(I)?Use(d)?(%)?|Avail(able)?|Mounted on|IFree|Inodes)"
|
||||
- blue: "(\\/[-\\w\\d.]+)+\\s"
|
||||
# Ks
|
||||
- green: "\\s\\d*[.,]?\\d(K|B)i?\\s|\b\\d{1,3}\b"
|
||||
# Ms
|
||||
- magenta: "\\s\\d*[.,]?\\dMi?\\s|\b\\d{4,6}\b"
|
||||
# Gs
|
||||
- cyan: "\\s\\d*[.,]?\\dGi?\\s|\b\\d{4,6}\b"
|
||||
# Ts
|
||||
- preproc: "\\s\\d*[.,]?\\dTi?\\s|\b\\d{4,6}\b"
|
||||
# Mounted on
|
||||
- green: "\\/$|(\\/[-\\w\\d. ]+)+$"
|
||||
# Use% <= 60
|
||||
- high.green: "\\s[1-6]?[0-9]%\\s"
|
||||
# Use% <= 70 - 89
|
||||
- yellow: "\\s[78][0-9]%\\s"
|
||||
# Use 90-97%
|
||||
- red: "\\s9[0-7]%\\s"
|
||||
# Use 98-100%
|
||||
- preproc: "\\s9[89]%|100%\\s"
|
||||
- type: "(tmpfs|(u|/)?dev|(/)?run|shm|(/)?boot|nfs|/home|/var|/tmp|swap)"
|
||||
- constant.number: "[[:space:]]+([0-9])+[[:space:]]+"
|
||||
|
||||
@@ -24,4 +24,5 @@ rules:
|
||||
- red: "DUP\\!"
|
||||
- red: "(Destination Host Unreachable|100(\\.0)?% packet loss)"
|
||||
- red: ".+unknown\\shost\\s(.+)"
|
||||
- red: "Temporary failure in name resolution"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user