Can Azure Insights API be used for completely stand-alone custom metrics? - azure

I am hoping I can put in some simple API calls in legacy systems so I can capture point-in-time metrics "somewhere" in Azure, so that I can then take advantage of the Azure Portal dashboard and metrics graphing. I looked into Insights SDK but that seems to require that whatever I'm running be deployed somewhere in Azure cloud. I just want to run a simple powershell script or simple .net console app that connects to a legacy database in our internal network, pulls very basic point-in-time counts for message processing backlog... and then pushes that info with a timestamp out "somewhere" for visualization.
Any ideas what I can use for this in Azure?
Thanks,
Andres

You can use the TrackMetric API in Application Insights SDK.
https://learn.microsoft.com/en-us/azure/application-insights/app-insights-api-custom-events-metrics

Related

Possible to integrate Azure Application insights with existing service fabric cluster in code-less manner?

Would like to use Application insights especially, "Azure live metrics stream" feature on existing PROD Azure service fabric workloads to do performance analysis.Is service fabric has built-in integration with Azure Application Insights?
Is it possible do it in code less manner like how Application insights can be enabled via portal for web Apps/Azure functions? If not, why?
Then, how to do it code based manner? Any reference to do code changes would be helpful.
What is the difference between code less & code based monitoring? When to choose one over another? Our requirement is to study performance of application (deployed on various nodes of PROD service fabric cluster) under different load.
Please clarify above list of queries.
Is service fabric has built-in integration with Azure Application Insights?
You could leverage Windows Azure Diagnostics (WAD) extension to sink SF cluster logs and/or Perf metrics into App Insights - Configuring Application Insights with WAD
There is no way to monitor an application running in SF via AppInsights without a small amount of coding.
Then, how to do it code based manner? Any reference to do code changes would be helpful.
Here you go - Monitor and diagnose an ASP.NET Core application on Service Fabric using Application Insights.
What is the difference between code less & code based monitoring? When to choose one over another? Our requirement is to study performance of application (deployed on various nodes of PROD service fabric cluster) under different load.
As I said, to monitor your app you have to code. Although it's super simple. Other from that, here is a general recommendation - Event analysis and visualization with Application Insights:
It is recommended to use EventFlow and WAD as aggregation solutions,
because they allow for a more modular approach to diagnostics and
monitoring, i.e. if you want to change your outputs from EventFlow, it
requires no change to your actual instrumentation, just a simple
modification to your config file. If, however, you decide to invest in
using Application Insights and are not likely to change to a different
platform, you should look into using Application Insights' new SDK for
aggregating events and sending them to Application Insights. This
means that you will no longer have to configure EventFlow to send your
data to Application Insights, but instead will install the
ApplicationInsight's Service Fabric NuGet package.
Here is the link to the best practices - Monitoring and diagnostics on SF platform.

Azure PaaS for Storing Centralized Log Data for Microservices

If we deploy a Microservice in azure AKS, there may be multiple pods and replica of same services. If Microservice want to keep any custom log information about it's flow or errors , where better to store such logs centrally? Any PaaS services? e. g. Azure Storage? Any real experience to share here?
I would suggest Azure Application Insigths. You can enrich your telemetry with aks details using this integration package:
... when using Microsoft Application Insights for Kubernetes, you will see Kubernetes related properties like Pod-Name, Deployment ... on all your telemetry entries. Proper values will also be set to make use of the rich features like enabling the Application Map to show the multiple micro services on the same map.
For logging within your application you can use the ILogger interface (if using .net) and pipe it to app insights.
Or you can write your own logging using the sdk, available in selected languages.
For java applications, you can pipe your logs as well. You probably have to manually add pod details to your telemetry using telemetry initializers as the Microsoft Application Insights for Kubernetes package is .Net only. As far as I know they use the kubernetes rest api to query for details.

Azure application insights or log analytics

What is the use case for Azure application insights or log analytics?
I am using APIM and Azure Functions and want to perform logging for requests. Which one is the best fit, application insights or log analytics?
https://learn.microsoft.com/en-gb/azure/azure-monitor/overview
Update
In particular, any info on Azure application insights vs log analytics used for APIM?
What used to be known as Application Insights and Log Analytics independent offerings - are now a part of Azure Monitor. We're actively merging both platforms.
For instance, Analytics exploration part is exactly the same (same backend, same UX, same capabilities, just different data schema). Alerts are the same. Some experiences are still different (for instance, app experiences such as Application Map).
Example: in Azure Monitor Overview (https://learn.microsoft.com/en-gb/azure/azure-monitor/overview):
"Log Analytics" is referred as a feature and not what used to be known as Log Analytics as a product. For instance, Application Insights resources provide the same "Log Analytics" feature.
For Azure Functions / APIM the native integration with Azure Monitor is through Application Insights.
Update (October, 2020). Application Insights can now store data in Log Analytics workspaces. Now many workspace related features are available to Application Insights resources. How to migrate.
Azure function better to go with application insights and if you working with kubernetes cluster choose Log analytics work space
Azure Functions offers built-in integration with Azure Application Insights to monitor functions.
So for azure function, you'd better use application insights, which is easy configure.
Details are here.
Application Insights
Application Insights is an Application Performance Management (APM) service, that you use to monitor your application. It helps to detect performance anomalies, has analytic abilities, and can help you understand how users interact with your application.
Not only can it collect telemetry data from your application, but it can also collect information from the application host, Azure Diagnostics, or Docker logs. It’s also nice that you can use Application Insights to set up tests that send requests to your website/service to check for availability (and receive a notice if these fail).
One of the most powerful things that I’ve noticed in my use of Application Insights (which is monitoring this blog), is the Smart Detection feature. This feature proactively analyzes and detects changes in your application. So even if you hadn’t set up an Alert of monitoring of a specific metric, it can pick it up and react to it.

Monitoring the Azure app services

I was wondering if someone can shed some lights on the application monitoring and alerting solution that's being used to specifically monitor the Azure app service. We have multiple API apps running on App service service and we would like to monitor certain metrics (ex: Availability, response time, number of request received, etc). I enabled the application insight on each of these apps and the result is quite promising, it fulfills all my requirement, but there's one small issue: I need to scroll through each app to see their performance. I can't aggregate them all in one space. I would like to create a centralized dashboard for all aforementioned metrics and have them displayed. I tried using OMS but it seems to be lacking a lot of functionality.
Any pointer would be very appreciated.
I wrote recently about it on our blog: http://predica.pl/blog/azure-monitoring-and-auditing/ - you will find link to MS documentation also there.
If you are using App Insights already you should be able to pick things from App Insights and put it on the Azure portal dashboard. Other than that probably getting data into Power Bi application insight is your best shot - https://powerbi.microsoft.com/en-us/documentation/powerbi-content-pack-application-insights/

Internet of Things using MS Azure

I am starting my journey of IoT development with MS Azure. I would like some insight on the Azure cloud. I am a total newbie on cloud development. Can someone tell me some good books/links on Azure that will help me understand how I can use Azure for IoT and start development on the same.?
Thanks a lot for your inputs.
This totally depends on the architecture of your application. You can use SAAS components for rapid prototyping, parts or all of your application architecture. This will give you a better insight into selecting the appropriate stack of tools for your application.
If you want to deploy your own software stack, you would provision Azure Virtual Machines. Azure provides an SDK to interact with the cloud infrastructure.
Docker is a really good option to use for application deployment these days. Google provides better support for Docker containers using its Kubernetes framework.
Simple APIs or website can be developed on azure using Azure webapps. I am currently developing a node application using azure websites. The actual container where the site runs is a windows NT machine with IIS. If you want your SAAS server container's to be linux based then you might look at AWS/Google or Redhat Openshift.
I have used OpenShift SAAS, and found it quite easy to get onboard with.
I advise you to have a look at Build and Ignite events, this week. There might be more announcements there. You can definitely have a look at the following white paper: http://download.microsoft.com/download/E/1/F/E1FFDADF-C0FF-4E72-A834-B173A079F393/Microsoft_Internet_of_Things_White_Paper.pdf
The most important services for IoT in Azure are (until today):
Azure Event Hubs: a massive ingestion service that can take in millions of telemetry events per second.
Azure Stream Analytics: Real time complex event processing, combining multiple incoming streams of data and detection patterns in it
PowerBI: this will allow users to build and explore interactive reports and graphs
Azure Machine Learning: Leverage prediction & machine learning models
For storage, you have DocumentDB, Azure and blob storage, among other
HDInsight will help you in working with the data (big data) and make jobs with it.
Azure Web Apps and API apps will allow you to present and expose the data to you users and custom reports
Good luck

Resources