Giter Club home page Giter Club logo

azure-appservices-diagnostics's Introduction

⛔️ DEPRECATED

This project has been migrated over into an internal repository. While we may not be tracking or accepting new issues here in this repo, please feel free to use our feedback channel in our Diagnose and Solve blade in Azure Portal

Azure App Service Diagnostics

When you’re running a web application, you want to be prepared for any issues that may arise, from 500 errors to your users telling you that your site is down. App Service diagnostics is an intelligent and interactive experience to help you troubleshoot your app with no configuration required. When you do run into issues with your app, App Service diagnostics points out what’s wrong to guide you to the right information to more easily and quickly troubleshoot and resolve the issue.

What is supported?

App Service Diagnostics can diagnose issues on these types of resources:

Getting Started

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-appservices-diagnostics's People

Contributors

acorn20180214 avatar cindylovescoding avatar craigmaher avatar cristhianu avatar dagrooms52 avatar darreldonald avatar dependabot[bot] avatar hannaatmsft avatar hforeste avatar khaled-zayed avatar michimune avatar microsoftopensource avatar milincjoshi7 avatar mksuni avatar msftgits avatar nmallick1 avatar pappleby64 avatar prbajrac avatar puneetg1983 avatar rekhaswaminathan avatar sharmaajay19 avatar shekhargupta1988 avatar sneezry avatar stevenernst131 avatar willdavsmith avatar xiaoxuhu avatar yairor avatar yifguomsft avatar yunjchoi avatar yxue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-appservices-diagnostics's Issues

Make stderr / stdout enablement and capture as easy as possible

The care ran for long time and CSS engineer had to say this "Please go to your files and check inside d:\LogFiles\ for any file name starting with “stdout_”. Please review these logs or share them with me for review.
If you do not have those logs, you can enable them: https://blogs.msdn.microsoft.com/waws/2018/06/10/troubleshooting-http-502-5-startup-issues-in-azure-appservice-for-asp-net-core-websites/"

Lets make a solution button out of it

High-level documentation

The name and one-sentence description of this project sound promising - I've been struggling with diagnosing certain issues in a webjob - but that one sentence is the only high-level documentation I can find. Can you add a link from the README.md to a high-level description of the major components so that users can assess whether it might be useful to them without having to reverse engineer the purpose from the API?

Unhealthy Server Instance doesn't Replace

Hi azure,

We are encountering some issue where the unhealthy server instance doesn't get replaced by a new different instance even though it more than 1 hour already.

Here on your documentation:

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/autoscale-get-started#route-traffic-to-healthy-instances-app-service

image

It says that unhealthy instance will be replaced a new one, however in our case we have unhealthy instance for more than 1 hour already (3 hours actual), and yet that instance is still there and doesn't get replaced by a new one.

Linux web app service with netcore 3.0 does not support auto heal

I'm not sure where the correct place to raise this issue is so I'll try here, if not could someone refer me to the correct project.

The issue is Windows App Service/Webapp supports auto heal. Linux web apps do not support it. What is required to get this functionality added? I'd be happy to assist with development or testing.

Here is a screenshot demonstrating the feature that is missing. Without this functionality we have to rely on alerts and manual reboots if an out of memory exception or similar occurs.

image

Category 'AppServiceFileAuditLogs' is not supported.

I was in a SEV A with support last night due to an ARM Template deployment failing with the error:
"Category 'AppServiceFileAuditLogs' is not supported."

  • We have been using these same arm templates since June 2020 and have always included this setting.
  • We have over 900 App Services deployed across 2 regions and 2 subscriptions (test,uat,prod) use the same template
  • This arm template deployment only fails in US WEST
  • This arm template deployment succeeds in US EAST
  • This arm template deployment worked last week, started failing on Monday
  • This is an S1 app svc plan, I know the docs state this is only compatible with Premium but again, this has been operational since 6/2020. It also still works in US EAST

Support was hesitant to open an ICM and engage the product group b/c it appears these features have been in preview since 2019 (thats quite a long time).

I'm doing what I can to try and get to the bottom of this issue and figure out a path forward. I'd be happy to provide specifics about my case in a DM.

Here is a deployment correlation id that may help: 032d4dee-b390-4d44-8b51-4b8a967981d3

ARM Template with some things redacted:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "org": {
            "allowedValues": [
                "redacted"
            ],
            "type": "String"
        },
        "app_name": {
            "type": "String"
        },
        "environment": {
            "allowedValues": [
                "test",
                "uat",
                "prod",
                "train"
            ],
            "type": "String"
        },
        "new_deployment": {
            "type": "Bool"
        },
        "app_settings": {
            "type": "Object"
        },
        "cors_allowed_origins": {
            "defaultValue": [
                "*"
            ],
            "type": "Array",
            "metadata": {
                "description": "CORS allowed origins"
            }
        },
        "subnet_resource_id": {
            "defaultValue": "",
            "type": "String"
        },
        "ip_restrictions": {
            "defaultValue": [],
            "type": "Array"
        }
    },
    "variables": {
        "ProdSubscriptionId": "redacted",
        "tag_environment": "[toUpper(parameters('environment'))]",
        "location": "[replace(resourceGroup().location,'us','')]",
        "app_service_name": "[concat(parameters('org'),'-',parameters('app_name'),'-',variables('location'),'-',parameters('environment'))]",
        "app_insights_location": "[if(equals(variables('location'),'west'),'westus2',resourceGroup().location)]",
        "app_service_plan_id": "[resourceId('microsoft.web/serverfarms/', variables('app_service_name'))]",
        "hiddenlink_app_service": "[concat('hidden-link:/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name,'/providers/Microsoft.Web/sites/',variables('app_service_name'))]",
        "hiddenreleated_app_service_plan": "[concat('hidden-related:',variables('app_service_plan_id'))]",
        "prod_log_analytics_workspace_id": "redacted",
        "nonprod_log_analytics_workspace_id": "redacted",
        "log_analytics_workspace_id": "[if(equals(subscription().subscriptionId,variables('ProdSubscriptionId')),variables('prod_log_analytics_workspace_id'),variables('nonprod_log_analytics_workspace_id'))]",
        "quota_gb": "[if(equals(subscription().subscriptionId,variables('ProdSubscriptionId')),'50','10')]"
    },
    "resources": [
        {
            "type": "microsoft.insights/components",
            "apiVersion": "2018-05-01-preview",
            "name": "[variables('app_service_name')]",
            "location": "[variables('app_insights_location')]",
            "tags": {
                "[variables('hiddenlink_app_service')]": "Resource",
                "Application": "[parameters('app_name')]",
                "Environment": "[variables('tag_environment')]",
                "Region": "[variables('app_insights_location')]"
            },
            "kind": "web",
            "properties": {
                "ApplicationId": "[variables('app_service_name')]"
            }
        },
        {
            "type": "microsoft.insights/components/CurrentBillingFeatures",
            "apiVersion": "2015-05-01",
            "name": "[concat(variables('app_service_name'),'/Basic')]",
            "location": "[resourceGroup().location]",
            "dependsOn": [
                "[resourceId('microsoft.insights/components', variables('app_service_name'))]"
            ],
            "properties": {
                "CurrentBillingFeatures": "Basic",
                "DataVolumeCap": {
                    "Cap": "[variables('quota_gb')]",
                    "WarningThreshold": 80,
                    "ResetTime": 5
                }
            }
        },
        {
            "type": "Microsoft.Web/sites",
            "apiVersion": "2019-08-01",
            "name": "[variables('app_service_name')]",
            "location": "[resourceGroup().location]",
            "dependsOn": [
                "[resourceId('microsoft.insights/components/', variables('app_service_name'))]"
            ],
            "tags": {
                "[variables('hiddenreleated_app_service_plan')]": "empty",
                "Application": "[parameters('app_name')]",
                "Environment": "[variables('tag_environment')]",
                "Region": "[resourceGroup().location]"
            },
            "kind": "app",
            "identity": {
                "type": "SystemAssigned"
            },
            "properties": {
                "enabled": true,
                "serverFarmId": "[variables('app_service_plan_id')]",
                "reserved": false
            },
            "resources": [],
            "condition": "[parameters('new_deployment')]"
        },
        {
            "type": "Microsoft.Web/sites/slots",
            "apiVersion": "2019-08-01",
            "name": "[concat(variables('app_service_name'),'/stage-slot')]",
            "location": "[resourceGroup().location]",
            "dependsOn": [
                "[resourceId('Microsoft.Web/Sites', variables('app_service_name'))]"
            ],
            "tags": {
                "displayName": "stage-slot",
                "Application": "[parameters('app_name')]",
                "Environment": "[variables('tag_environment')]",
                "Region": "[resourceGroup().location]"
            },
            "identity": {
                "type": "SystemAssigned"
            },
            "properties": {
                "clientAffinityEnabled": false,
                "serverFarmId": "[variables('app_service_plan_id')]",
                "siteConfig": {
                    "copy": [
                        {
                            "name": "appSettings",
                            "count": "[length(parameters('app_settings').keyvalue_pairs)]",
                            "input": {
                                "name": "[parameters('app_settings').keyvalue_pairs[copyIndex('appSettings')].name]",
                                "value": "[parameters('app_settings').keyvalue_pairs[copyIndex('appSettings')].value]"
                            }
                        }
                    ]
                }
            },
            "resources": [
                {
                    "type": "providers/diagnosticSettings",
                    "apiVersion": "2017-05-01-preview",
                    "name": "Microsoft.Insights/diagnosticsToLogAnalytics",
                    "dependsOn": [
                        "[resourceId('Microsoft.Web/sites/slots', variables('app_service_name'),'stage-slot')]"
                    ],
                    "properties": {
                        "name": "Log to Log Analytics",
                        "workspaceId": "[variables('log_analytics_workspace_id')]",
                        "logs": [
                            {
                                "category": "AppServiceHTTPLogs",
                                "enabled": true,
                                "retentionPolicy": {
                                    "days": 0,
                                    "enabled": false
                                }
                            },
                            {
                                "category": "AppServiceConsoleLogs",
                                "enabled": true,
                                "retentionPolicy": {
                                    "days": 0,
                                    "enabled": false
                                }
                            },
                            {
                                "category": "AppServiceAppLogs",
                                "enabled": true,
                                "retentionPolicy": {
                                    "days": 0,
                                    "enabled": false
                                }
                            },
                            {
                                "category": "AppServiceFileAuditLogs",
                                "enabled": true,
                                "retentionPolicy": {
                                    "days": 0,
                                    "enabled": false
                                }
                            },
                            {
                                "category": "AppServiceAuditLogs",
                                "enabled": true,
                                "retentionPolicy": {
                                    "days": 0,
                                    "enabled": false
                                }
                            }
                        ],
                        "metrics": [
                            {
                                "timeGrain": "PT1M",
                                "enabled": true,
                                "retentionPolicy": {
                                    "enabled": false,
                                    "days": 0
                                }
                            }
                        ]
                    }
                }
            ]
        },
        {
            "type": "Microsoft.Web/sites/slots/config",
            "apiVersion": "2019-08-01",
            "name": "[concat(variables('app_service_name'), '/stage-slot/web')]",
            "location": "[resourceGroup().location]",
            "dependsOn": [
                "[resourceId('Microsoft.Web/Sites/slots', variables('app_service_name'),'stage-slot')]"
            ],
            "tags": {
                "[variables('hiddenreleated_app_service_plan')]": "empty",
                "Application": "[parameters('app_name')]",
                "Environment": "[variables('tag_environment')]",
                "Region": "[resourceGroup().location]"
            },
            "properties": {
                "minTlsVersion": "1.2",
                "numberOfWorkers": 1,
                "defaultDocuments": [
                    "Default.htm",
                    "Default.html",
                    "Default.asp",
                    "index.htm",
                    "index.html",
                    "iisstart.htm",
                    "default.aspx",
                    "index.php",
                    "hostingstart.html"
                ],
                "netFrameworkVersion": "v4.0",
                "phpVersion": "7.1",
                "pythonVersion": "",
                "nodeVersion": "",
                "linuxFxVersion": "",
                "requestTracingEnabled": false,
                "remoteDebuggingEnabled": false,
                "remoteDebuggingVersion": null,
                "logsDirectorySizeLimit": 35,
                "detailedErrorLoggingEnabled": true,
                "publishingUsername": null,
                "publishingPassword": null,
                "metadata": null,
                "connectionStrings": null,
                "machineKey": null,
                "handlerMappings": null,
                "documentRoot": null,
                "scmType": "None",
                "use32BitWorkerProcess": true,
                "webSocketsEnabled": false,
                "alwaysOn": true,
                "javaVersion": null,
                "javaContainer": null,
                "javaContainerVersion": null,
                "appCommandLine": "",
                "managedPipelineMode": "Integrated",
                "virtualApplications": [
                    {
                        "virtualPath": "/",
                        "physicalPath": "site\\wwwroot",
                        "preloadEnabled": false,
                        "virtualDirectories": null
                    }
                ],
                "winAuthAdminState": 0,
                "winAuthTenantState": 0,
                "customAppPoolIdentityAdminState": false,
                "customAppPoolIdentityTenantState": false,
                "runtimeADUser": null,
                "runtimeADUserPassword": null,
                "loadBalancing": "LeastRequests",
                "routingRules": [],
                "clientAffinityEnabled": false,
                "experiments": {
                    "rampUpRules": []
                },
                "limits": null,
                "autoHealEnabled": false,
                "autoHealRules": null,
                "tracingOptions": null,
                "vnetName": "",
                "siteAuthEnabled": false,
                "siteAuthSettings": {
                    "enabled": null,
                    "unauthenticatedClientAction": null,
                    "tokenStoreEnabled": null,
                    "allowedExternalRedirectUrls": null,
                    "defaultProvider": null,
                    "clientId": null,
                    "clientSecret": null,
                    "issuer": null,
                    "allowedAudiences": null,
                    "additionalLoginParams": null,
                    "isAadAutoProvisioned": false,
                    "googleClientId": null,
                    "googleClientSecret": null,
                    "googleOAuthScopes": null,
                    "facebookAppId": null,
                    "facebookAppSecret": null,
                    "facebookOAuthScopes": null,
                    "twitterConsumerKey": null,
                    "twitterConsumerSecret": null,
                    "microsoftAccountClientId": null,
                    "microsoftAccountClientSecret": null,
                    "microsoftAccountOAuthScopes": null
                },
                "cors": {
                    "allowedOrigins": "[parameters('cors_allowed_origins')]"
                },
                "push": null,
                "apiDefinition": null,
                "autoSwapSlotName": null,
                "localMySqlEnabled": false,
                "managedServiceIdentityId": null,
                "ipSecurityRestrictions": "[parameters('ip_restrictions')]"
            }
        },
        {
            "type": "Microsoft.Web/sites/slots/config",
            "apiVersion": "2019-08-01",
            "name": "[concat(variables('app_service_name'), '/stage-slot/logs')]",
            "location": "[resourceGroup().location]",
            "dependsOn": [
                "[resourceId('Microsoft.Web/sites/slots/config', variables('app_service_name'),'stage-slot','web')]"
            ],
            "tags": {
                "displayName": "stage-slot-logs",
                "Application": "[parameters('app_name')]",
                "Environment": "[variables('tag_environment')]",
                "Region": "[resourceGroup().location]"
            },
            "properties": {
                "applicationLogs": {
                    "fileSystem": {
                        "level": "Off"
                    },
                    "azureTableStorage": {
                        "level": "Off"
                    },
                    "azureBlobStorage": {
                        "level": "Off"
                    }
                },
                "httpLogs": {
                    "fileSystem": null,
                    "azureBlobStorage": {
                        "enabled": false
                    }
                },
                "failedRequestsTracing": {
                    "enabled": false
                },
                "detailedErrorMessages": {
                    "enabled": false
                }
            }
        },
        {
            "type": "Microsoft.Web/sites/slots/config",
            "apiVersion": "2019-08-01",
            "name": "[concat(variables('app_service_name'), '/stage-slot/virtualNetwork')]",
            "dependsOn": [
                "[resourceId('Microsoft.Web/sites/slots/config', variables('app_service_name'),'stage-slot','web')]"
            ],
            "properties": {
                "subnetResourceId": "[parameters('subnet_resource_id')]",
                "swiftSupported": true
            },
            "condition": "[not(empty(parameters('subnet_resource_id')))]"
        }
    ]
}

Need support for fetching one dimension MDM metrics with filter

Hey AppLens team, we just newly onboarded to AppLens and have a new use case here, can you please check if you can support this use case?

In our MDM our dimension for error rate looks like this:
Capture1
And in Jarvis the metrics with my desired resource id will looks like this (dimension and filter are same):
Inkedjarvis_LI
When we tried to use this metrics as our first detector, it seems the MDM dimension need to have a dimension which is not used as filter(otherwise it would give error message 'Dimension filters cannot contain requested dimension with filter values'). So I used instanceId as dimension, it works, and result shows as following:
Inkedapplens_LI
However, for the customer, the instance id is not meaningful and even could be confusing.
Therefore, we would like to have the support on that MDM data dimension can allow to have only one dimension and filter on same dimension.

Kusto.ExecuteQuery to return a DataTable instead of DataTableResponseObject

Parsing data with DataTableResponseObject becomes tough so opening this so that this method returns a DataTable which can then be filtered easily.

Have a helper that converts DataTable to DataTableResponseObject as an Extension method to System.Data.Datable would be good so after forming the datatable correctly, the detector creator just does something like this to pass it to Response

res.Dataset.Add(new DiagnosticData()
{
    Table = dataTable.ToDataTableResponse ,
    RenderingProperties = new Rendering(RenderingType.Table)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.