Page 2 of 3

Re: Installation instruction for XI on CentOS 7?

Posted: Sun Aug 09, 2015 8:10 pm
by Box293
WillemDH wrote:It seems like I do have some issue, that only started after rebooting the server. All my services are shown 4 times in the XI gui. In the CCM they are only visible once. What could cause this?
Yeah I've noticed this recently too while playing with XI builds on CentOS 7. Always occurs after a system boot and as soon as you restart the monitoring engine everything is OK.

It's easy to reproduce:
  • Install CentOS 7 with Minimal Build
    Install latest version of Nagios

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 10:48 am
by WillemDH
Thanks Troy for the tip. Restarting the monitoring engine does indeed help. I didn't test yet if the issue re-appears when the server is rebooted.
I do seem to have another small issue. All actions I perform seem to fail. Check the attached screenshot for the complete error. Now the good thing is that these actions that seem to fail are in fact executed correctly. The server does not have a really high load or is not extremely busy. Did anyone see this before?
Is there yet a bug report for the quadruple services?

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 2:39 pm
by hsmith
For what it's worth, I am unable to replicate the x4 display bug on a fresh install of XI on CentOS 7 I just set up today. I've rebooted it twice now attempting to get this to happen and haven't had any luck.

Are you on 2.6 or 2.7?

Also, my CentOS version:

Code: Select all

cat /etc/*release*
CentOS Linux release 7.0.1406 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CentOS Linux release 7.0.1406 (Core)
CentOS Linux release 7.0.1406 (Core)
cpe:/o:centos:centos:7

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 2:48 pm
by WillemDH
Ok here is my CentOS version:

Code: Select all

➜  ~  cat /etc/*release*
CentOS Linux release 7.1.1503 (Core)
Derived from Red Hat Enterprise Linux 7.1 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.1.1503 (Core)
CentOS Linux release 7.1.1503 (Core)
cpe:/o:centos:centos:7
I installed the latest XI version (R2.7)

Grtz

Willem

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 3:02 pm
by hsmith
WillemDH wrote:Ok here is my CentOS version:

Code: Select all

➜  ~  cat /etc/*release*
CentOS Linux release 7.1.1503 (Core)
Derived from Red Hat Enterprise Linux 7.1 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.1.1503 (Core)
CentOS Linux release 7.1.1503 (Core)
cpe:/o:centos:centos:7
I installed the latest XI version (R2.7)

Grtz

Willem
I'll try this with an updated CentOS build and let you know if I can reproduce it.

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 3:30 pm
by WillemDH
It could maybe also be the PHP version?

Code: Select all

➜  ~  php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Grtz

Willem

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 3:39 pm
by hsmith
WillemDH wrote:It could maybe also be the PHP version?

Code: Select all

➜  ~  php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Grtz

Willem
I have the same version on my machine.

Code: Select all

php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Copyright (c) 1997-2013 The PHP Group

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 3:46 pm
by WillemDH
Can you please also test to "schedule immediate forced check" and see if you get the same error message as me? (see previous post)

Re: Installation instruction for XI on CentOS 7?

Posted: Mon Aug 10, 2015 4:06 pm
by hsmith
WillemDH wrote:Can you please also test to "schedule immediate forced check" and see if you get the same error message as me? (see previous post)
That worked, however, upon reboot of the 7.1 machine I was able to replicate the 4x bug.

Re: Installation instruction for XI on CentOS 7?

Posted: Tue Aug 11, 2015 12:55 pm
by WillemDH
Hmm. Seems I'm unable to apply configuration anymore since i changed the nagiosxi.conf

Code: Select all

Command submitted for processing...
Waiting for configuration verification.........................................................................................................................................................................
Tailing cmdsubsys.log shows:

Code: Select all

PROCESSED 0 COMMANDS
 CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-08-11 19:47:06--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2015-08-11 19:47:06 ERROR 403: Forbidden.

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
OUTPUT=/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
.......................................................tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated

PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated

PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
                                                           .
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
                                                          ..
PROCESSED 0 COMMANDS
2015-08-11 19:47:06 ERROR 403: Forbidden. clearly is the issue and related to the change in /etc/httpd/conf.d/nagiosxi.conf I did to try secure the nagiosxi instance.

Anyone knows what I can do allow Nagios XI to apply configuration while keeping the deny from all and allow from config in /etc/httpd/conf.d/nagiosxi.conf ?

Code: Select all

<Directory "/usr/local/nagiosxi/html">
#  SSLRequireSSL
   Options None
   AllowOverride None
#   Order allow,deny
#   Allow from all
  Order deny,allow
  Deny from all
  Allow from 102.22.50.45 102.22.37.130 102.27.33.70 127.0.0.1 222.71.234.84 2a01:fe00::f43c:91ff:fe18:6141
#   AuthName "Nagios XI"
#   AuthType Basic
#   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
#   Require valid-user
   Require all granted
</Directory>

Alias /nagiosxi "/usr/local/nagiosxi/html"
I added localhost 127.0.0.1, the server's own ipv4, ipv6 link and global address, so it should be allowed to access itself? When I revert to the normal (non-secure) situation it works normally.