I am migrating Nagios from using localhost to external MySQL db and following this doc https://assets.nagios.com/downloads/nag ... Server.pdf
I have question about this step:
"e) Modify the backup script
Edit the file “/root/scripts/automysqlbackup” script on your Nagios XI server and change line #34 from this:
DBHOST=localhost
to this (where you type in the actual IP address of the offloaded mysql server):
DBHOST=<IP_OF_MYSQL_OR MARIADB_SERVER>"
Should I also add the port number at the end like this since I do not use a standard port: DBHOST=<IP>:3382
In the common section the only step where it should be done is not this one
"Issue – How do we use a port other than the default 3306?
In all of the steps you follow it should be clear when you need to change the port from the default. The only section where it is not clear
is in the config.inc.php file, you need to define it as:
“dbserver” => '<IP_OF_MYSQL_OR_MARIADB_SERVER>:<PORT>',
Example: “dbserver” => '192.168.5.88:55555',"
Question on backup script moditication
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Question on backup script moditication
For now you will have to edit the script and add the -P parameter to the script manually.
I have create FR 10085 for this. You can inquire here about its status.
If you modify the script make sure you keep a copy of the original and fully the backup process.
I have create FR 10085 for this. You can inquire here about its status.
If you modify the script make sure you keep a copy of the original and fully the backup process.
Previous Nagios employee
Re: Question on backup script moditication
Where would I add this parameter? On the DBHOST statement like this below?
DBHOST=<IP> -P 3382
DBHOST=<IP> -P 3382
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Question on backup script moditication
That should work if you wrap it in single or double quotes, or in the calls to the mysql client itself. On my system those are line 409 and 471.
Previous Nagios employee
Re: Question on backup script moditication
Thank you, please close this incident.