Error loading subagent module "mysql.nsm"

Started by andy, July 26, 2024, 02:27:51 PM

Previous topic - Next topic

andy

Hello

I am trying to setup monitoring of MySQL database

I added property "SubAgent=mysql.nsm" to NetXMS agent configuration "/etc/nxagentd.conf" as described here:
https://netxms.org/documentation/adminguide/database-monitoring.html#id7

But when I run NetXMS agent service, I get this error in logs:
[subagents          ] Error loading subagent module "mysql.nsm" (/usr/lib64/netxms/mysql.nsm: cannot open shared object file: No such file or directory)

And this file is really missing in "/usr/lib64/netxms" folder (please see attached screenshot)

My OS is AlmaLinux 9.4 and here are commands I executed to install NetXMS agent:
1) dnf config-manager --add-repo https://packages.netxms.org/epel/netxms.repo
2) dnf install netxms-agent -y

How do I solve this issue?

Kind regards,
Andrew


Filipp Sudanov

The software is split into several packages, to avoid pulling dependencies for things that are not needed. MySQL subagent should be in netxms-agent-mysql package, and you also might need netxms-dbdrv-mysql.

andy

Thanks for your reply, Filipp

So, I can install additional packages with command like this?
dnf install netxms-agent-mysql

Now I have a small following question: is there a comprehensive list of additional packages that can be installed?
Before opening this topic, I tried to find information on how to add a package/module separately after installation of "main" NetXMS agent package, but didn't succeed.

Hope you can share some resources regarding this.

Thanks again and in advance  :)

Filipp Sudanov

We don't have a list in the documentation, just some chapters mention that specific subagents are needed, e.g. Network Service monitoring requires netsvc.
If you check list of available packages with dnf, you'll see them all:

root@localhost:~# dnf search netxms-*
Last metadata expiration check: 1:38:40 ago on Wed 31 Jul 2024 10:42:43 AM EEST.
=================================================================================================================================================== Name Matched: netxms-* ===================================================================================================================================================
netxms-agent.x86_64 : NetXMS agent and extensions (subagents)
netxms-agent-asterisk.x86_64 : Agent extension (subagent) for monitoring Asterisk
netxms-agent-asterisk-debuginfo.x86_64 : Debug information for package netxms-agent-asterisk
netxms-agent-debuginfo.x86_64 : Debug information for package netxms-agent
netxms-agent-java.x86_64 : Agent extension (subagent) for running java-based monitoring providers
netxms-agent-java-debuginfo.x86_64 : Debug information for package netxms-agent-java
netxms-agent-mariadb.x86_64 : Agent extension (subagent) for monitoring MySQL/MariaDB databases
netxms-agent-mariadb-debuginfo.x86_64 : Debug information for package netxms-agent-mariadb
netxms-agent-mqtt.x86_64 : Agent extension (subagents) for communicating wiht MQTT brokers
netxms-agent-mqtt-debuginfo.x86_64 : Debug information for package netxms-agent-mqtt
netxms-agent-oracle.x86_64 : Agent extension (subagent) for monitoring Oracle databases
netxms-agent-oracle-debuginfo.x86_64 : Debug information for package netxms-agent-oracle
netxms-agent-pgsql.x86_64 : Agent extension (subagent) for monitoring PostgreSQL databases
netxms-agent-pgsql-debuginfo.x86_64 : Debug information for package netxms-agent-pgsql
netxms-agent-vmgr.x86_64 : Agent extension (subagents) for monitoring virtualization platforms
netxms-agent-vmgr-debuginfo.x86_64 : Debug information for package netxms-agent-vmgr
netxms-base.x86_64 : Common NetXMS libraries and tools
netxms-base-debuginfo.x86_64 : Debug information for package netxms-base
netxms-client.x86_64 : Integration and diagnostics tools for the NetXMSX server.
netxms-client-debuginfo.x86_64 : Debug information for package netxms-client
netxms-dbdrv-mariadb.x86_64 : ...
netxms-dbdrv-mariadb-debuginfo.x86_64 : Debug information for package netxms-dbdrv-mariadb
netxms-dbdrv-odbc.x86_64 : Middleware for interfacing with any compatible database engine via ODBC
netxms-dbdrv-odbc-debuginfo.x86_64 : Debug information for package netxms-dbdrv-odbc
netxms-dbdrv-oracle.x86_64 : Middleware for interfacing with Oracle database engine
netxms-dbdrv-oracle-debuginfo.x86_64 : Debug information for package netxms-dbdrv-oracle
netxms-dbdrv-pgsql.x86_64 : Middleware for interfacing with PostgreSQL database engine
netxms-dbdrv-pgsql-debuginfo.x86_64 : Debug information for package netxms-dbdrv-pgsql
netxms-dbdrv-sqlite3.x86_64 : Middleware for interfacing with SQLite3 database engine
netxms-dbdrv-sqlite3-debuginfo.x86_64 : Debug information for package netxms-dbdrv-sqlite3
netxms-debuginfo.x86_64 : Debug information for package netxms
netxms-debugsource.x86_64 : Debug sources for package netxms
netxms-java-base.x86_64 : Common java libraries used by the NetXMS components
netxms-java-base-debuginfo.x86_64 : Debug information for package netxms-java-base
netxms-reporting.x86_64 : JasperReports-based reporting server integrated into NetXMS
netxms-server.x86_64 : Monitoring server core
netxms-server-debuginfo.x86_64 : Debug information for package netxms-server

netxms-agent-* are different subagents, netxms-dbdrv-* drivers for various databases (used both by server for it's database and by agent to perform queries to databases, netxms-base has common things needed both for server and agent, netxms-reporting is the reporting engine, that's basically it

andy

For some reason netxms-agent-mysql is not listed among available subagents and it cannot be installed via dnf  :(

[andrew@a02 ~]$ sudo dnf install netxms-agent-mysql
[sudo] password for andrew: 
Last metadata expiration check: 2:46:27 ago on Wed Jul 31 09:17:33 2024.
No match for argument: netxms-agent-mysql


Filipp Sudanov

Try netxms-agent-mariadb, it should be same as MySQL

andy

#7
Installation of netxms-agent-mariadb worked, I have mysql.nsm now

But there is another error stating that mysql.ddr is missing:
Jul 31 19:43:18 nxagentd[240328]: [db.drv             ] Unable to load database driver module "mysql.ddr": /usr/lib64/netxms/dbdrv/mysql.ddr: cannot open shared object file: No such file or directory
Jul 31 19:43:18 nxagentd[240328]:  MYSQL: failed to load database driver
Jul 31 19:43:18 nxagentd[240328]: [subagents          ] Initialization of subagent "MYSQL" (/usr/lib64/netxms/mysql.nsm) failed

This driver is not listed among netxms packages ("dnf search netxms")
Also I searched for a solution among related topics, but couldn't find matching situation, thus asking for help with this one too

Big thanks for your time

andy

And here is how subagents folder looks like now (just in case)

andy

Hello again, I still couldn't solve this driver issue myself, any help would be appreciated  :-[

Alex Kirhenshtein

Quote from: andy on August 02, 2024, 01:17:10 PMHello again, I still couldn't solve this driver issue myself, any help would be appreciated  :-[
add

[MySQL]
Driver=mariadb

to nxagentd.conf

andy

Big thanks Filipp and Alex!

Everything works now!  8)