Page 1 of 1

Moving Log Server Data

Posted: Mon Feb 22, 2021 5:21 pm
by isaacl86
Hi Everyone,
I recently setup a new Nagios Log Server, the old one is still currently running. This is a single instance install. I want to move all of the logs from the old server to the new one, I was going to do this with snapshots but it looks like the repository only has the last 30 days. I'm new to linux and this software but I was able to figure out how to mount to a windows share using CIFS and use it as a repo. Is there a way to get a full backup of all that data?

Re: Moving Log Server Data

Posted: Tue Feb 23, 2021 10:22 am
by cdienger
Welcome to the forum, @isaacl86!

Repos will typically hold older data that is deleted from the NLS node. What logs are you trying to make accessible to the new machine exactly? Can you provide screenshots to help clarify?

Re: Moving Log Server Data

Posted: Tue Feb 23, 2021 11:05 am
by isaacl86
thanks for the response @cdienger, (not sure if that tagged you)
I shall upload a couple of screen shots from the older server - what I would like to do is pull all log data that has already been gathered to the new log server. We need to have at least a year of logs. I was originally trying to copy the disk and move it to VMWARE from Azure but I wasn't able to boot the system so we decided to just setup a new one and backup/restore or figure a way to copy the logs. FYI I just setup the Repo, this system was running without it before.

Re: Moving Log Server Data

Posted: Wed Feb 24, 2021 5:11 pm
by cdienger
Snapshots are only going to get copies of the currently open indexes so that would explain why the repos only go so far back.

What I would recommend is reinstalling NLS on a new machine and when you get to the part in the web UI where it asks you to install or connect, select the connect option to connect it to the existing machine - https://library.nagios.com/library/prod ... o-cluster/

This will sync the configuration as well as open indices. To sync the closed indices you'll need to reopen them, allow them to sync, and then close them again. This can be done with a script - https://gist.github.com/jinnko/78072a77 ... 963492e9f4.

Re: Moving Log Server Data

Posted: Wed Mar 03, 2021 2:47 pm
by isaacl86
Thanks! I will give this a shot.

Re: Moving Log Server Data

Posted: Thu Mar 04, 2021 4:43 pm
by cdienger
Sounds good. Keep us posted!