Page 1 of 1
Check if database is MariaDB or mysql
Posted: Mon May 11, 2020 1:56 pm
by ets_user
Hi,
We have an existing NagiosXI installed in our server long back.
And we would first like to check if its using mariaDB or Mysql as the database.
Also what is the difference between this two and which one will be installed by default when we download and install nagios (online and offline).
Thanks.
Re: Check if database is MariaDB or mysql
Posted: Mon May 11, 2020 4:30 pm
by jbrunkow
You could check to see whether there is a mysqld.log or mariadb.log in /var/log/, or you could check which database has a service running by issuing the top command in a terminal. There should be evidence elsewhere of what kind of database is present, but those are the first two that come to mind right away...
I believe that MySQL is installed by default. The two databases have a variety of differences in terms of structure, features, available support plans, and the queries that can be run against them.
Re: Check if database is MariaDB or mysql
Posted: Tue May 12, 2020 10:54 am
by ets_user
We are using offline istallation guide so I hope it should install mariaDB and I can see /var/log/mariadb/mariadb.log.
And in NagiosXI System status the Database Backend is showing as Error in Red colour.
bUt Backend we are able to see mariadb service is runing.
[root@server1 var]# systemctl status mariadb
â mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-05-12 09:54:28 +04; 5h 48min ago
Process: 153403 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 153332 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 153402 (mysqld_safe)
Tasks: 65
CGroup: /system.slice/mariadb.service
ââ153402 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
ââ153568 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/...
May 12 09:54:26 penguin2 systemd[1]: Starting MariaDB database server...
May 12 09:54:26 penguin2 mariadb-prepare-db-dir[153332]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
May 12 09:54:26 penguin2 mysqld_safe[153402]: 200512 09:54:26 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
May 12 09:54:26 penguin2 mysqld_safe[153402]: 200512 09:54:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
May 12 09:54:28 penguin2 systemd[1]: Started MariaDB database server.
Re: Check if database is MariaDB or mysql
Posted: Tue May 12, 2020 2:55 pm
by jbrunkow
Yep! It sounds like that server is toting a
MariaDB database then.
You might want to try running the following script to resolve those errors.
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.sh
https://assets.nagios.com/downloads/nag ... tabase.pdf