Hi Ross,
you need to tell the route_to_stream function whether you're specifying the
*stream
id* or the *stream name*,
see
https://github.com/Graylog2/graylog-plugin-pipeline-processor/blob/1.0.0-beta.2/src/test/resources/org/graylog/plugins/pipelineprocessor/functions/newlyCreatedMessage.txt#L10
for an example and
http://docs.graylog.org/en/2.0/pages/pipelines/functions.html#route-to-stream
for the function documentation.
Personally, I would recommend using the *stream id* to make the rules less
brittle if someone renames the stream.
Cheers,
Jochen
On Thursday, 28 April 2016 22:56:25 UTC+2, Ross wrote:
>
> Hi-
>
> I'm trying to create a pipeline to send messages to another stream based
> on the application that generated it. In the message, that's represented in
> the tag field. All I need is a simple string comparison, but I can't figure
> out how to access the actual values of the fields. I've tried the following
> two rules to no avail:
>
> rule "app_1_tomcat"
> when
> contains(to_string(message.tag), "tomcat")
> then
> route_to_stream("App 1 Tomcat");
> end
>
> rule "app_1_tomcat"
> when
> message.tag == "tomcat"
> then
> route_to_stream("App 1 Tomcat");
> end
>
> The stream that is attached to this pipeline only matches on App 1, the
> pipeline is only attached to that stream, and one of the above rules is the
> only rule attached to the pipeline. What am I missing?
>
> Let me know if there's any information I can fill in.
>
> -Ross
>
--
You received this message because you are subscribed to the Google Groups
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/graylog2/86d34e3e-d533-4246-9f1e-cd85cfd86614%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.