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!
Apply Configuration Script?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Apply Configuration Script?
To blindly write the configs to the current instance you could run
And then most importantly you need to restart logstash
Code: Select all
php /var/www/html/nagioslogserver/www/index.php configure write_configs_for_nodeCode: Select all
systemctl restart logstashRe: Apply Configuration Script?
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 to look for ports 2056 and 2057 for Ncat to connect to but they are not active.
Code: Select all
netstat -tulpn | grep LISTEN -
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Apply Configuration Script?
Have you already done the install steps through the GUI?
Re: Apply Configuration Script?
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.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Apply Configuration Script?
Great!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.
Locking