Hello,
I have a question. We are trying to set up a logging system for a java application running on Jboss. The goal is to be able to filter for certain errors. We've done the following
- Server.log converted to server.json (Jboss server this was an option in the software)
- Forward server.json to logstash with the following filebeat config.
filebeat.inputs:
- type: log
enabled: true
paths:
- /opt/rh/eap7/root/usr/share/wildfly/standalone/log/server.json
output.logstash:
hosts: ["192.XX.XX.XXX:5044"]
The logstash configuration on the remote server looks like this.
input {
beats {
port => "5044"
}
}
filter {
json {
source => "message"
}
}
output{
elasticsearch{
hosts => ["localhost:9200"]
index => "data"
}
}
~
This is the JSON produced by Jboss
{
"timestamp": "2023-03-01T00:00:16.739+01:00",
"series": 6760,
"loggerClassName": "org.apache.commons.logging.impl.JBossLog",
"loggerName": "org.springframework.boot.actuate.ldap.LdapHealthIndicator",
"level": "WARNING",
"message": "LDAP health check failed",
"threadName": "default task-2",
"threadId": 193,
"mdc": {
},
"ndc": "",
"hostName": "idontknow.youdo.com",
"processName": "jboss-modules.jar",
"processId": 23053,
"stackTrace": ":org.springframework.ldap.UncategorizedLdapException: Uncategorized exception occurred during blablalbla…..
Now I receive data neatly and visible in Kibana, but I am not able to filter correctly. Like in this youtube video (Finding insights and taking action in Discover - YouTube) I think there is something wrong with my configuration.
We would like filter our server.json ; timestamp, level: WARN or ERROR, message: what the error message is.
I am looking forward for your answer.