graylog-labs / graylog-plugin-slack

Graylog alarm callback for Slack
https://www.graylog.org
Apache License 2.0
117 stars 52 forks source link

wrong stream url after Graylog upgrade #97

Open masterjus opened 1 year ago

masterjus commented 1 year ago

Ho there,

We've upgraded our Graylog to the version 5.1.1. They changed stream search url from https://grayloginstance.url/streams/<stream_id>/messages to https://grayloginstance.url/streams/<stream_id>/search and now when we click to the stream name to check what happens, we see the 404 page.

masterjus commented 1 year ago

I'm not familiar with plugins for Graylog building and don't know how to check Graylog version, so not able to make PR.

The issue could be fixed here https://github.com/graylog-labs/graylog-plugin-slack/blob/dbfa16853b1310327090e7f676bbf68c069c578c/src/main/java/org/graylog2/plugins/slack/SlackPluginBase.java#LL67C19-L67C19

janheise commented 1 year ago

https://github.com/graylog-labs/graylog-plugin-slack/blob/dbfa16853b1310327090e7f676bbf68c069c578c/src/main/java/org/graylog2/plugins/slack/SlackPluginBase.java#L67 is the line that creates the problem.

masterjus commented 1 year ago

I think here should be applied a fix. I should look like return baseUrl + "streams/" + stream.getId() + "/search?q=%2A&rangetype=relative&relative=3600";

Replace messages to search

masterjus commented 1 year ago

@Aenima4six2