Discussion:
[opennms-discuss] Slack webhook config
Arthur Mark Carter
2017-07-10 03:38:28 UTC
Permalink
Hi, I have configured Slack webhook according to opennms documentation...

https://docs.opennms.org/opennms/releases/latest/guide-admin/guide-admin.html#ga-notifications-bonus-strategies

Has anyone got "Slack" notifications to work?

This works from the command line: curl -X POST -H 'Content-type:
application/json' --data '{"text":"Hello, World!"}'
https://hooks.slack.com/services/Txxxxxxxxxx/Bxxxxxxxxxx/Txxxxxxxxxxxxxxxxxxxx
<- api keys masked here

here is my notificationCommands.xml setup;

<command binary="false">
<name>slack</name>
<execute>org.opennms.netmgt.notifd.SlackNotificationStrategy</execute>
<comment>class for sending messages to a Slack team channel for
notifications</comment>
<argument streamed="false">
<switch>-subject</switch>
</argument>
<argument streamed="false">
<switch>-tm</switch>
</argument>
</command>

slack.properties file in the opennms.properties.d directory

org.opennms.netmgt.notifd.slack.webhookURL=
https://hooks.slack.com/services/Txxxxxxxxxxx/Bxxxxxxxxxxxxx/Txxxxxxxxxxxxxxxxxxxxxxx
<- api keys masked here
org.opennms.netmgt.notifd.slack.username=OpenNmsNotify <- this is the
name of the app I created in the Slack api...
org.opennms.netmgt.notifd.slack.iconURL=:warning:
org.opennms.netmgt.notifd.slack.channel=mychannelname

I am not sure I have notifications correctly configured, destination paths,
etc...see this message in Events... "Operator Instructions","No
instructions available"

I am following the youtube Tarus B. vids and documentation closely...but no
joy :(

Thank you

Loading...