Graylog2 / Graylog2/graylog2-server

route_to_stream - fails on name based routing and similar names

Open
#7,503 0 comments 0 reactions 0 assignees View on GitHub
to-verify
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior
While name based routing is not the best idea in Graylog - because Stream names are not unique, it should work when you enter the correct name.

If a routing is not possible because the target can't be set correctly, it should fail visible and not silent.

## Current Behavior
It looks like similar names in the streams make the routing unreliable and more important the function does not fail visible.

## Possible Solution
Give the option with a drop down of all given streams (to prefend miss spelling) or make routing only via IDs but provide an easy option to discover the ids of streams.

## Steps to Reproduce (for bugs)
1. Create Streams: `Wincollect FWD Stream` and `Wincollect_FWD Stream`
1. Create Stream rule with:
- `route_to_stream(name: "Wincollect FWD Stream", remove_from_default: true)`
- `route_to_stream(name: "Wincollect_FWD Stream", remove_from_default: true)`
3. Check the streams for messages

## Context
The `route_to_stream` function is working 100% when using IDs but when you switch to the human friendly names it is unreliable.

## Your Environment

* Graylog Version: 3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.