Install JDBC Driver on Minion
To detect, poll, or collect any JDBC service, you must install the corresponding JDBC driver. The driver for PostgreSQL is included on the Minion without any additional configuration needed.
This is an optional step and is only needed if you are monitoring a JDBC service that is not PostgreSQL. |
We reference the repository directory
relative to the Minion home directory.
Depending on your operating system, the home directory is /usr/share/minion
for Debian and Ubuntu, or /opt/minion
for CentOS and RHEL.
-
Download the JDBC driver JAR from a repository (for example, a public Maven repository).
-
Install the JAR file in the repository directory, following the Maven repository pattern.
For MySQL 8.0.30, the path would be
repositories/default/mysql/mysql-connector-java/8.0.30/mysql-connector-java-8.0.30.jar
. -
Create a Karaf feature for the MySQL JDBC driver.
sudo vi deploy/jdbc-mysql.xml
<?xml version="1.0" encoding="UTF-8"?>
<features name="opennms-2024"(1)
xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0 http://karaf.apache.org/xmlns/features/v1.4.0">
<feature name="mysql-bundle" version="8.0.22" install="auto">(2)
<bundle>wrap:mvn:mysql/mysql-connector-java/8.0.22</bundle>(3)
</feature>
</features>
-
The version should match your Meridian Core version.
-
The bundle is named
mysql-bundle
, and the version number is set to8.0.30
. -
Bundle to download version
8.0.30
with Maven from official repositories.
As soon you write the file, Karaf picks up the feature and tries to install it.
You can troubleshoot the installation using ${MINION_HOME}/data/log/karaf.log
.
ssh -p 8201 admin@localhost
feature:list | grep mysql
mysql-bundle | 8.0.22 | x | Started | opennms-{page-component-version} |