How to Monitoring Database Mysql

Started by gpd, July 12, 2022, 10:43:43 PM

Previous topic - Next topic

gpd

Hey,

I configured an agent as per the documentation for collecting data from a mysql database.
however I am not able to collect/visualize several parameters, examples according to page 279, admin tab:

MySQL.InnoDB.ReadCacheHitRatio(idIn)noDB read cache hit ratio (%)
MySQL.InnoDB.ReadRequest(id) InnoDB read requests
MySQL.InnoDB.WriteRequest(id) InnoDB write requests
MySQL.InnoDB.ReadCacheHitRatio(idIn)noDB read cache hit ratio (%)
MySQL.InnoDB.ReadRequest(id) InnoDB read requests
MySQL.InnoDB.WriteRequest(id) InnoDB write requests

Victor Kirhenshtein

Are other parameters related to MySQL working? If so, please set debug level on agent with mysql subagent to 7, try to request one of problematic parameters (or wait few minutes so server did it), and share agent log.

Best regards,
Victor

gpd

Hey,

as per debuglevel, mysql driver is not loading.


2022.07.14 09:45:40.806 *I* [                   ] Subagent "PORTCHECK" (portcheck.nsm) loaded successfully (version 3.4.310)
2022.07.14 09:45:40.807 *D* [dload              ] DLOpen: file="/opt/netxms/lib/netxms/mysql.nsm", module=0x1038af0
2022.07.14 09:45:40.807 *D* [dload              ] DLGetSymbolAddr: module=0x1038af0, symbol=NxSubAgentRegister, address=0x7fe625ea3ed0
2022.07.14 09:45:40.807 *D* [dload              ] DLOpen: file="/opt/netxms/lib/netxms/dbdrv/mysql.ddr", module=(
2022.07.14 09:45:40.807 *E* [db.drv             ] Unable to load database driver module "mysql.ddr": libmysqlclient.so.16: cannot open shared object file: No such file or directory
2022.07.14 09:45:40.807 *E* [                   ] MYSQL: failed to load database driver
2022.07.14 09:45:40.807 *E* [                   ] Initialization of subagent "MYSQL" (/opt/netxms/lib/netxms/mysql.nsm) failed
2022.07.14 09:45:40.807 *D* [dload              ] DLClose: module=0x1038af0
2022.07.14 09:45:40.807 *I* [                   ] System hardware ID is unknown
2022.07.14 09:45:41.809 *D* [                   ] External parameters providers poller thread will not start

Victor Kirhenshtein

Looks like you are missing MySQL client library. Make sure it is installed. Also, how did you install agent?

Best regards,
Victor

gpd

Hi Victor

The version of the library found installed is another one, libmysqlclient.so.18.

the agent was installed using the command tar -xvf nxagent-3.4.310-linux-x86_64.tar -C / < /opt/netxms >.

Cássio

Victor Kirhenshtein

So agent is built for older MySQL client library. What Linux distribution you are using? If it is Debian or Ubuntu, I highly recommend using deb packages for installation. For RedHat we also provide separate binary package. If none of the above, then you either have to install required libmysqlclient or build agent from sources.

Best regards,
Victor