replace NLog in Azure - azure

We have a running site using NLog for logs. We are not only login errors, we use it to measure things relative to business logic.
Now we are moving to Azure and that's why I'm searching for a better way to log this type of info in azure. I'm looking for something like graylog.
Things to have in mind:
What azure provides to log info is easy to read?
Can i make queries to read data?
Is there an API to log?

Check out the following stuff, which is more or less native to Azure. Also you could probably use some of the third parties, like New Relic.
Log Analytics
Application Insights
Operations Management Suite
Application Insights not only has out of the box monitoring but also provides capabilities to create your own queries.
ps. Just my 2 cents, I'd go for OMS, Microsoft is pushing it oh so hard, it is evolving rapidly, even if you are missing some capabilities they are going to be there soon and in the long run, Microsoft is really unlikely to drop OMS anytime soon, since they started forcing it like 1.5 year ago.

Related

Accessing Application Insights Analytics from either Insights or .net

I heave created a query in (the wonderful tool ) Application Insight Analytics which I intended to use for monitoring in one way or another, but from what I found, this is not that easy?
The query returns some data I would like to set up Application Insight alerts on (such as if (column1 equals '1') then alert() or if(column2 > 10) then alert().
Or if that is not possible, is the Analytics service available either from .net code or power shell? If so, I would be able to create the alert-service myself (not ideal though).
Is any of the above features available?
(I do not think the functionality I´m after is available in Insights. I want to compare two custom events and based on differences between them, take actions if necessary)
There's currently no way to get azure alerts from an Analytics query.
However, there is a request for that on uservoice:
https://visualstudio.uservoice.com/forums/357324-application-insights/suggestions/14428134-add-alerts-based-on-results-of-analytics-queries
so go upvote and comment on that to make your voice heard.
There's also a planned service to read data from Analytics through an API as well:
https://visualstudio.uservoice.com/forums/357324-application-insights/suggestions/4999529-make-data-accessible-via-apis-for-custom-processin
Which you could write your own service against to do extra work.

Change Azure Database Plan via API / Programmatically

I want to use the database plan "Web tier (Retired)" when my web application is being used (ie: for executing queries), but return to the plan "Standard tier" when the web application is idle.
Can I programmatically do this change?
I want to do that change in my web application's Application_Start
protected void Application_Start()
{
...
}
I would use the "standard tier" always if it wasn't that bad with large queries. It is really slow and there are several StackOverflow posts about that. The retired web plan, on the other hand, is really good with large queries but is very expensive
You can use the Update Database REST API to programmatically change the plan.
However, this is not a change that will occur in a matter of a few seconds. This could take several minutes (that's been my experience). So, putting this in your application startup code is not something I would recommend.
I would encourage you to look at trying to optimize your queries as a long-term solution. After all, the Web edition is only going to be around until September, 2015. You might want to look at this for some hints on things you could do differently.
Also, since you mentioned that Standard tier is not delivering the performance you are needing, you may want to give Premium a try to see if it works better for your application.

Sql Azure Monitoring tool

I'd like to collect information about top N queries ranked by execution time. The same as described here: http://msdn.microsoft.com/en-us/library/windowsazure/ff394114.aspx. But I need historical data. Is there any tool for this? Something really simple and cheap. Or it is better to implement this by myself? Like it is described here: http://wasa.codeplex.com/
If you are open to a paid service to do this monitoring, Cotega may be an options for you. We do monitoring and store historical data on your SQL Azure database. We actually previously logged top N queries, but stopped doing it as it was hard for DBA's to use this information. It would be great to hear more about how you would like to see and use this information as it would be pretty easy to add this capability back in.
If you want to do this yourself, there are some great services such as Aditi that can be used to schedule processes that would allow you to create some code to be executed on regular basis to log this yourself.
Full disclosure, I work on the Cotega service.

A little confused about Azure

I've been reading about azures storage system, and worker roles and web roles.
Do you HAVE to develop an application specifically for azure with this? It looks like you can remote desktop into azure and setup an application in IIS like you normally can on a windows server, right? I'm a little confused because they read like you need to develop an azure specific application.
Looking to move to the cloud, but I don't want to have to rework my application for it.
Thanks for any clarification.
Changes to the ASP.NET application are minimal (for the most part the web application will just work in Azure)
But you don't remote connect to deploy. You actually build a package (zip) with a manifest (xml) which has information about how to deploy your app, and you give it to Azure. In turn, Azure will take care of allocating servers and deploying your app.
There are several elements to think about here -
Code wise - to a large degree this is 'just' .net running on IIS and Windows, so everything is very familiar and all the past learnings, best-practices, etc. apply.
On top of that you may want to leverage some Azure specific capabilities - for example table storage, or queues, or interacting with your deployment - for which you might need to learn a few more APIs, but these aren't big, and are well thought of and kept quite simple, so there's not a bit learning curve. good architecture, of course, would look to abstract these away to prevent/reduce lock-in, but that's a design choice.
Outside the code, however, there's a bit more to think about -
You'd like to think about your deployment - because RDP-ing into a machine and making changes that way takes away many of the benefits of PaaS - namely the ability of the platform to 'self-heal' by automatically re-deploying your application should a server fail.
You would also like to think about monitoring - which would need to be done slightly differently.
Last - cloud enables different scenarios, and provides a scale-out model rather than a scale-up model, which you might want to take advantage of, but it might require doing things a little bit.
So - bottom line - yes - you could probably get an application in Azure very quickly, without really having learning much or anything, but to do things properly, and to really gain from the platform, you'd like to learn a bit more about it. good thing is - it's not much, and it all feels very familiar, just another 'framework' for .net (and Java, amongst others....)
You can just build a pretty vanilla web application with a SQL backend and get it to work on Azure with minimal Azure dependencies. This application will then be pretty portable to another server or cloud platform.
But like you have seen, there are a number of Azure specific features. But these are generally optional and you can do without them, although in building highly scalable sites they are useful.
Azure is a platform, so under normal circumstances you should not need to remote desktop in fiddle with stuff. RDP is really just for use in desperate debugging situations.

Retrieving Azure diagnostics

I have an app running on Azure which logs (traces, really) to the Azure Diagnostics storage. I'm looking for a good tool which can be used to analyze these logs.
I know it's possible to retrieve these trace logs using the Server Explorer in Visual Studio, but this tool is a bit cumbersome. For instance, I can't specify a time interval for log records.
Also tried Azure Diagnostics Manager from Cerebrata, which is nice, but wonder if there any other good alternatives?
(The logging itself works just fine, it's the retrieval and analysis of the logs which I'm interested in)
Cerebrata certainly have the most complete solution for dealing with diagnostics and it's not especially expensive, but it does still cost money.
If you're just looking at the trace information then I've found that just querying the Azure Tables works well enough. If you're not able to convert a time into ticks in your head (which is what the PartitionKey of the table is), then you can use LINQPad. Jason Haley has provided full instructions and helper code.
Cerebrata's tool is probably the best to date to deal with diagnostics information.
Also try Stackify. Their DevOps solutions makes it really easy to remotely see server details needed for troubleshooting without using azure storage accounts. Check out this article: Windows Azure Diagnostics: The Bad, The Ugly, and a Better Way
I just came across this MSDN blog post. It hasn't been updated since September but looks like it has a rich enough feature set.

Resources