I am sending this logs by gelf.
I have placed the gelf jar file in our applications and configured log4j.xml and that is where i have defined all the levels as well.
I did not use the decorater as it was not providing the searching field.
I had used the pipeline that is converting the loglevels to syslog string like informational.
Background:
I had added the field Severity to all logs in graylog.
This severity has diffrent-2 values for same loglevel like
Severity: INFO
Severity: Informational
I do not want this. What i want is this Severity must have one value that is Severity: INFO through out all the logs.
function which i am using “syslog_level” is mapping to loglevel 6 to “informational” but i want to map loglevel 6 to “INFO” that is why i am trying to do re-mapping.
I am not sure what function i can use here.
Actually for gelf-java logs “syslog_level” mapper works perfectly fine.
The problem is for glassfish server logs which i am sending with the help of filebeat.
Please find the format below…
[2019-07-08T13:18:35.440+0200] [Payara 4.1] [INFO] [NCLS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=46 _ThreadName=Thread-12] [timeMillis: 1562584715440] [levelValue: 800] [[
JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://ip-10-142-244-132.eu-central-1.compute.internal:28386/jndi/rmi://ip-10-142-244-132.eu-central-1.compute.internal:28386/jmxrmi]]
I have applied the “LOGLEVEL” grok pattern as extractor. so on Glassfish server logs “Severity having a value INFO”
Glassfish application Logs by gelf-java “Severity: Informational”
Glassfish Server logs by filebeat “Severity: INFO”
Same goes to other loglevels.
I want only one value of Severity through out the logs respective to there loglevels.
I tried to create my log mapper above but it seems no function is available for that.
you simple tried something in Define fields in log4j.xml that is not possible in the rule language. You need to use a way that works and not something you imagine that could work.
Yes - That is i am looking for help like what options i can try.
is it possible the change the value of the fields like INFO to informational or vice versa?