Graylog2 / Graylog2/graylog2-server

Streams with same title are allowed

Open
#4,431 0 comments 0 reactions 0 assignees View on GitHub
improvement triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

It is possible to create streams with the same title and description. While that is ok'ish on a entity model level, it creates problems when using the title field to distinguish between Streams.

## Expected Behavior

A streams' name should be unique so as to work as an identifier

## Current Behavior

Multiple streams with the same name can be created.
## Possible Solution

## Steps to Reproduce (for bugs)

1.
2.
3.
4.

## Context

I use Graylog to provide Logging for my Kubernetes Cluster. I use the Graylog API to create one stream for each namespace present in my cluster. Next I want to start the Stream, which I can do with the 'stream_id' returned from the POST call. As my integration service is meant to be stateless, I do not save the stream_id/title combination.
Now a namespace gets deleted in Kubernetes and I want to also delete the stream associated with that namespace. To delete a stream, I need the stream_id. To get the stream_id, I need to query all streams and find the one I mean to delete. The only way to identify that stream seems to be the Title, so I get the first Stream with a matching title and delete it.

However since it is possible to create as many Streams with same title and description as I want, I can run into a situation where it is not possible to identify the stream I mean with certainty.

The same applies for Role creation for Stream. It is even visible in the UI:
**Multiple Streams Created:**
mstreams1

**How to distinguish between the Streams?:**
mstreams2

## Your Environment

* Graylog Version: 2.3.2-2
* Elasticsearch Version: 5.6.0
* MongoDB Version: 3.4.10
* Operating System: CoreOS ContainerLinux / Kubernetes (runs in Container)
* Browser version: Firefox 58

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.