Hi Ross,
this should work:
to_string($message.tag) == "tomcat"
at least my case its working
On Thursday, April 28, 2016 at 11:56:25 PM UTC+3, 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/d9e785fd-18aa-4dcd-bd0d-f6f645c1a481%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.