i use allied telesis switches that are sending syslogs to our new server.
This looks like this:
Code: Select all
<date> <time> <facility>.<severity> <program[<pid>]>: <message>
-------------------------------------------------------------------------
2025 Jan 13 09:52:25 daemon.err alliedtelesys snmpd[2511]: snmp_build: unknown failure
2025 Jan 13 09:52:36 user.warning alliedtelesys: RECV: Unrecognised ethernet type
Code: Select all
syslog {
type => 'syslog'
port => 514
}
Code: Select all
{
"_index": "logstash-2025.01.13",
"_type": "syslog",
"_id": "AZRf_rzsflG_-1v0Jou-",
"_score": null,
"_source": {
"message": "<12>2025 Jan 13 15:08:37 alliedtelesys LLDP[1155]: RECV: Unrecognised ethernet type\n",
"@version": "1",
"@timestamp": "2025-01-13T14:08:37.222Z",
"type": "syslog",
"host": "192.168.1.123",
"tags": [
"_grokparsefailure_sysloginput"
],
"priority": 0,
"severity": 0,
"facility": 0,
"facility_label": "kernel",
"severity_label": "Emergency"
},
"highlight": {
"host.raw": [
"@start-highlight@192.168.1.123@end-highlight@"
],
"host": [
"@start-highlight@192.168.1.123@end-highlight@"
]
},
"sort": [
1736777317222,
1736777317222
]
}
I think this would be the right grok...
Code: Select all
%{TIMESTAMP_ISO8601:timestamp} %{WORD:facility}\.%{WORD:severity} %{DATA:program}\[%{INT:pid}\]: %{GREEDYDATA:message}