seanthegeek / graylog-fortigate-syslog

A Graylog Content Pack of dashboards for FortiGate syslog data
https://seanthegeek.net/1270/how-to-create-a-single-node-graylog-instance-and-analyze-fortigate-logs/
Apache License 2.0
34 stars 10 forks source link

Content pack not installing, Graylog 5.0.6 #1

Closed mikebutash closed 1 year ago

mikebutash commented 1 year ago

Hi, was attempting to check this out using Graylog for the first time, and your Content Pack isn't installing for me. I created the input (only using basic udp port, don't need/want tcp/tls overhead), but after adding the Content Pack which worked, using the Install button fails. The "Caused By" is ContentPackException: Missing Stream for widget entity.

I'll post the whole error output from the graylog-server/server.log, but wondering if maybe this was for an older version of Graylog or this might make more sense to you why busted for me? I don't think the input is dependent on it being tcp/tls, or shouldn't be correct?

` 2023-04-18T16:15:51.402Z ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource org.graylog2.contentpacks.exceptions.ContentPackException: Failed to install content pack <85f976d9-4d2d-45f9-922d-25d2d9c11f87/8> at org.graylog2.contentpacks.ContentPackService.installContentPack(ContentPackService.java:161) ~[graylog.jar:?] at org.graylog2.contentpacks.ContentPackService.installContentPack(ContentPackService.java:102) ~[graylog.jar:?] at org.graylog2.rest.resources.system.contentpacks.ContentPackResource.installContentPack(ContentPackResource.java:295) ~[graylog.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?] at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:134) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:177) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219) ~[graylog.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:81) ~[graylog.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478) ~[graylog.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400) ~[graylog.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) ~[graylog.jar:?] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:255) [graylog.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) [graylog.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) [graylog.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:292) [graylog.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:274) [graylog.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:244) [graylog.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) [graylog.jar:?] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234) [graylog.jar:?] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) [graylog.jar:?] at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:356) [graylog.jar:?] at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:200) [graylog.jar:?] at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:180) [graylog.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?] at java.lang.Thread.run(Unknown Source) [?:?] Caused by: org.graylog2.contentpacks.exceptions.ContentPackException: Missing Stream for widget entity at org.graylog2.contentpacks.model.entities.WidgetEntity.lambda$toNativeEntity$1(WidgetEntity.java:162) ~[graylog.jar:?] at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:?] at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:?] at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:?] at java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?] at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:?] at org.graylog2.contentpacks.model.entities.WidgetEntity.toNativeEntity(WidgetEntity.java:170) ~[graylog.jar:?] at org.graylog2.contentpacks.model.entities.ViewStateEntity.lambda$toNativeEntity$0(ViewStateEntity.java:125) ~[graylog.jar:?] at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:?] at java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?] at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:?] at org.graylog2.contentpacks.model.entities.ViewStateEntity.toNativeEntity(ViewStateEntity.java:126) ~[graylog.jar:?] at org.graylog2.contentpacks.facades.ViewFacade.decode(ViewFacade.java:137) ~[graylog.jar:?] at org.graylog2.contentpacks.facades.ViewFacade.createNativeEntity(ViewFacade.java:127) ~[graylog.jar:?] at org.graylog2.contentpacks.ContentPackService.installContentPack(ContentPackService.java:152) ~[graylog.jar:?] ... 29 more

`

buarle commented 1 year ago

Same here.

carlo94it commented 1 year ago

I think the problem is because Graylog try to create dashboard before stream creation.

carlo94it commented 1 year ago

I found the problem. In the content pack there is the same dashboard defined 2 two times. There are 3 entities, 1 stream and 2 equal dashboards.

The stream ID is: 28d0926f-44ac-431b-ac53-f2942b59ab9e

The 2 equals dashboard use different stream:

@mikebutash you need to remove the first entry of "entities" defintion.

seanthegeek commented 1 year ago

I just fixed the issue with a new release. Sorry about that. I'll wait to others to confirm before I close this issue.