Slack plugin to gralylog

how to add slack plugin on graylog 4.X?

i add jar file from slack in /usr/share/graylog-server/plugin on ubuntu 20,
jar file is: graylog-plugin-slack-notification-1.0.5.jar
i restart services.
then graylog say nginx error. in var/log/gr…/ i find
2021-11-21T16:17:51.711Z ERROR [CmdLineTool] Guice error (more detail on log level debug): Duplicate key “slack-notification-v1” found in java.util.Map<java.lang.String,$Factory>.


I might be able to help. Have you seen this below?

Migration to 4.1
Since Graylog 4.1 was released with a built-in Slack integration with same ID slack-notification-v1 with this plugin. So I have decided to rename this plugin ID to graylog-plugin-slack-notification

The error showing on Graylog 4.1 when you installing the plugin

  1. [Guice/DuplicateMapKey]: Duplicate key “slack-notification-v1” found in Map<String, EventNotification$Factory>.

You need to run the following command on Mongodb before installing a new plugin in order to migrate current configuration to a new plugin version

graylog:PRIMARY> use graylog
graylog:PRIMARY> db.auth('graylog', 'your-graylog-mongodb-password');
graylog:PRIMARY> db.event_notifications.updateMany({"config.type":"slack-notification-v1"},{$set: { "config.type": "graylog-plugin-slack-notification"}})

You can find more here.

hope that helps

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