suzuki-shunsuke/go-graylog

Slack alarm callback configuration

Closed this issue · 3 comments

When trying to create a slack alarm notification I get:

400: Invalid configuration map

After the investigation it turned out the provider sends:

"notify_channel":false

which I think is wrong - the correct property name should be notify_user?

I confirmed that a legacy slack alarm notification can be created.

resource "graylog_alarm_callback" "slack" {
type = "org.graylog2.plugins.slack.callback.SlackAlarmCallback"
stream_id = graylog_stream.test.id
title = "test"
slack_configuration {
graylog2_url = "https://graylog.example.com"
color = "#FF0000"
webhook_url = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
user_name = "Graylog"
backlog_items = 5
channel = "#general"
custom_message = "$${alert_condition.title}\\n\\n$${foreach backlog message}\\n<https://graylog.example.com/streams/$${stream.id}/search?rangetype=absolute&from=$${message.timestamp}&to=$${message.timestamp} | link> $${message.message}\\n$${end}"
}
}

Please tell us how to reproduce.

  • terraform configuration
  • terraform version
  • terraform-provider-graylog version
  • Graylog version

And I think notify_channel is correct.

https://github.com/graylog-labs/graylog-plugin-slack

Thanks.

Ok I seems to be version problem. I used jar from https://github.com/omise/graylog-plugin-slack which is a old fork of the original repo.
Will install newest version of slack plugin and check it.
Anyway - thank you for your time!

I confirm it works with newest slack plugin.
Thank you again!
Closing.