MySQL Enterprise Monitor 8.0.32 手册  / 第六部分附录  /  附录 C MySQL Enterprise Monitor 常见问题解答

附录 C MySQL Enterprise Monitor 常见问题解答

笔记

MySQL Enterprise Monitor 作为 MySQL Enterprise 订阅的一部分提供,请访问 https://www.mysql.com/products/了解更多信息。

常见问题分类

安全

问题

  • C.1: 如果我升级到 3.1,早期版本中定义的用户会怎样?

问题和解答

C.1: 如果我升级到 3.1,早期版本中定义的用户会怎样?

早期版本中定义的所有用户都映射到 MySQL Enterprise Monitor 3.1 中访问控制列表中引入的默认角色。保留用户名,但他们的权限在默认角色中单独定义。所有预先存在的用户都会自动映射到默认角色。

例如,如果 User1 在 MySQL Enterprise Monitor 3.0.x 中定义为 dba,则 User1 在 MySQL Enterprise Monitor 3.1 中创建,但分配给 dbaRole。如果 User1 被定义为 dba,并且在 3.0.x 中被授予两个查询分析器权限,则它被分配给默认的 dba 角色,以及 3.1 中的两个查询分析器角色。

一般用法

问题

  • C.1: 如何找到IgnoredMySQL 实例?我该如何再次向他们展示?

  • C.2: 将 MySQL Enterprise Service Manager 3.2 与较旧的代理一起使用时,为什么我会在代理日志中看到如下所示的警告消息?

    WARN [HttpPollingJobFetcher-thread-0:com.mysql.etools.agent.ManagedOrder] 
    bean order property CoalescedCollectionRunner.collections is a collection 
    and contains a class not available on the agent. This element of the collection 
    will be ignored. Upgrading the agent to a version at least the same as the service 
    manager may solve this problem. 
    java.lang.RuntimeException: java.lang.ClassNotFoundException: 
    com.mysql.etools.inventory.model.mysql.XXXXXXX
  • C.3: 在 2.3 中,agent-mgmt-hostname包含字符串“heartbeat”作为 URLs 路径。这改变了吗?

  • C.4: 如何更改服务器的名称?

  • C.5: 查询分析器是否适用于所有版本的 MySQL 和 MySQL 客户端库?

  • C.6: 为什么文件 apache-tomcat/logs/tomcat.log显示错误消息说This is very likely to create a memory leak.?这有什么值得担心的吗?

  • C.7: 为什么使用 FEDERATED 表监视 MySQL 实例会导致额外的连接并降低性能?

问题和解答

C.1: 如何找到IgnoredMySQL 实例?我该如何再次向他们展示?

MySQL Instances页面中,打开Unmonitored Instances面板并启用Ignored Instance filter 参数并执行搜索。这列出了忽略的 MySQL 实例。

要更改被忽略的 MySQL 实例的状态, 请从特定 MySQL 实例的上下文菜单中选择显示实例,或选中被忽略的 MySQL 实例并单击显示实例按钮。

C.2: 将 MySQL Enterprise Service Manager 3.2 与较旧的代理一起使用时,为什么我会在代理日志中看到如下所示的警告消息?

WARN [HttpPollingJobFetcher-thread-0:com.mysql.etools.agent.ManagedOrder] 
bean order property CoalescedCollectionRunner.collections is a collection 
and contains a class not available on the agent. This element of the collection 
will be ignored. Upgrading the agent to a version at least the same as the service 
manager may solve this problem. 
java.lang.RuntimeException: java.lang.ClassNotFoundException: 
com.mysql.etools.inventory.model.mysql.XXXXXXX

MySQL Enterprise Monitor 3.2 引入了对多源复制的支持。3.2 代理中引入的一些功能在早期代理中不可用。XXXXXXX 代表早期代理中不可用的类之一。

这些警告并不意味着您的安装有任何问题或集合中缺少任何数据。但是,强烈建议您将代理升级到与 MySQL Enterprise Service Manager 相同的版本。

C.3: 在 2.3 中,agent-mgmt-hostname包含字符串“heartbeat”作为 URLs 路径。这改变了吗?

是的,这不再是必需的,并且从 MySQL Enterprise Monitor 3.0.0 开始被忽略。

C.4: 如何更改服务器的名称?

打开MySQL 实例仪表板,然后从实例菜单中选择编辑实例。或者,切换一个实例的复选框并单击Edit Instances

以这种方式重命名服务器将覆盖所有其他服务器命名,包括对代理配置的更改。

C.5: 查询分析器是否适用于所有版本的 MySQL 和 MySQL 客户端库?

支持 MySQL 5.1 或更高版本。

分析 Performance Schema 结果需要 MySQL Server 5.6.14 及以上版本。

C.6: 为什么文件 apache-tomcat/logs/tomcat.log显示错误消息说This is very likely to create a memory leak.?这有什么值得担心的吗?

此消息有时由 Web 堆栈的底层组件在 Web 应用程序重新加载或关闭时生成,无需担心。在 Tomcat 中关闭这些虚假消息是不切实际的。

C.7: 为什么使用 FEDERATED 表监视 MySQL 实例会导致额外的连接并降低性能?

当代理启动时,它会执行一个发现过程,该过程会执行大量 INFORMATION_SCHEMA 查询,这些查询会收集规则的表信息。这些 INFORMATION_SCHEMA 查询在具有许多表的实例上可能代价高昂,特别是对于另一个实例的大量 FEDERATED 表,因为每个表在目标机器上都有一个为其打开的新会话。

MySQL监视器

问题

  • C.1: MySQL Enterprise Monitor 的特性和相关优势是什么?

  • C.2: 实施 MySQL Enterprise Monitor 的直接好处是什么?

  • C.3: MySQL Enterprise Monitor 的长期好处是什么?

  • C.4: MySQL Enterprise Monitor 是如何安装和部署的?

  • C.5: Enterprise Monitor Web 应用程序是如何构建的?

  • C.6: 是什么让 MySQL Enterprise 与众不同?

  • C.7: MySQL Enterprise Monitor 支持哪些版本的 MySQL?

  • C.8: MySQL Enterprise Monitor 支持哪些操作系统平台?

  • C.9: 如何通知订阅者有关新的或更新的 MySQL Enterprise Monitor、MySQL Enterprise Advisors 和 Advisor Rules 的可用性?

问题和解答

C.1: MySQL Enterprise Monitor 的特性和相关优势是什么?

MySQL Enterprise Monitor 就像您身边有一个“虚拟 DBA 助手”,可以推荐最佳实践来消除安全漏洞、改进复制和优化性能。有关完整的功能和优势,请访问 http://www.mysql.com/products/enterprise/monitor-features.html。

C.2: 实施 MySQL Enterprise Monitor 的直接好处是什么?

通常 MySQL 安装是使用默认设置实现的,这些设置可能不是最适合特定应用程序或使用模式的。MySQL 顾问会立即在这些环境中工作,以识别潜在问题,并主动通知 DBA 并就关键 MySQL 设置向 DBA 提供建议,这些设置可以进行调整以提高可用性、加强安全性并增加现有 MySQL 服务器的吞吐量

C.3: MySQL Enterprise Monitor 的长期好处是什么?

随着时间的推移,即使是中等规模的 MySQL 服务器集群的管理任务也变得越来越复杂,尤其是当每个 MySQL 服务器上的用户、连接、应用程序查询和对象的负载增加时。Enterprise Monitor 持续监控所有 MySQL 服务器的动态安全、性能、复制和模式相关指标,因此随着 MySQL 数量的持续增长,DBA 可以及时了解潜在问题和可以实施的主动措施,以确保每个服务器继续以最高级别的安全性、性能和可靠性运行。

C.4: MySQL Enterprise Monitor 是如何安装和部署的?

Enterprise Monitor 由在公司防火墙范围内安装和部署的分布式 Web 应用程序提供支持。

C.5: Enterprise Monitor Web 应用程序是如何构建的?

Enterprise Monitor Web 应用程序包含三个组件:

  • Monitor Agent:安装在每个受监视主机上的轻量级 Java 程序。其目的是收集 MySQL SQL 和操作系统指标,使 DBA 能够监控 MySQL 服务器和主机的整体健康状况、可用性和性能。Monitor Agent 是应用程序中唯一接触或连接到 MySQL 服务器的组件。它通过 HTTP 上的 XML 向中央服务管理器报告它收集的数据。

  • 服务管理器:应用程序的主要服务器。服务管理器管理和存储来自每个监控代理的数据集合。它使用 MySQL 提供的最佳实践顾问规则分析这些集合,以确定每个受监控 MySQL 服务器的健康状况、安全性、可用性和性能。服务管理器还为企业用户界面提供内容,作为分布式 Web 应用程序的客户端用户界面。

  • 存储库:用于存储数据集合和应用程序级配置数据的 MySQL 数据库。

C.6: 是什么让 MySQL Enterprise 与众不同?

在市场上监控 MySQL、SQL 代码和操作系统特定指标的产品中,MySQL Enterprise Monitor 是唯一由 MySQL 工程师构建和支持的解决方案。与报告原始 MySQL 和操作系统级别指标的其他解决方案不同,MySQL Enterprise Monitor 旨在通过主动监控 MySQL 实例并提供通知和“MySQL DBA 专业知识”来优化 MySQL 的使用,以帮助 DBA 提前采取纠正措施出现问题。

C.7: MySQL Enterprise Monitor 支持哪些版本的 MySQL?

MySQL Enterprise Monitor 支持 MySQL 5.1 及以上版本。

C.8: MySQL Enterprise Monitor 支持哪些操作系统平台?

大多数当前版本的 Linux、Windows 和 Windows Server Edition 都完全支持 Enterprise Monitor Service Manager。Monitor Agent 支持 MySQL Enterprise 服务器支持的任何平台。有关 MySQL Enterprise 支持的操作系统和 CPU 的完整列表,请访问 MySQL 支持的平台并选择MySQL Enteprise Monitor

C.9: 如何通知订阅者有关新的或更新的 MySQL Enterprise Monitor、MySQL Enterprise Advisors 和 Advisor Rules 的可用性?

客户会收到有关新的和更新的 MySQL Enterprise Monitor 版本的电子邮件通知。此外, MySQL Enterprise Monitor的新增 功能部分(如果启用)包含新产品公告。

MySQL 查询分析器

问题

  • C.1: 什么是 MySQL 查询分析器?

  • C.2: 如何安装和启用 MySQL 查询分析器?

  • C.3: 如果启用 MySQL 查询分析器,我预计会有什么开销?

  • C.4: MySQL 查询分析器的主要特性和优势是什么?

  • C.5: MySQL 查询分析器的典型用例是什么?

  • C.6: 是什么让 MySQL 查询分析器与众不同?

  • C.7: 如何获得 MySQL 查询分析器?

  • C.8: 查询分析器是否与 MySQL 集群一起工作?

  • C.9: 查询分析器是否允许我在查询期间监控磁盘读写?

  • C.10: 查询分析器是否处理准备好的语句?

  • C.11: 查询分析器是否可以在没有任何特殊设置的情况下工作?

问题和解答

C.1: 什么是 MySQL 查询分析器?

The MySQL Query Analyzer allows DBAs, developers and system administrators to improve application performance by collecting, monitoring, and analyzing queries as they run on their MySQL servers. http://www.mysql.com/products/enterprise/query.html

C.2: How is the MySQL Query Analyzer installed and enabled?

See Section 31.1, “Providing Query Analyzer Data”.

C.3: What overhead can I expect if the MySQL Query Analyzer is enabled?

Using MySQL 5.6, or higher, with Performance Schema enabled, there is no appreciable overhead.

C.4: What are the main features and benefits of the MySQL Query Analyzer?

For the complete features and benefits, see MySQL Enterprise Monitor Features and Benefits.

C.5: What are the typical use cases of the MySQL Query Analyzer?

The typical use cases for developers, DBAs and system administrators are:

  • Developers – Monitor and tune application queries during development before they are promoted to production.

  • DBAs and System Administrators – Identify problem SQL code as it runs in production and advise development teams on how to tune. This use case benefits the most from regular sampling of queries as they are running, most often during non-peak hours.

C.6: What makes the MySQL Query Analyzer unique?

Other products (free, open source and commercial) that provide MySQL query monitoring are dependent on the MySQL Slow Query Log being enabled and available for sampling. While this provides some time savings over the DBA collecting and parsing the Log, the Slow Query Log comes with overhead and does not capture sub millisecond executions. The log data also grows very large very quickly.

The MySQL Query Analyzer collects queries and execution statistics with no dependence on the SQL Query Log, it captures all SQL statements sent to the MySQL server and provides an aggregated view into the most expensive queries in number of executions and total execution time. It is also fully supported as part of the MySQL Enterprise subscription.

C.7: How can I get the MySQL Query Analyzer?

The MySQL Query Analyzer is built into the MySQL Enterprise Monitor.

To experience the MySQL Enterprise Monitor for 30 days, visit the http://www.mysql.com/trials/

C.8: Does Query Analyzer work with MySQL Cluster?

Yes, providing that exact node is monitored with an agent and query analyzer has been enabled for that node. Note that you must be accessing your cluster data through a standard MySQL node for this to work.

C.9: Does Query Analyzer enable me to monitor the disk reads and writes during a query?

No, that information is not available to the query analyzer, but many Advisors and graphs do handle this information. An Agent monitors the host, which includes monitoring of the CPU, Disk, and Memory.

C.10: Does Query Analyzer handler prepared statements?

At this time, the query analyzer does not track server-side prepared statements. However the default configurations for most client-side libraries for MySQL don't use them, they emulate them client-side, and those will be tracked by the query analyzer.

C.11: Will the Query Analyzer work without any special setup?

With MySQL Server 5.6.14 and greater, Query Analyzer data is automatically (by default) collected and displayed using the Performance Schema Statement Digests MySQL Server feature. If you are monitoring an earlier MySQL Server version, then you can continue to use alternative methods of providing query data to the Query Analyzer.

有关检索查询数据的不同方法的信息,请参阅第 31.1 节,“提供查询分析器数据”