graylog2-web-interface
graylog2-web-interface copied to clipboard
search histogram x-axis labels are offset
When I look at the histogram in search results, it appears to be off by one day.
The 1am time slot for July 12 is past where the end of day should be.
We recently had similar issues with nvd3 histograms if the histogram input data wasn't sorted. I haven't checked if this is the case with graylog, just throwing what may be useful info out there.
Or looking again, maybe the date ticks are displayed in UTC? Though I don't see any tics. My original interpretation of the graph was that the "July 12" label would be centered at noon on July 12.
graylog-web-interface v1.1.2 (b8291a4) (Oracle Corporation 1.8.0_45 / Linux 3.13.0-48-generic)
@juherr Thanks for reporting this.
The following Java class is working (you also have to change the dependency scope of org.apache.logging.log4j:log4j-core
accordingly):
import org.apache.logging.log4j.LogManager;
public class Main {
public static void main(String... args) {
LogManager.getLogger(Main.class).info("Test");
}
}
While the original error message is interesting, I don't see any bug with log4j2-gelf but rather a classpath issue with the project.
The problem is on NioEventLoopGroup group = new NioEventLoopGroup();
and in my real-life usage, I'm not the one who calls it.
Are you able to create a NioEventLoopGroup
?
Without the log4j-slf4j-impl
dependency, it is working like a charm too because Netty won't use any logger (it doesn't support log4j2 for the moment).
But when you introduce a logger implementation it knows (here, slf4j), then it will fail.
@juherr I see. It looks like Maven is pulling in the shaded version of log4j2-gelf
instead of the normal version.
Try using this dependency instead:
<dependency>
<groupId>org.graylog2.log4j2</groupId>
<artifactId>log4j2-gelf</artifactId>
<version>1.3.0</version>
<classifier>jar</classifier>
</dependency>
Awesome! It is working like a charm! Thanks a lot 👍
In fact, it is not working :(
Without <classifier>jar</classifier>
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ graylog2-issue ---
Downloading: https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.jar
Downloaded: https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.jar (0 B at 0.0 KB/sec)
[INFO] graylog2-issue:graylog2-issue:jar:1.0-SNAPSHOT
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.6.2:runtime
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.6.2:runtime
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.6.2:runtime
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] \- org.graylog2.log4j2:log4j2-gelf:jar:1.3.0:compile
[INFO] \- org.graylog2:gelfclient:jar:1.4.0:compile
[INFO] +- io.netty:netty-all:jar:4.0.29.Final:compile
[INFO] \- com.fasterxml.jackson.core:jackson-core:jar:2.5.4:compile
With <classifier>jar</classifier>
[ERROR] Failed to execute goal on project graylog2-issue: Could not resolve dependencies for project graylog2-issue:graylog2-issue:jar:1.0-SNAPSHOT: Failure to find org.graylog2.log4j2:log4j2-gelf:jar:jar:1.3.0 in https://jcenter.bintray.com was cached in the local repository, resolution will not be reattempted until the update interval of jcenter has elapsed or updates are forced -> [Help 1]
It is not a big surprise because log4j2-gelf-1.3.0-jar.jar doesn't exist. I'm just surprised that Maven doesn't complain.
In fact, I'm able to generate the issue without log4j2-gelf: https://github.com/netty/netty/issues/5806
@joschi After all, it looks something should be done in Graylog. Check comment from @Scottmitch: https://github.com/netty/netty/issues/5806#issuecomment-249382910
Well, the shaded artifact resolves the issue. Maybe the documentation should advise using the shaded artifact if the project has already netty in the classpath.