Page 1 of 1

Nagios XI Offload MYSQL to a Remote Server

Posted: Mon Dec 04, 2017 10:01 am
by tony
I am having issues offloading Mariadb to a remote server
Running Nagios XI version 5-4-11 with Mariadb and no PostgreSQL

Followed the instructions in the document to offload MySQL
- https://assets.nagios.com/downloads/nag ... Server.pdf

The database is successfully offloaded to the remote server and Nagios XI GUI works.

However having issues stopping the mariadb service from loading / running - when I restart the server - the mariadb.service starts again

I have very little Redhat 7 experience - so how do I stop of this service from running.

Have tried the following

- systemctl stop mariadb.service
- systemctl disable mariadb.service
- systemctl --system daemon-reload
- Restart server

But the mariadb service keeps starting !

Also tried removing the mariadb.service from the After line in the /usr/lib/system/system/ndo2db.service

So why do the above systemctl lines not stop the mariadb service from starting or what else is starting it?

Re: Nagios XI Offload MYSQL to a Remote Server

Posted: Mon Dec 04, 2017 2:42 pm
by kyang
Make a backup or a snapshot of your current XI server before doing this. Just in case anything happens.

You could remove MariaDB, that way it won't restart, since you offloaded your DB to a remote server.

Run this command.

Code: Select all

yum remove mariadb
MariaDB should not start on your XI server if you reboot now.

Let us know if this helps you.

Re: Nagios XI Offload MYSQL to a Remote Server

Posted: Tue Dec 05, 2017 4:19 am
by tony
I would like to keep mariadb install on the Nagios XI server in case I ever need to fall back to it.

How else could I stop the mariadb service from starting?

Re: Nagios XI Offload MYSQL to a Remote Server

Posted: Tue Dec 05, 2017 12:38 pm
by lmiltchev
Try removing this line:

Code: Select all

Wants=mariadb.service
from the "/usr/lib/systemd/system/ndo2db.service" file.

Alternatively, you could comment it out, so that it is going to look like this:

Code: Select all

# Wants=mariadb.service
Note: Systemd will attempt to start any units listed under the "Wants" directive, even though the service may be disabled. Let us know if this helped.

Re: Nagios XI Offload MYSQL to a Remote Server

Posted: Wed Dec 06, 2017 4:06 am
by tony
Excellent - this worked - thanks a lot

Re: Nagios XI Offload MYSQL to a Remote Server

Posted: Wed Dec 06, 2017 10:07 am
by lmiltchev
I am glad I could help! :)