Page 1 of 1

Apply Configuration Script?

Posted: Mon Jul 01, 2019 10:04 am
by lmncruser
Hi,
Is there a way to do 'Apply Configuration' through a script? After a fresh install the ports 2056 and 2057 are not open and the only way I can get them to listen is to log in, go to Configuration, and click Apply Configuration. I am trying to set up an automated build and I do not want the users messing around with the configurations. I tried running the 'php /var/.../index.php configure apply_to_instances' command from the restore_backup.sh script but this does not seem to work, nor does it return errors. Please advise. Thanks!

Re: Apply Configuration Script?

Posted: Mon Jul 01, 2019 3:54 pm
by scottwilkerson
To blindly write the configs to the current instance you could run

Code: Select all

php /var/www/html/nagioslogserver/www/index.php configure write_configs_for_node
And then most importantly you need to restart logstash

Code: Select all

systemctl restart logstash

Re: Apply Configuration Script?

Posted: Tue Jul 02, 2019 8:27 am
by lmncruser
This doesnt seem to be working. The "configure write_configs_for_node" command does not seem to throw errors (i edited php.ini to show them then restarted the machine) and logstash restarts successfully. After I restart logstash I run

Code: Select all

netstat -tulpn | grep LISTEN 
to look for ports 2056 and 2057 for Ncat to connect to but they are not active.

Re: Apply Configuration Script?

Posted: Tue Jul 02, 2019 10:03 am
by scottwilkerson
Have you already done the install steps through the GUI?

Re: Apply Configuration Script?

Posted: Tue Jul 02, 2019 3:30 pm
by lmncruser
I take it back, the "configure write_configs_for_node" command worked after all. It wasnt working on the box I was using at the time but I did a full rebuild, ran that command and the ports opened up. Thanks! You can close this thread.

Re: Apply Configuration Script?

Posted: Tue Jul 02, 2019 3:36 pm
by scottwilkerson
lmncruser wrote:I take it back, the "configure write_configs_for_node" command worked after all. It wasnt working on the box I was using at the time but I did a full rebuild, ran that command and the ports opened up. Thanks! You can close this thread.
Great!

Locking