I've created a pipeline in elasticsearch to process some jetty output:
PUT _ingest/pipeline/filebeat-6.7.2-jetty-log-pipeline
{
"description" : "Ingest pipeline for jetty stderror",
"processors": [
{
"grok": {
"field": "message",
"patterns": ["(?m)%{CATALINA_DATESTAMP:jetty_timestamp} %{DATA:java_class} %{DATA:java_method}\n%{LOGLEVEL:log_level}: %{JAVALOGMESSAGE:log_message}"],
"ignore_missing": false
}
},
{
"remove":{
"field": "message"
}
},
{
"date": {
"field": "jetty_timestamp",
"target_field": "@timestamp",
"formats": ["MMM dd, yyyy HH:mm:ss a", "EE MMM dd HH:mm:ss z yyyy" ]
}
},
{
"remove": {
"field" : "jetty_timestamp"
}
}
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}
Here's a capture from tcpdump of filebeat transmitting it to ES:
{"index":{"_index":"filebeat-6.7.2-2019.06.12","_type":"doc","pipeline":"filebeat-6.7.2-jetty-log-pipeline"}}
{"@timestamp":"2019-06-12T00:56:48.979Z","fileset":{"module":"app","name":"stderroutlog"},"event":{"dataset":"jetty.log"},"beat":{"name":"server-web","hostname":"server-web","version":"6.7.2"},"source":"/var/log/jetty/2019_06_08.stderrout.log","offset":2546,"message":"Jun 08, 2019 12:19:46 AM org.springframework.orm.jpa.AbstractEntityManagerFactoryBean destroy\nINFO: Closing JPA EntityManagerFactory for persistence unit 'defaultPU'","prospector":{"type":"log"},"log":{"file":{"path":"/var/log/jetty/2019_06_08.stderrout.log"},"flags":["multiline"]},"input":{"type":"log"},"host":{"name":"server-web","os":{"name":"Ubuntu","codename":"bionic","platform":"ubuntu","version":"18.04.2 LTS (Bionic Beaver)","family":"debian"},"id":"xxxxxxxxxxxxxxx","containerized":false,"architecture":"x86_64"},"meta":{"cloud":{"provider":"ec2","machine_type":"r4.large","region":"us-east-1","availability_zone":"us-east-1a","instance_id":"i-xxxxxxxxxxxx"}}}
Here's a test of it working with simulate:
POST _ingest/pipeline/filebeat-6.7.2-jetty-log-pipeline/_simulate
{
"docs": [
{
"_source": {
"message": """
Jun 08, 2019 12:19:46 AM org.springframework.orm.jpa.AbstractEntityManagerFactoryBean destroy
INFO: Closing JPA EntityManagerFactory for persistence unit 'defaultPU'
"""
}
}
]
}
{
"docs" : [
{
"doc" : {
"_index" : "_index",
"_type" : "_type",
"_id" : "_id",
"_source" : {
"@timestamp" : "2019-06-08T12:19:46.000Z",
"java_method" : "destroy",
"log_level" : "INFO",
"log_message" : "Closing JPA EntityManagerFactory for persistence unit 'defaultPU'",
"java_class" : "org.springframework.orm.jpa.AbstractEntityManagerFactoryBean"
},
"_ingest" : {
"timestamp" : "2019-06-12T01:39:33.216Z"
}
}
}
]
}
However, nothing shows up when I attempt to search for it with Kibana. The ES logs don't show anything out of the ordinary, and error.message:* returns zero results so I think that means it ingested correctly. My time range is set to "last 24 hours." Have I missed something obvious?
This is running 6.7.2 of ES and Filebeat.