Hi @helldunkel
Assuming you mean the Grok Debugger in Kibana Dev Tols
Should just be this
You will have to provide more details
I used this log file
<30>2023:12:08-12:59:39 fw-swr-2 ulogd[32373]:
<30>2023:12:08-12:59:40 fw-swr-3 ulogd[32380]:
<30>2023:12:08-12:59:42 fw-abc-2 ulogd[32390]:
<30>2023:12:08-12:59:45 fw-xyz-2 ulogd[32300]:
<30>2023:12:08-12:59:57 fw-nnn-2 ulogd[32388]:
This logstash conf
input {
file {
path => "/Users/sbrown/workspace/sample-data/discuss/discuss-sophos.log"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
grok {
match => { "message" => ".*>%{SOPHOS_TIMESTAMP:_tmp.timestamp} %{TEST:firewall.name}"}
pattern_definitions => {
"SOPHOS_TIMESTAMP" => "(?:%{YEAR}:%{MONTHNUM}:%{MONTHDAY}-%{HOUR}:%{MINUTE}:%{SECOND})"
"TEST" => "[a-zA-Z0-9._-]+"
}
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
}
stdout{}
}
And the data loaded fine...
Output from logstash
{
"@timestamp" => 2023-12-09T16:09:24.078651Z,
"event" => {
"original" => "<30>2023:12:08-12:59:42 fw-abc-2 ulogd[32390]:"
},
"host" => {
"name" => "hyperion"
},
"log" => {
"file" => {
"path" => "/Users/sbrown/workspace/sample-data/discuss/discuss-sophos.log"
}
},
"_tmp.timestamp" => "2023:12:08-12:59:42",
"@version" => "1",
"message" => "<30>2023:12:08-12:59:42 fw-abc-2 ulogd[32390]:",
"firewall.name" => "fw-abc-2"
}
....
In Elastic
GET logs-*/_search
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 6,
"relation": "eq"
},
"max_score": 1,
"hits": [
{
"_index": ".ds-logs-generic-default-2023.12.09-000001",
"_id": "8rRYT4wBpwIAo0SDQYd0",
"_score": 1,
"_ignored": [
"_tmp.timestamp"
],
"_source": {
"@timestamp": "2023-12-09T16:10:33.056416Z",
"log": {
"file": {
"path": "/Users/sbrown/workspace/sample-data/discuss/discuss-sophos.log"
}
},
"firewall.name": "fw-swr-2",
"data_stream": {
"namespace": "default",
"type": "logs",
"dataset": "generic"
},
"host": {
"name": "hyperion"
},
"@version": "1",
"_tmp.timestamp": "2023:12:08-12:59:39",
"event": {
"original": "<30>2023:12:08-12:59:39 fw-swr-2 ulogd[32373]:"
},
"message": "<30>2023:12:08-12:59:39 fw-swr-2 ulogd[32373]:"
}
},
{
"_index": ".ds-logs-generic-default-2023.12.09-000001",
"_id": "8bRYT4wBpwIAo0SDQYd0",
"_score": 1,
"_ignored": [
"_tmp.timestamp"
],
"_source": {
"@timestamp": "2023-12-09T16:10:33.057941Z",
"log": {
"file": {
"path": "/Users/sbrown/workspace/sample-data/discuss/discuss-sophos.log"
}
},
"firewall.name": "fw-nnn-2",
"data_stream": {
"namespace": "default",
"type": "logs",
"dataset": "generic"
},
"host": {
"name": "hyperion"
},
"@version": "1",
"_tmp.timestamp": "2023:12:08-12:59:57",
"event": {
"original": "<30>2023:12:08-12:59:57 fw-nnn-2 ulogd[32388]:"
},
"message": "<30>2023:12:08-12:59:57 fw-nnn-2 ulogd[32388]:"
}
},
....