Page 1 of 1
Nagios BPI component repair
Posted: Wed Aug 17, 2016 7:47 pm
by nicladas
I just learned about the Nagios BPI component and followed the instructions on the Exchange download page. When I went to use it, none of the dropdowns were working, so I checked into the documentation, which states in there that Nagios now ships with BPI pre-installed and that installing it from the exchange download will break the existing component. I was not aware of this as it was not a warning on the main page... can you let me know how I can repair it now please?
Thank you,
Nic
Re: Nagios BPI component repair
Posted: Wed Aug 17, 2016 11:51 pm
by Box293
Try this:
Download your version of XI from here:
https://assets.nagios.com/downloads/nag ... rsions.php
Extract it
Copy the files in
nagiosxi/nagiosxi/basedir/html/includes/components/nagiosbpi/ including all subdirectories into
/usr/local/nagiosxi/html/includes/components/nagiosbpi/
Does this fix your problem?
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 11:18 am
by nicladas
Worked like a charm, thank you!!!
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 11:42 am
by nicladas
Perhaps I spoke too soon... The majority of things are working fine now, but when I got to save a config I get
Error: Unable to match string in config file..
Also, the UI still looks a little off:
BPI.PNG
Command history:
Code: Select all
tar -xvf /tmp/xi-5.2.7.tar.gz nagiosxi/nagiosxi/basedir/html/includes/components/nagiosbpi/ --strip-components=6
chown -R nagios:nagios nagiosbpi/
chmod -R 750 nagiosbpi/
Thoughts?
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 12:20 pm
by lmiltchev
Can you run the following commands, and show the output?
Code: Select all
ls -la /usr/local/nagiosxi/etc/components
ls -lad /usr/local/nagiosxi/html/includes/components/nagiosbpi
ls -la /usr/local/nagiosxi/html/includes/components/nagiosbpi
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 12:40 pm
by nicladas
Code: Select all
# ls -la /usr/local/nagiosxi/etc/components
total 88
drwsrwsr-x 3 apache nagios 111 Aug 17 23:59 .
drwxr-xr-x 3 nagios nagios 44 Feb 29 15:56 ..
-rwxrwxr-x 1 apache nagios 38988 Aug 18 12:33 bpi.conf
-rwxrwxr-x 1 apache nagios 38988 Aug 18 12:38 bpi.conf.backup
-rw-r--r-- 1 apache nagios 647 Apr 18 14:27 ccm_config.inc.php
-rw-r--r-- 1 apache nagios 3339 Jun 3 11:32 _dn_Default Template
drwsrwsr-x 2 apache nagios 25 Feb 29 15:55 webinject
# ls -lad /usr/local/nagiosxi/html/includes/components/nagiosbpi
drwxr-x--- 5 nagios nagios 4096 Apr 6 15:39 /usr/local/nagiosxi/html/includes/components/nagiosbpi
# ls -la /usr/local/nagiosxi/html/includes/components/nagiosbpi
total 100
drwxr-x--- 5 nagios nagios 4096 Apr 6 15:39 .
drwxr-x--- 57 nagios nagios 4096 Aug 18 12:15 ..
-rwxr-x--- 1 nagios nagios 8651 Apr 6 15:39 api_tool.php
-rwxr-x--- 1 nagios nagios 2405 Apr 6 15:39 bpi.conf
-rwxr-x--- 1 nagios nagios 3812 Apr 6 15:39 bpi_display.php
-rwxr-x--- 1 nagios nagios 13893 Apr 6 15:39 bpi.js
-rwxr-x--- 1 nagios nagios 5139 Apr 6 15:39 bpi_style.css
-rwxr-x--- 1 nagios nagios 4364 Apr 6 15:39 CHANGELOG.txt
-rwxr-x--- 1 nagios nagios 2242 Apr 6 15:39 check_bpi.php
drwxr-x--- 2 nagios nagios 30 Apr 6 15:39 classes
drwxr-x--- 2 nagios nagios 4096 Apr 6 15:39 functions
drwxr-x--- 2 nagios nagios 151 Apr 6 15:39 images
-rwxr-x--- 1 nagios nagios 3995 Apr 6 15:39 inc.inc.php
-rwxr-x--- 1 nagios nagios 5227 Apr 6 15:39 index.php
-rwxr-x--- 1 nagios nagios 9443 Apr 6 15:39 nagiosbpi.inc.php
-rwxr-x--- 1 nagios nagios 2217 Apr 6 15:39 README
-rwxr-x--- 1 nagios nagios 2359 Apr 6 15:39 sanity.sh
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 2:39 pm
by lmiltchev
H-m-m, the permissions look fine. The function that is failing is "get_config_string". I wonder if you are missing "{" or "}" in the config file...
Can you check if the number of "{}" is even?
Code: Select all
grep '{\|}' /usr/local/nagiosxi/etc/components/bpi.conf | wc -l
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 3:17 pm
by nicladas
Yep...
Code: Select all
grep '{\|}' /usr/local/nagiosxi/etc/components/bpi.conf | wc -l
156
Would we get an error like this if we're still in a trial license? I only get the error when I try and write a config on a new BPI group, manually touching the config file and hitting save returns fine.
This feature is part of the Enterprise Edition of Nagios XI. You have 0 days left to test this feature. Learn more about Enterprise Edition features.
UPDATE:
I just tried to run a "Sync Hostgroups" and got a similar error. I removed the last created BPI group manually from the config and it worked:
Code: Select all
define outsystems {
title=OutSystems
desc=
primary=1
info=
members=$outsystems-primary-prod;&,
warning_threshold=90
critical_threshold=80
priority=2
type=default
auth_users=
}
Re: Nagios BPI component repair
Posted: Thu Aug 18, 2016 4:58 pm
by lmiltchev
Would we get an error like this if we're still in a trial license? I only get the error when I try and write a config on a new BPI group, manually touching the config file and hitting save returns fine.
I don't believe this is the case. Nagios XI trial is a fully functional software. One thing you could try is running the upgrade script from the install directory with "-f" flag (forcing reinstalling all plugins/addons, etc.).
This feature is part of the Enterprise Edition of Nagios XI. You have 0 days left to test this feature. Learn more about Enterprise Edition features.
Syncing is an Enterprise feature, so if your Enterprise trial expired, you will have to purchase Enterprise (if you want to sync hostgroups/servicegroups).