NetXMS Support Forum

English Support => General Support => Topic started by: gpd on July 12, 2022, 10:43:43 PM

Title: How to Monitoring Database Mysql
Post by: gpd on July 12, 2022, 10:43:43 PM
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
Title: Re: How to Monitoring Database Mysql
Post by: Victor Kirhenshtein on July 13, 2022, 06:46:20 PM
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
Title: Re: How to Monitoring Database Mysql
Post by: gpd on July 14, 2022, 03:57:54 PM
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
Title: Re: How to Monitoring Database Mysql
Post by: Victor Kirhenshtein on July 15, 2022, 10:02:47 AM
Looks like you are missing MySQL client library. Make sure it is installed. Also, how did you install agent?

Best regards,
Victor
Title: Re: How to Monitoring Database Mysql
Post by: gpd on July 15, 2022, 04:11:51 PM
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
Title: Re: How to Monitoring Database Mysql
Post by: Victor Kirhenshtein on July 18, 2022, 09:53:24 AM
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