in pass few days, all the metrics of Azure Database for MySQL flexible server is missing

Stephen Wong 10 Reputation points
2024-07-15T02:47:12.4066667+00:00

Hi all,
I have two running over two year Azure Database for MySQL flexible server,
they are missing the metrics data since 5 days and 7days ago.
All the metrics data is missing,

I can not see any default monitoring metrics data, just like the CPU and Memory, IO percent, DB Connections or Queries.
they are all running MySQL server, all the Database is accessible and running fine,
and I tried to use the following cmd to get the metrics data:

 az monitor metrics list --resource /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} --metric-names {metricName}

the cmd is successfully return the data , but it only return the data with the timeStamp but no other data.

normally, it return the following data pattern:
{

"maximum": 4.5,

"timeStamp": "2024-07-15T02:18:00Z"

}
but sadly, the "maximum" is missing in the above two mysql databases cmd result.

what should I do, how can I fix it?
--------------------------------------update--------------------------------------------

Screenshot 2024-07-15 at 3.34.32 PM

the az version is the latest version because it just upgrade for using the cli cmd.

one database metrics is stopped working at 10 July 2pm(+8) and another database metrics is stopped working at 7 July 7pm(+8),

And the Microsoft.Insights is Registered in the subscription.

it just a default monitoring , it will not exist the date range.
I tried to restart the database, but the problem is still existing.

also, I tried to upgrade the compute tier, but it still the same.

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
848 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. ShaktiSingh-MSFT 15,421 Reputation points
    2024-07-15T04:26:06.0366667+00:00

    Hi Stephen Wong •,

    Welcome to Microsoft Q&A forum.

    As I understand, you are unable to see monitor metrics data with Azure CLI commands for Azure Database for MySQL Flexible Server.

    Could you please run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.

    Other pointers to check are as below:

    • Microsoft.Insights resource provider isn't registered for your subscription

    Exploring metrics requires Microsoft.Insights resource provider registered in your subscription. In many cases, it's registered automatically (that is, after you configure an alert rule, customize diagnostic settings for any resource, or configure an autoscale rule). If the Microsoft.Insights resource provider isn't registered, you must manually register it by following steps described in Azure resource providers and types.

    Solution: Open Subscriptions, Resource providers tab, and verify that Microsoft.Insights is registered for your subscription.

    • You don't have sufficient access rights to your resource

    In Azure, Azure role-based access control (Azure RBAC) controls access to metrics. You must be a member of monitoring reader, monitoring contributor, or contributor to explore metrics for any resource.

    Solution: Ensure that you have sufficient permissions for the resource from which you're exploring metrics.

    • Your resource didn't emit metrics during the selected time range

    Some resources don’t constantly emit their metrics. For example, Azure doesn't collect metrics for stopped virtual machines. Other resources might emit their metrics only when some condition occurs. For example, a metric showing processing time of a transaction requires at least one transaction. If there were no transactions in the selected time range, the chart is naturally empty. Additionally, while most of the metrics in Azure are collected every minute, there are some that are collected less frequently. See the metric documentation to get more details about the metric that you're trying to explore.

    Solution: Change the time of the chart to a wider range. You may start from "Last 30 days" using a larger time granularity (or relying on the "Automatic time granularity" option).

    • You picked a time range greater than 30 days

    Most metrics in Azure are stored for 93 days. However, you can only query for no more than 30 days worth of data on any single chart. This limitation doesn't apply to log-based metrics.

    Solution: If you see a blank chart or your chart only displays part of metric data, verify that the difference between start- and end- dates in the time picker doesn't exceed the 30-day interval. Once you select a 30 day interval, you can pan the chart to view the full retention window.

    Please refer to this Microsoft official documentation for more details on how to troubleshoot metric charts:

    https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-troubleshoot

    Hope this helps.

    Let us know your findings.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.