====== Database Management from the Console ======
{{indexmenu_n>27}}
We are working on the translation of the Pandora FMS documentation. Sorry for any inconvenience.
**The core of the Pandora FMS system is its database**. It stores all the data collected by the monitored systems, the configuration of the agents, the alerts, the events, the audit data, the different users and their data. That is, all the data in the system.
Efficiency and reliability is vital for the proper functioning of Pandora FMS, so maintaining the database is of the utmost importance.
To perform database maintenance on a regular basis, administrators can use standard MySQL commands from the command line or they can manage the Database from the Console without much knowledge of MySQL.
There are several extensions that you can use from the Console to view information about the database.
===== Diagnostic tool =====
In this section we can view general information on the Pandora FMS installation. It is worth noting the large amount of information obtained from the database, where you can see the recommended parameters, as well as warnings about existing values that need to be changed.
{{ :wiki:pfms-admin_tools-diagnostic_info.png }}
For the 767 version it is composed of 14 sections, some of them are the following:
{{ :wiki:pfms-admin_tools-diagnostic_info-php_setup.png |PHP setup}}
{{ :wiki:pfms-admin_tools-diagnostic_info-database_size_stats.png |Database size stats}}
{{ :wiki:pfms-admin_tools-diagnostic_info-database_health_status.png |Database health status}}
{{ :wiki:pfms-admin_tools-diagnostic_info-database_status_info.png |Database status info}}
{{ :wiki:pfms-admin_tools-diagnostic_info-mysql_performance_metrics.png |MySQL Performance metrics}}
{{ :wiki:pfms-admin_tools-diagnostic_info-tables_fragmentation.png |Tables fragmentation in the Pandora FMS database}}
{{ :wiki:pfms-admin_tools-diagnostic_info-tagente_datos_table.png |Information from the tagente_datos table}}
{{ :wiki:pfms-admin_tools-diagnostic_info-execution_time.png |Graphs modules that represent the self-monitoring system}}
===== DB Interface =====
This is an extension that allows you to execute commands on the database and see the result. It is an advanced tool that should only be used by people who know SQL and the Pandora FMS database schema in sufficient detail.
This misused tool can **destroy data** or **permanently render the application inoperative**.
The extension is accessed from the **Admin tools** menu → **DB interface**:
{{ :wiki:pfms-admin_tools-db_interface.png }}
Type the command in the blank field and click **Execute SQL**.
===== DB Schema Check =====
This check can only be performed on MySQL Databases.
This is an extension that allows checking the structural differences between the established Pandora FMS database, and a standard scheme to compare possible errors.
It is recommended to use this extension to check if a database migration was successful
The operation is as follows:
* A temporary database is created with the structure that the installation database must have (different depending on the installed version).
* The database created is compared with the database referenced in the installation.
* The temporary database is deleted.
{{ :wiki:pfms-admin_tools-db_schema_check.png }}
Enter your database access data and click the **Run test** button. For example:
{{ :wiki:pfms-admin_tools-db_schema_check-success.png?790x500 }}
[[:en:documentation:start| Back to Pandora FMS documentation index]]