0

I have integrated Slack with our Icinga (Nagios based) monitoring and we are sending notifications from icinga to slack channels

In icinga notification's service description field we are including a URL for the monitoring page for that particular notification as HTML code but the problem is Slack is not respecting the html code and is displaying the URL as a text.

Any idea how can I make the links URL (Clickable)

We are transitioning from hip-chat to slack and I have different possibilities of escaping char, putting in direct URL but none worked

Below is the notification with direct URL in service description

SS ABC Integration - application-test- app/'http://monitoringhost.com/icinga/cgi-bin/extinfo.cgi?type=2&host=hostserver&service=Load Average per CPU' Load Average per CPU on hostserver is OK

Below is with html code in the services description

hostnameB/<a href='http://monitoringhost.com/icinga/cgi-bin/extinfo.cgi?type=2&host=hostnameB&service=SS Test Application-Demo-Sub - Last Submission Status'>SS Test Application-Demo-Sub - Last Submission Status on hostnameB</a> is OK

We want the URL to be clickable

sjm
  • 415
  • 1
  • 9
  • 23

2 Answers2

1

To make a piece of text function as a link, you can send it to the API as <http://www.foo.com|Link to foo>[1].

The system will also automatically detect URLs that are simply inserted, so if you sent -

Hey, have you seen http://www.foo.com ?, it would automatically make the URL a link.

Hope that helps!

[1] https://api.slack.com/docs/message-formatting#linking_to_urls

Colm Doyle
  • 3,598
  • 1
  • 20
  • 22
0

Figure out that the script is sending all of the available variables to the slack and slack is app is picking just a few of them....

We ended up writing our own notification script; which only sends a few variables as an attachment to slack

sjm
  • 415
  • 1
  • 9
  • 23