# Pipeline problems

**URL:** <https://community.graylog.org/t/pipeline-problems/4205>\
**Category:** Graylog Central (peer support)\
**Tags:** pipeline-rules, route-to-streampl\
**Created:** [February 16, 2018, 7:24am UTC](https://community.graylog.org/t/pipeline-problems/4205 "2018-02-16T07:24:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jendamozna](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jendamozna](https://community.graylog.org/u/jendamozna)\
**Post date:** [February 16, 2018, 7:24am UTC](https://community.graylog.org/t/pipeline-problems/4205/1 "2018-02-16T07:24:57Z")

</div>

Hello,  
ive just started with graylog and dont understand the pipelines concept.

My streams:

1. All messages - default index set
2. FW messages - dedicated FW index set, Remove matches from ‘All messages’ stream

Pipelines:

1. “Add recieved timestamp”, connected to “All messages stream” with 1 rule:

```auto
rule "set receivedat with now"
when
  true
then
  set_field("receivedat", now());
end

```

1. “FW cleanup”, connected to “FW messages stream” with two rules:

```auto
rule "empty message"
when
  has_field("message")
then
  set_field("message", "");
end
AND
rule "remove level field"
when
  has_field("level")
then
  remove_field("level");
end

```

Config:  
Graylog 2.4.3+2c41897

| Order | Processor |
| --- | --- |
| 1 | Pipeline Processor |
| 2 | GeoIP Resolver |
| 3 | Message Filter Chain |

Problems

1. receivedat field is applied also on “FW messages” stream. Im expecting no receivedat on FW messages.
2. No throughput and changes on “FW cleanup”. Simulation reveals only level field change. In fact FW logs returns empty “NOT _exists_:level” query and message field is still there.

Any ideas?

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [February 16, 2018, 8:01am UTC](https://community.graylog.org/t/pipeline-problems/4205/2 "2018-02-16T08:01:28Z")

</div>

The assignment of a message to one or many streams happens in the `StreamFilter` which is part of the “Message Filter Chain”.

So when your pipeline rules are running, the messages haven’t been assigned to any stream yet.

You can either change the order of message processors in your Graylog cluster or explicitly use the `route_to_stream()` function in a pipeline rule to assign a message to a stream.

---

<div class="post-metadata">

**Author:** ![jendamozna](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jendamozna](https://community.graylog.org/u/jendamozna)\
**Post date:** [February 16, 2018, 8:36am UTC](https://community.graylog.org/t/pipeline-problems/4205/3 "2018-02-16T08:36:22Z")

</div>

Processors order changed to:  
|1|Message Filter Chain|active|  
|2|Pipeline Processor|active|  
|3|GeoIP Resolver|disabled|

Problem 1 now solved, receivedat applied only to “All messages stream”. Thank you!

Problem 2 still here. Field “level” is being removed, but “message” field is not emptied. Simulation still reveals only “level” field change.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [February 16, 2018, 8:41am UTC](https://community.graylog.org/t/pipeline-problems/4205/4 "2018-02-16T08:41:31Z")

</div>

The “message” field is mandatory and must not be empty or blank (contain only whitespace characters).

---

<div class="post-metadata">

**Author:** ![jendamozna](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jendamozna](https://community.graylog.org/u/jendamozna)\
**Post date:** [February 16, 2018, 8:51am UTC](https://community.graylog.org/t/pipeline-problems/4205/5 "2018-02-16T08:51:23Z")

</div>

Thank you jochen, both issues are solved.

This helped:

```auto
rule "empty message"
when
  has_field("message")
then
  set_field("message", "empty");
end

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [March 2, 2018, 8:51am UTC](https://community.graylog.org/t/pipeline-problems/4205/6 "2018-03-02T08:51:26Z")

</div>

Closed on March 2, 2018, 8:51am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
