I have a Graylog Forwarder. I want to route the input from the Graylog Forwarder into a stream. Right now the logs arrive in the Default Stream.
For normal inputs, I make pipeline rules with the route to stream function.
Based on the input id or other fields, such as data path of the logs.
E.g.
rule "route to stream x"
when
from_input(id:"64edf8eede67ea565c9ac431")
then
route_to_stream(id: "64f6f1dba00f8f218c010726", remove_from_default: true);
I tried the same pipeline rule for the Graylog forwarder. However, I used the id of the Forwarder Input in Graylog itself, which did not work.
After that I tried to use the input id of the input opened on the Forwarder side itself (Input Profile). Which did not work either.
My logs from the Forwarder still arrive in the Default Stream.
How am I able to get the Input from the Forwarder into a specific steam? Thank you.
I would look at one of the messages that should have been routed, and see the vaoues for these two fields.
gl2_source_input (this is the input from the input profile, this id will be the same across all forwarders with the same profile applied)
gl2_source_node (this should be the unique forwarder or node of the cluster that the message was delivered to.)
The two of those combined should get your routing working.
rule "route to stream x"
when
to_string($message.gl2_source_input) == "6527b2eb296e5515b87192fc" AND
to_string($message.gl2_source_node) == "89b10b61-d650-49a4-a04b-82b99efca907"
then
route_to_stream(id: "64f6f1dba00f8f218c010726", remove_from_default: true);