I've recently started using application insights with a web api.
It will be really helpful to configure app insights to post error messages in a slack channel.
I've seen there is a slack connector but I am not sure how to use it, my guess is that this can be solved with the slack connector and a azure logic app, any tips? tutorials?
You may have a look at this link: https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app. I followed the instruction and it worked for me.
The tricky part is you need to click the "Deploy to Azure" button on this link page. It would redirect you to Azure Portal, and you will need to specify which channel you want the alert message to be sent e.g. #somechannel. Don't use direct message like #yourname, it has some problem with that and the logic app couldn't deploy for me.
Then you just follow the instruction to find the deployed logic app and authenticate it by logging into slack. And you also need get the logic app URI from the deployment output as in the instruction. Once you put the URI into the alert webhook, you are ready to go!
It's relatively easy to set up a slack webhook.
There's a pretty good C# nuget package for this at https://github.com/nerdfury/Slack.Webhooks
Although you'd need to set up a seperate service to poll and route the app insights data.
There's also commercial options.
getcloudbot.com allows you to hook your Azure Application Insights bundle directly into your slack channel. It's good at staying on top of your services.
Disclaimer : I run it.
You can configure an alert for your error messages https://azure.microsoft.com/en-us/documentation/articles/app-insights-alerts
And then configure sending to Slack using web hooks: https://code.msdn.microsoft.com/Create-Azure-Alerts-with-b938077a
Another quick solution to this, which doesn't involve additional code or a logic app, is to set up a Slack email integration, which provides you an inbound email address for a given channel. You can use that in Application Insights in the "Additional administrator email(s)" field.
This isn't perfect, as you don't really get a lot of details in the post to slack, but it will notify you and provide the name of the alert.
The most easiest path that I found to integrate was using an app named Slack Email which sends email alerts to slack. Once you subscribe this email id to alerts in Application Insights it will start sending the messages on the specific channel you have linked the email to.
https://teamesub.slack.com/apps/A0F81496D-email
Related
I'm new to the concept of Docusign but I have successfully developed API for Envelope creation and View Url. For creating Docusign connect, I have created a Connect Configuration in the Docusign Developer Admin account. It would be a help if someone guides me on how to proceed with the Webhook Writer and Listener for the Envelope events in .Net core.I have my Event Notification object configured as well.
The other Questions mentioned related to Webhooks in StackOverflow are partial.
Welcome to our platform.
The first thing you want to do is to deploy your listener in cloud provider of your choice. We provide samples for Azure, GCP and AWS.
https://github.com/docusign/connect-node-listener-azure
https://github.com/docusign/connect-node-listener-aws
https://github.com/docusign/connect-node-listener-gcloud
Then for your worker, you want to look at the following code sample:
https://github.com/docusign/connect-csharp-worker-aws
or use related cloud provider. You will then need to update your Connect configuration with your listener endpoint.
In a nutshell, the listener will receive the events from DS Connect and queues them. The worker will pull the new events off the queue and processes them.
We have a couple videos and material coming shortly that will cover this topic in full details, so stay tuned.
How to get response and reply to sms using Twilio with C# Asp.net. How do I Send Outbound SMS Text Messages?
This is taken from an article I wrote on setting up Twilio and our Conveyor extension (free, go to Tools->Extensions) for development locally.
We will use Conveyor to provide incoming access to our web project through a tunnel, enabling your webhooks to be called on localhost. Conveyor is available through the Tools->Extensions menu, by searching for conveyor.
Setup an MVC Web Application
To get started, we’re going to setup a simple webhooks MVC demo app in Visual Studio. We will use the Twilio service to notify our application when a text message (SMS) has been received and respond with a specific message. This tutorial can also be used for Twilio's other API's including Chat, Voice and Video.
This example project is designed to show you how Conveyor can be used to simplify the use of webhooks on your local machine. If you need more details about how to setup webhooks please look online at numerous tutorials and projects.
Create a new project, we’ll be creating an empty ASP.NET MVC C# project. We won’t be hosting in the Cloud so don’t select Azure.
Add NuGet Packages
In order to use the Twilio helper libraries we will need to install the Twilio NuGet package via the Package Manager console. Enter the following line and hit return;
Install-Package Twilio.AspNet.Mvc -DependencyVersion HighestMinor
Create a new Controller
To listen for the Twilio webhook we’ll create an MVC Controller. Twilio will call our webhook once an SMS text message has been received.
Right click the Controllers folder in your project, select Add > Controller and add an empty MVC 5 Controller. You can name your Controller as you see fit.
Next you will need to add the using statements to import the Twilio namespaces;
using Twilio.AspNet.Common;
using Twilio.AspNet.Mvc;
using Twilio.TwiML;
and change the Controller class to inherit from TwilioController.
Now we add the following code;
[HttpPost]
public TwiMLResult Index(SmsRequest request)
{
var response = new MessagingResponse();
response.Message("Hello World");
return TwiML(response);
}
Of course you can code your webhook however you need but for our example, we have our response message set as “Hello World” so when our webhook receives notification of a SMS text to our Twilio number, it will respond with our own message.
Run the Application
So now we can go ahead and run our application. As this is a simple project with the only content being our Controller, you will see an error page. That doesn’t matter, we just need our project to be running in Visual Studio so we can make use of the webhook.
Use Conveyor
Now the application is running, we can use Conveyor to obtain a publically accessible URL that we can provide to Twilio. Clicking Access Over Internet in the Conveyor window will then provide us with the URL we need. You may need to register an account at this point.
Calls to the conveyor.cloud URL are tunnelled to your localhost, so we will add the Controller name to the conveyor.cloud URL and then add it to the Twilio settings.
That’s it. We’re ready to test it out!
Now when I send a SMS text to my Twilio number the message from our application is sent back to the original mobile number.
I am testing out this android chat application using Bluemix https://github.com/IBM-Bluemix/chatbot-watson-android
At some point in the conversation I will need to call a REST API/webservice to retrieve info about data that has been gathered and send it back to the user as a chat.
I don't want to do it from within the android application as the application wont work when I deploy it to another platform (e.g. slack).
Is there a way to call REST APIs from within watson?
I don't think the conversation service can do it directly, but can it link to another Bluemix service and use the result of that?
If you are already using some form of middleware this can be achieved by setting an action tag in the .JSON editor of the node that should fire the action. This then gets picked up by your middleware listener.
Alternatively try the new cloud actions feature that has just been released here https://console.bluemix.net/docs/services/conversation/dialog-actions.html#dialog-actions which is really simple and easy
I would create a server to intermediate the communication between your app (android) and the conversation service. This server could call/retrieve the required data before sending the conversation response to your app.
As you're using Bluemix, you could use Node-Red to easily do this.
Here is an example of an app that I made exactly this.
If you are starting with Watson and Bluemix, I strongly advice trying to use the Node-red starting pack. It's really easy to integrate Watson services and call REST API/web-services, even integrate with a database.
Here is a starting point to this:
https://nodered.org/docs/platforms/bluemix
Happy coding!
I want to implement a push notification service. The idea is to use the GCM Service. Is it possible to read the notifications both via web app (the app is written in php using laravel) and via mobile app for the authenticated users using the same technology?
I think it is possible, I also see this tutorial that can help you to achieve that. It also use PHP as a sample, so it seems like your work will be easier:)
It explains here the basic steps that you need to achieve push notification. It has a sample code and a screenshot to make you understand more the content of this tutorial.
In developing this application, it involves two parts, a GCM Server Application that create Web application using Php to send message to User via GCM Cloud server and GCM Client Application that create Android application which receive messages sent from GCM Server Web App.
For more information you can also check this links:
Implementing Push Messaging for Chrome
How to send push notification to web browser?
I am looking to add authentication to my WP7 application. I currently have simple, unauthorized push notifications working thanks to this MSDN sample.
I am having difficulty figuring out exactly what I need to change in my code in order to get authentication. I have read this MSDN article and know I need to get a TLS certificate uploaded to the App Dev website (in progress) and get some info from it once it's verified.
Thanks for reading/helping!
If you mean code to change in your WP application, you shouldn't have to change anything. Authentication simply changes the way your web service communicates with the Microsoft Push Notification Service, rather than how the Microsoft Push Notification Service communicates with your app on the phone.