NSTI Installation Problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ryan_breneman
Posts: 22
Joined: Mon Nov 19, 2012 3:50 pm
Location: Lancaster, PA

NSTI Installation Problem

Post by ryan_breneman »

Hello,

I just finished installing NSTI using the install.py script. Everything went fine, got all success messages through the install process. I restarted httpd and snmptt.

When I go to the nsti web url I get the following message: Could not open Configuration-File ./etc/config.ini !

I've tried changing permissions on the config.ini file (777) and tried changing owner from root to nagios, still no go.

Any thoughts?
Thanks
Ryan
Nagios XI 2012R1.2
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NSTI Installation Problem

Post by mguthrie »

Is SELinux enabled on this machine? Check /etc/selinux/config, and run the command:

Code: Select all

setenforce 0
ryan_breneman
Posts: 22
Joined: Mon Nov 19, 2012 3:50 pm
Location: Lancaster, PA

Re: NSTI Installation Problem

Post by ryan_breneman »

No, SELinux is disabled, see config output below:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
~
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NSTI Installation Problem

Post by scottwilkerson »

I'm going to have our resident NSTI guy take a look at this when he gets in.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: NSTI Installation Problem

Post by nscott »

Ryan,

Can you check to see if there is a /usr/local/nsti/etc/config.ini?

Is there anything in that etc directory?
Nicholas Scott
Former Nagios employee
ryan_breneman
Posts: 22
Joined: Mon Nov 19, 2012 3:50 pm
Location: Lancaster, PA

Re: NSTI Installation Problem

Post by ryan_breneman »

Yes, there is a config file. I've attached it to this post. In the file I removed the mysql password, but I did test the connection and I know that works. Other files in etc are backup.php and config.ini.dist.
You do not have the required permissions to view the files attached to this post.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: NSTI Installation Problem

Post by nscott »

I'd like to make sure its not some Apache problem where it is resolving the pathname improperly, in the NSTI tree:

/usr/local/nsti/include/defines/global.php

There is a variable named:

define('CONST_MAINCFG', './etc/config.ini');

change that to

define('CONST_MAINCFG', '/usr/local/nsti/etc/config.ini');

And save it, then try to access it. If this doesn't work then it is almost certainly a permissions issue.
Nicholas Scott
Former Nagios employee
ryan_breneman
Posts: 22
Joined: Mon Nov 19, 2012 3:50 pm
Location: Lancaster, PA

Re: NSTI Installation Problem

Post by ryan_breneman »

That did not work. I know it accepted the config change because now the error states the full path: Could not open Configuration-File /usr/local/nsti/etc/config.ini !

I originally thought the problem was permissions related and I tried modifying permissions with no success. Originally after the install script the config file was owned by root but in trying different things to make it work I changed to the nagios user, however it didn't affect the problem. Here is the output of ls-la on /usr/local/nsti/etc:

[root@nagios etc]# ls -la
total 20
drwxr-xr-x 2 root root 4096 Dec 11 15:27 .
drwxr-xr-x 7 root root 4096 Dec 7 12:59 ..
-rwxr-xr-x 1 root root 2406 Dec 7 12:35 backup.php
-rwxrwxrwx 1 nagios nagios 2430 Dec 7 12:48 config.ini
-rwxr-xr-x 1 root root 2409 Dec 7 12:35 config.ini.dist
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NSTI Installation Problem

Post by scottwilkerson »

Is the user apache runs under on this machine part of the nagios group?

Code: Select all

cat /etc/group | grep nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ryan_breneman
Posts: 22
Joined: Mon Nov 19, 2012 3:50 pm
Location: Lancaster, PA

Re: NSTI Installation Problem

Post by ryan_breneman »

Here's the output of that command:

[root@nagios ~]# cat /etc/group | grep nagios
nagios:x:500:nagios,apache
nagcmd:x:501:nagios,apache
Locked