Page 1 of 1

How to run nagiosxi/install.php from backend

Posted: Thu Apr 19, 2018 4:59 am
by ddaluka
Hi,

We are doing complete installation and configuration of nagiosxi using RPMs. After first time install, when we open the gui for the first time, it redirects the page to https://<ip>/nagiosxi/install.php and asks for some basic information.

I want to do this activity from backend. I have tried using below command but in the downloaded html page, it should show Installation Complete as part of Response Body but that's not happening.

Code: Select all

/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/install.php --no-check-certificate --post-data 'install=1&url="https://localhost/nagiosxi"&admin_name="Nagios Administrator"&admin_email="test@localhost"&admin_name="nagiosadmin"&admin_password="nagiosadmin"&timezone="UTC"&updateButton'
I also used the request body from browser developer options and it came up like that:

Code: Select all

install=1&nsp=ec3ae1105c35c3cc413127d277818d45103c734058ae281ea0f47859aa2a1576&url=https%3A%2F%2Flocalhost%2Fnagiosxi%2F&admin_name=Nagios+Administrator&admin_email=root@localhost&admin_password=nagiosadmin&timezone=UTC&updateButton=
I used the same in post-data but its not working. Can anyone help me out please?

Re: How to run nagiosxi/install.php from backend

Posted: Thu Apr 19, 2018 9:05 am
by scottwilkerson
How many installations are you trying to install?

This is not something we have worked out because even in the largest installations, there are not that many servers installed and you will still have to enter the license key and activation

Re: How to run nagiosxi/install.php from backend

Posted: Tue Apr 24, 2018 4:54 am
by ddaluka
Hi Scott,

We are deploying it on nightly built CI server using Jenkins so that our latest snapshot changes can be tested. So we need to do this activity after every install which I am trying to avoid.

Re: How to run nagiosxi/install.php from backend

Posted: Tue Apr 24, 2018 8:46 am
by scottwilkerson
ddaluka wrote:Hi Scott,

We are deploying it on nightly built CI server using Jenkins so that our latest snapshot changes can be tested. So we need to do this activity after every install which I am trying to avoid.
The one thing you are going to have to grab from the page is the nsp. In you example you grabbed

Code: Select all

nsp=ec3ae1105c35c3cc413127d277818d45103c734058ae281ea0f47859aa2a1576
That code is unique to the page load and is a session protector, so you will have to load the page, grab the code, and then use that on your submit