I set up a Slack notification channel in Grafana using a webhook as URL.
When I click "Send Test" I see this notification in my Slack channel:
However ordinary notifications are shown without images. I read Grafana's docs, but apparently I haven't understood it.
If you want to include screenshots of the firing alerts in the slack messages you have to configure either the external image destination in Grafana, or a bot integration via Slack Apps. Follow Slack’s guide to set up a bot integration and use the token provided https://api.slack.com/bot-users, which starts with “xoxb”.
Can someone guide me through it? I created a new bot and generated a token for it (starts with xoxb as requested) but how do I keep going from there?
Please assign this permission in your Slack app then try:
Go to <grafana_host>/alerting/notification/new (or click the top-left Menu icon, select "Alerting", select "Notification Channels", click the green "New Channel" button). You should get the page in the screenshot below.
Do the following steps:
Set "Name" for the channel.
Set the channel "Type" to Slack.
Check "Include image" option.
In "Slack settings", set "URL" to incoming
webhook you created in Slack.
Set "Token" to bot token generated for
bot.
And voila!
Update
Ability to configure a Slack token was added in Grafana version 4.6.0
It wasn't mentioned by OP but if your target Slack channel is a private channel, you'll also need to ensure that you've added the bot to the private channel so that it is able upload an image to it.
You can do this by viewing the channel's details, clicking "More" and then "Add apps". On the screen that shows up, you should be able to search for the bot that you created and click the "Add" button aside it.
Good luck!
Related
I am working on a slack app that can be installed in any channel. It is possible or is there any slack method that allows you to open the slack app home tab from the channel. I mean a method that can navigate the user from the channel to the slack app home-tab
Send a slack message to users with #appname. For example "Click here to open the #ACME Dashboard" (assuming "ACME Dashboard" is the name of your app). #ACME Dashboard will turn into a clickable link that jumps to the app home page. It'll also add the app for users that haven't already added the app.
At least, this worked for me in limited testing with myself and one other person, so I hope it works for you. I haven't tried to figure it out, but I'm sure there's a way to send the '#app name' as part of a message from the API.
In a Slack conversation, is it possible to click on a button to send a message to the Slack channel?
The Slack conversation could be:
The user types a word (or message)
A slackbot shows some text and two buttons
The user clicks on a button to send a TEXT message to the Slack channel
The Slackbot reacts on the 'action' message.
It is not possible to create an REST service for my Slackbot, because the Slackbot is behind a firewall. So, registering commands is not possible.
So sending a message as the result of a button click is needed. The Slackbot can react on that message.
I read that attachments could be a good way to do this, BUT the is 'outmoded'.
I tried to send an secondary attachment, which is outmoded, but that was not possible.
The next approach was adding a webhook. So pushing a button resulted in using the url, but that is of course not possible because I cannot send a POST request via a simple (get) url.
Please give a short example.
This will not work.
Every interactive feature (e.g. buttons) require your app to be able to receive POST requests from Slack through the public Internet. Since you say you can not provide that (e.g. behind a company firewall) you will not be able to use any interactive features.
See also this answer: How to integrate internal APIs (Not accessible outside office network) to slack slash commands
I am trying to publish a chatbot to Bing channel. I have filled in all the mandatory information, but the Submit for Review button is still disabled, any tips why? Thanks.
For channel configuration issues, the best way is to submit your problem on BotBuilder GitHub and include your bot name, bot handle and app ID as you registered in the Bot Developer Portal
I was able to repro your issue. It seems that the "Tags for your Bot" field is also mandatory, even though is not marked as it in the UI.
Try filling that field and you will see the button will become enabled.
I am trying to implement a bot in my website using the botbuilder framework for node.js. The function builder.ChatConnector() get the parameters appId and appPassword, does any one knows where can i found these appId and appPassword? It isn't clear for me in the microsoft documentation. The function is shown above:
function builder.ChatConnect
BotFramework documentation
You can find this information when you create your bot in Azure Bot Service, or when you proceed to register your bot at the dev portal.
Here's a brief walkthrough for registering through the dev portal with the minimum requirements. You'll need to fill out the name, bot handle and description for the bot as indicated below:
After this, you can scroll down and click on the button that says "Create Microsoft App ID and password".
Once you click on the button you'll be taken to a page with your bot name, your newly-generated App ID, and another button that allows you "Generate a password to continue".
After you click the button a small window will pop up with your password which you need to keep track of as it is only shown once!
NOTE: For developing and testing using the Emulator, you don't need this information just yet. You only need the AppID and password when you are making your bot public facing/deploying it.
You need to register your bot in https://dev.botframework.com/ and there you will get those values. Check this article that explains how to do that.
How do you link to your itunes review site in a Parse push message, is that even possible?
You have two options:
Option 1) First, create a custom activity in your app and all that activity should do is automatically open up the link to the whatever website/iTunes/app store product you want them to review.
Then, you can set your push notification via Parse to open that activity when the user clicks on it. See the section called "Responding with a Custom Activity" at this link. https://parse.com/tutorials/android-push-notifications
Option 2) At the same link, see the section for Responding with a Custom URI and simply use the URI to direct them to your website/iTunes/app store/etc. https://parse.com/tutorials/android-push-notifications