Page 1 of 2

BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 10:37 am
by mbeebe
Hello,

I'm encountering an issue in Nagios 5.6.7 following the creation of a BPI group.

1. Created BPI group and wrote changes.

2. Went to Configure -> Wizards -> BPI and attempted to create the BPI host. Filled out all the information and when I went to apply changes, I
got the following error: "Configuration error. Could not apply configuration."

3. Configuration file contents:
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/CATVt3EU.tmp.cfg', starting on line 16)
Error processing object config files!

4. CATVt3EU.tmp.cfg contains the following:

###############################################################################
#
# Services configuration file
#
# Created by: Nagios CCM 3.0.3
# Date: 2019-11-11 07:23:14
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
service_description BPI Process:ProgramName Prod
use xiwizard_bpi_service
check_command check_bpi!ProgramnameProd
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 0
notification_period xi_timeperiod_24x7
contacts sdplus
contact_groups Email - Admins,Email Distro - Admins
_xiwizard bpiwizard
register 1
}

###############################################################################
#
# Services configuration file
#
# END OF FILE
#
###############################################################################

5. Deleted CATVt3EU.tmp.cfg and re-ran wizard; same error, same file, same contents.

6. Deleted CATVt3EU.tmp.cfg again.

7. Tried to change a notification setting on an existing check and got the same error on the same filename with the same contents.

8. Deleted existing BPI group; repeated step 7 with the same results.

I can't make any changes to our environment now.

Any idea as to what we're encountering?


-- Mike Beebe

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 10:54 am
by scottwilkerson
This can happen sometimes if there is a config stuck in the import directory

Code: Select all

ls -l /usr/local/nagios/etc/import

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 10:58 am
by mbeebe
scottwilkerson wrote:This can happen sometimes if there is a config stuck in the import directory

Code: Select all

ls -l /usr/local/nagios/etc/import
-rw-rw-r--. 1 apache nagios 555 Nov 11 07:20 servername.internaldomain.org.cfg

Safe to delete this file?

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 11:30 am
by scottwilkerson
yes

then try to apply configuration again

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 11:45 am
by mbeebe
Exact same results as before.

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 11:50 am
by scottwilkerson
If you go to CCM -> Services
In the Config Name dropdown do you have a listing for CATVt3EU.tmp ?

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 12:09 pm
by mbeebe
Yes; should I delete it?

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 12:10 pm
by scottwilkerson
mbeebe wrote:Yes; should I delete it?
Well that's why it keeps being re-created.

If you want to keep the service " BPI Process:ProgramName Prod" you need to add it to a host, otherwise, yes, you should delete it in the CCM

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 12:35 pm
by mbeebe
That worked perfectly.

Any idea why this happened in the first place? I need to re-create the BPI host and I don't want to end up back where I started from.

Thanks.

Re: BPI creation failure locking out all changes

Posted: Mon Nov 11, 2019 12:42 pm
by scottwilkerson
mbeebe wrote:That worked perfectly.

Any idea why this happened in the first place? I need to re-create the BPI host and I don't want to end up back where I started from.

Thanks.
Somehow you ended up with the service created but no host was assigned.

All services need to be assigned to a host.