Page 1 of 1
Import Logstash Config from ServerA to ServerB
Posted: Fri Mar 06, 2020 11:52 am
by jaimie.livingston
I want to copy/import a logstash config snapshot created on one server cluster to another, to keep logstash inputs, filters, and outputs in synch.
I'd like to automate this to run from cron.
How can I do this?
Thanks,
Jaimie Livingston
Re: Import Logstash Config from ServerA to ServerB
Posted: Fri Mar 06, 2020 5:53 pm
by cdienger
What version of NLS is this? It doesn't look like there is a predefined script we can run to get the data and import it but I'll look into it and see if we can come up with something.
Re: Import Logstash Config from ServerA to ServerB
Posted: Fri Mar 06, 2020 10:32 pm
by jaimie.livingston
Our LogServers are all current at v2.1.4.
Thanks,
Jaimie Livingston
Re: Import Logstash Config from ServerA to ServerB
Posted: Mon Mar 09, 2020 3:17 pm
by cdienger
I'll have to file a feature request since the functions that control the backup and restoration of the logstash config are encrypted. At the moment you'll need to rely on using the UI to get current configurations and importing them under Configure > Config Snapshots. Snapshots displayed on this page are stored under the local machine's /usr/local/nagioslogserver/snapshots/.
Re: Import Logstash Config from ServerA to ServerB
Posted: Wed Mar 11, 2020 8:24 am
by jaimie.livingston
cdienger wrote:I'll have to file a feature request since the functions that control the backup and restoration of the logstash config are encrypted. At the moment you'll need to rely on using the UI to get current configurations and importing them under Configure > Config Snapshots. Snapshots displayed on this page are stored under the local machine's /usr/local/nagioslogserver/snapshots/.
Understood about the feature request. If you are going to submit a feature request for copying logstash configs, please also consider a feature request for a command line script to export/upload Kibana Global Dashboards from the command line.
About the logstash config snapshots... Snapshots that I have copied from one logserver cluster to another do not show up in the snapshots list.
I have tried the following:
- copying the tar.gz as is from ClusterA-Node1 using "scp -p snapshot.tar.gz ClusterB-Node1:/usr/local/nagioslogserver/snapshots/"
- copying the tar.gz from ClusterA-Node1 to ClusterB-Node1, ClusterB-Node2, and ClusterB-Node3
- I've even gone so far as to extract the database.json file created on ClusterA and change the address, hostname, and id fields to match the nodes for ClusterB, then redo the tar.gz and drop it in /usr/local/nagioslogserver/snapshots/on ClusterB-Node1.
Is there some step that I'm missing that is required to get the snapshot from ClusterA-Node1 to show up in the snapshot list on ClusterB-Node1?
Jaimie
Re: Import Logstash Config from ServerA to ServerB
Posted: Wed Mar 11, 2020 5:04 pm
by cdienger
It looks like there may be more steps involved. I'll take a look and let you know if there is anything we can do beyond just copying and pasting over the config that are found under the Configure section of the UI.