mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Update HOSTNAME in grok-patterns
RFC952 states of a hostname: "The last character must not be a minus sign or period." https://tools.ietf.org/html/rfc952 Some of the limitations in RFC952 were lifted by RFC1123, but not this one. https://tools.ietf.org/html/rfc1123 The updated regex still allows single character hostnames, but does not allow the final character in any section to be a '-'.
This commit is contained in:
parent
279711497a
commit
a17f72150d
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ CISCOMAC (?:(?:[A-Fa-f0-9]{4}\.){2}[A-Fa-f0-9]{4})
|
|||
WINDOWSMAC (?:(?:[A-Fa-f0-9]{2}-){5}[A-Fa-f0-9]{2})
|
||||
COMMONMAC (?:(?:[A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2})
|
||||
IP (?<![0-9])(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))(?![0-9])
|
||||
HOSTNAME \b(?:[0-9A-Za-z][0-9A-Za-z-]{0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*(\.?|\b)
|
||||
HOSTNAME \b(?:[0-9A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])?)(?:\.(?:[0-9A-Za-z](?:[0-9A-Za-z-]{0,61}[0-9A-Za-z])?)))*(\.?|\b)
|
||||
HOST %{HOSTNAME}
|
||||
IPORHOST (?:%{HOSTNAME}|%{IP})
|
||||
HOSTPORT (?:%{IPORHOST=~/\./}:%{POSINT})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue