MySQL Shell enables you to set up and run reports to display live information from a MySQL server, such as status and performance information. MySQL Shell's reporting facility supports both built-in reports and user-defined reports. Reports can be created directly at the MySQL Shell interactive prompt, or defined in scripts that are automatically loaded when MySQL Shell starts.
A report is a plain JavaScript or Python function that performs operations to generate the desired output. You register the function as a MySQL Shell report through theshell.registerReport() method in JavaScript or theshell.register_report() method in Python.Section 11.1.1, “Creating MySQL Shell Reports” has instructions to create, register, and store your reports. You can store your report as part of a MySQL Shell plugin (seeSection 11.3, “MySQL Shell Plugins”).
Reports written in any of the supported languages (JavaScript, Python, or SQL) can be run regardless of the active MySQL Shell language. Reports can be run once using the MySQL Shell\show command, or run and then refreshed continuously in a MySQL Shell session using the\watch command. They can also be accessed as API functions using theshell.reports object.Section 11.1.5, “Running MySQL Shell Reports” explains how to run reports in each of these ways.
MySQL Shell includes a number of built-in reports, described inSection 11.1.6, “Built-in MySQL Shell Reports”.