Page 1 of 1

Configure the final installation without using the browser?

Posted: Wed Nov 06, 2019 1:00 pm
by MDK
I am attempting to automate an offline installation of Nagios log server on a non-internet connected system. I have got the log server to install and was wondering if you could assist me in how to configure the final installation without using the browser? Is there a file that I should invoke after modifications?

Where would the browser final installation files be located?

Re: Configure the final installation without using the brows

Posted: Wed Nov 06, 2019 1:21 pm
by scottwilkerson
MDK wrote:I have got the log server to install and was wondering if you could assist me in how to configure the final installation without using the browser? Is there a file that I should invoke after modifications?
This is not possible

Re: Configure the final installation without using the brows

Posted: Wed Nov 06, 2019 1:23 pm
by MDK
Where would the browser final installation files be located?

Re: Configure the final installation without using the brows

Posted: Wed Nov 06, 2019 1:53 pm
by scottwilkerson
MDK wrote:Where would the browser final installation files be located?
I don't understand the question

Re: Configure the final installation without using the brows

Posted: Wed Nov 06, 2019 2:00 pm
by MDK
The final installation steps configure the license and the admin account. Where is this information stored? On a file? In a database? How can these values be changed? Is there an API? Do we use php files with arguments?

Re: Configure the final installation without using the brows

Posted: Wed Nov 06, 2019 2:08 pm
by cdienger
first retrieve the csrf_value:

Code: Select all

curl -XGET 'http://192.168.55.3/nagioslogserver/install' -c cookies.txt| grep csrf | grep -E "[a0-z9]{32}" -o
Then POST it along with password, email, language, timzone, etc:

Code: Select all

curl -XPOST 'http://nls_ip/nagioslogserver/install' -b cookies.txt -d 'csrf_ls=csrf_value_returned_from_prevous_command&key_type=key&key=license_key&username=nagiosadmin&admin_name=Nagios+Administrator&password=password123&conf_password=password123&email=root%40localhost&language=default&timezone=America%2FChicago&type=install'
or for a trial:

Code: Select all

curl -XPOST 'http://nls_ip/nagioslogserver/install' -b cookies.txt -d 'csrf_ls=csrf_value_returned_from_prevous_command&key_type=trial&username=nagiosadmin&admin_name=Nagios+Administrator&password=password123&conf_password=password123&email=root%40localhost&language=default&timezone=America%2FChicago&type=install'
Keep in mind that if this is to work around a problem you may be having with finishing via the web UI, that this just works around this last step and you may run into problems going forward - login, configuration changes, activation, etc....