Install Nagios XI in a custom location

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Install Nagios XI in a custom location

Post by xlin125 »

We are considering to install Nagios XI in a custom location instead of the default location /usr/local. However, the current Nagios XI installation script "fullinstall" does not offer an option to install Nagios XI to a different location. It seems the config file "xi-sys.cfg" is the only place that may allow sysadmin to specify a different location by replacing the default location /usr/local with a custom location prior to running fullinstall. Does the current Nagios XI supports Nagios XI installed in a custom location such as "/opt/app"?

I read a post with the subject "Custom location to install Nagios XI on RedHat Linux" posted on April 22, 2014. This Nagios XI user asked the same question I am asking more than a year ago. The two answers to his/her questions were quoted as follows:

"Yes, but you should use symlinks to keep your life easy. Otherwise, you will need to find/replace a large number of strings across the whole of XI. It is worth mentioning that installing to a different location is *technically* not supported, but we will do our best to help."

"Yeah it takes quite a bit more effort than just that right now. It may be offered in the future though!"

My questions are that:
1) Are these answers still true?
2) How can I tell the fullinstall to install the Nagios XI to a different location if this is feasible now?
3) Do I have a workaround if installation Nagios XI to a different location is not officially supported and what problems/issues I may expect and will encounter to?

Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Install Nagios XI in a custom location

Post by ssax »

I talked with the devs and that information is still correct.

If you really wanted to (for science) you could try using a symlink but we can't guarantee that everything will work properly. In theory it should work but I've never tried it, we can't really predict any issues that you may run into (maybe backup_xi.sh or restore_xi.sh, I'm not really sure if it would or not).
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Install Nagios XI in a custom location

Post by xlin125 »

Thanks for the response and update! We definitely take your feedback and comments into consideration when making the decision. It seems most Nagios XI customers, if not all, install the Nagios Xi to the default location /usr/local.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Install Nagios XI in a custom location

Post by hsmith »

xlin125 wrote:Thanks for the response and update! We definitely take your feedback and comments into consideration when making the decision. It seems most Nagios XI customers, if not all, install the Nagios Xi to the default location /usr/local.
It seems to be the popular method of doing it, mostly because it just works.

Is there anything else we can do to help you out?
Former Nagios Employee.
me.
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Install Nagios XI in a custom location

Post by xlin125 »

Any future plan to allow a custom location for installing Nagios XI? Thanks!
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Install Nagios XI in a custom location

Post by xlin125 »

How about installing the Nagios NRPE agent to a custom location such as /opt/app instead of the default /usr/local? Is it feasible since most of the Nagios NRPE agent codes are installed in /usr/local/nagios directory? Thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Install Nagios XI in a custom location

Post by hsmith »

xlin125 wrote:Any future plan to allow a custom location for installing Nagios XI? Thanks!
I talked to the devs, and right now it sounds like the symlink approach is the way to go if you want to install XI in a custom location. I am going to check through the feature requests and see if one exists for this, and if not, I will make a new one for you.
xlin125 wrote:How about installing the Nagios NRPE agent to a custom location such as /opt/app instead of the default /usr/local? Is it feasible since most of the Nagios NRPE agent codes are installed in /usr/local/nagios directory? Thanks!
Right now you are able to install NRPE anywhere you would like, but if you are using the install script, it is going to put the files in the default location.

Thanks for your suggestions, hopefully this clears a little bit up for you. Is there anything else I can help with?
Former Nagios Employee.
me.
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Install Nagios XI in a custom location

Post by xlin125 »

If I want to install the Nagios XI to a custom location such as /opt/app, all I need to do before running "fullinstall" script is to edit the "xi-sys.cfg" file and replace the line "proddir='/usr/local/nagiosxi'" with "proddir='/opt/app/nagiosxi'". Am I get it right? I am assuming the fullinstall script will check this line to determine the installation location. After the installation, I should see the following in the custom location /opt/app:
/opt/app/nagios
/opt/app/nagiosmobile
/opt/app/nagiosxi
/opt/app/nagvis
/opt/app/nrdp
/opt/app/nsis

Then, I need to create individual symbolic links (directories) from /usr/local for the corresponding directories above so that /usr/local/nagios will point to /opt/app/nagios, and so on, correct?

Again, I really appreciate your excellent support and help!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Install Nagios XI in a custom location

Post by ssax »

If I were doing it, I would install XI as normal into the default /usr/local location, then:

Code: Select all

mv /usr/local/nagios /opt/app/
mv /usr/local/nagiosmobile /opt/app/
mv /usr/local/nagiosxi /opt/app/
mv /usr/local/nagvis /opt/app/
mv /usr/local/nrdp /opt/app/
mv /usr/local/nsis /opt/app/
ln -s /opt/app/nagios /usr/local/nagios
ln -s /opt/app/nagiosmobile /usr/local/nagiosmobile
ln -s /opt/app/nagiosxi /usr/local/nagiosxi
ln -s /opt/app/nagvis /usr/local/nagvis
ln -s /opt/app/nrdp /usr/local/nrdp
ln -s /opt/app/nsis /usr/local/nsis
chown nagios.nagios /usr/local/nagiosxi
chown apache.apache /usr/local/nagvis
chown nagios.nagios /usr/local/nrdp
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: Install Nagios XI in a custom location

Post by karthek »

Hi ssax,

I did in the way you mentioned, but the services are not starting.

monitoring engine
performance grapher
database backend

all of these services are stopped.
I tried to start the services but it's throwing error

How do i get them started?
You do not have the required permissions to view the files attached to this post.
"Machines don't make mistakes, we do."
Locked