Import host and service escalations and BPI configs
Import host and service escalations and BPI configs
I am moving to a new NagiosXI 5.4.2 instance from a 5.2.3 and in using the Importing Config Files from Nagios Core into Nagios XI document, it appears to be erroring when trying to verify files, especially on host/service escalation configs and BPI configs. Are these able to be imported?
Re: Import host and service escalations and BPI configs
Code: Select all
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching 'DB_REPLICATION' (config file '/usr/local/nagios/etc/services/DB_REPLICATION.cfg', starting on line 16)
Error: Failed to expand host list 'DB_REPLICATION' for service 'BPI Process:Database_Replication' (/usr/local/nagios/etc/services/DB_REPLICATION.cfg:16)
Error: Host 'backoffice.nasba.int,nasbaaddr.nasba.dr,nasbawsus.nashville.int,PRDMNGENG01,rdpsrv.nasba.int,SA1,sharepoint.nasba.int,trendmicro,wsad.nashville.int' has an escalation, but is not defined anywhere!
Error: Could not register host escalation (config file '/usr/local/nagios/etc/hostescalations.cfg', starting on line 118)
Error processing object config files! -
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Import host and service escalations and BPI configs
I think BPI configurations can be imported manually. If you go to XI > Admin > Manage Components > Nagios BPI > Edit Settings there should be a list of files.
I *think* if you just copy the old into the new it should work. However this is untested and there have been some changes between now and then. If there are issues, please include: /usr/local/nagiosxi/var/components/bpi.log
Regarding the escalations, the import should work provided you follow these steps:
https://assets.nagios.com/downloads/nag ... p-Tool.pdf
For an import to complete, any object it references must exist in Nagios already. So if you tried to import service FOO on host BAR using template FOOBAR, the import would fail if FOOBAR didn't exist.
I *think* if you just copy the old into the new it should work. However this is untested and there have been some changes between now and then. If there are issues, please include: /usr/local/nagiosxi/var/components/bpi.log
Regarding the escalations, the import should work provided you follow these steps:
https://assets.nagios.com/downloads/nag ... p-Tool.pdf
For an import to complete, any object it references must exist in Nagios already. So if you tried to import service FOO on host BAR using template FOOBAR, the import would fail if FOOBAR didn't exist.
Previous Nagios employee
-
SteveBeauchemin
- Posts: 524
- Joined: Mon Oct 14, 2013 7:19 pm
Re: Import host and service escalations and BPI configs
We use BPI quite a bit. Really looking forward to an 'integrated' version at some point.
In any case, in my recent migration from RH6 to RH7, and from Nagios XI 5.2.7 to 5.4.2, I simply copied the bpi.conf from one host to the other. That worked fine for me. My experience is no guarantee that your experience will be okay, but try it and if it does the job, then carry on.
The file is:
In any case, in my recent migration from RH6 to RH7, and from Nagios XI 5.2.7 to 5.4.2, I simply copied the bpi.conf from one host to the other. That worked fine for me. My experience is no guarantee that your experience will be okay, but try it and if it does the job, then carry on.
The file is:
Code: Select all
/usr/local/nagiosxi/etc/components/bpi.confXI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
Re: Import host and service escalations and BPI configs
Thanks Steve,
avandemore,
I followed the import tool and then the import from core to nagios xi. the problem is at the point of import, the instructions are vague on the order, other than a specific list on the prompt upon entering import config files page:
Then, in the example, they do it in a different order. So there doesn't seem to be a set order, nor does it actually detail where escalations should go in the order either.
Also, the config name looks different compared to the current server:
Current NagiosXI:
New NagiosXI cfgprep file:
New NagiosXI written config:
avandemore,
I followed the import tool and then the import from core to nagios xi. the problem is at the point of import, the instructions are vague on the order, other than a specific list on the prompt upon entering import config files page:
Code: Select all
To prevent errors or misconfigurations, you should import your configurations in an useful order. We recommend importing in the following order:
Commands Time Periods Contact Templates Contacts Contact Groups Host Templates Hosts Host Groups Service Templates Services Service Groups Also, the config name looks different compared to the current server:
Current NagiosXI:
Code: Select all
define serviceescalation {
# config_name dns01.srvr.prod.onp.nasba_lv2
host_name dns01.srvr.prod.onp.nasba
service_description / Disk Usage
contacts helpdesk
contact_groups opsec
first_notification 2
last_notification 2
notification_interval 30
escalation_period 24x7
escalation_options c
}Code: Select all
define serviceescalation {
host_name dns01.srvr.prod.onp.nasba
service_description / Disk Usage
contacts helpdesk
contact_groups opsec
first_notification 2
last_notification 2
notification_interval 30
escalation_period 24x7
escalation_options c
}
Code: Select all
define serviceescalation {
# [color=#FF0000]config_name Import 1489441577.2197[/color]
host_name dns01.srvr.prod.onp.nasba
service_description / Disk Usage
contact_groups opsec
first_notification 1
last_notification 2
notification_interval 30
escalation_period 24x7
escalation_options c,u,r
}-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Import host and service escalations and BPI configs
The first part of the instructions may be a little washy, much of this depends on how a system is setup. The important thing is that reference objects must exist.
I'm a bit more concerned about the latter information in your post. I believe an import should keep the same settings although the layout may be different. Can you provide the pre-import state of your files so I can run some tests?
I'm a bit more concerned about the latter information in your post. I believe an import should keep the same settings although the layout may be different. Can you provide the pre-import state of your files so I can run some tests?
Previous Nagios employee
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Import host and service escalations and BPI configs
I have received your configuration files. What version of Nagios did these originate on?
Previous Nagios employee
Re: Import host and service escalations and BPI configs
NagiosXI 5.2.3 currently. It has been upgraded through quite a few iterations.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Import host and service escalations and BPI configs
Hm, this is what I get after a cfgprep:
How old is the /usr/local/nagiosxi/tools/xiprepimport.php you used? Anything in XI 5.3+ I think should have the most current version.
Code: Select all
define serviceescalation {
host_name dns01.srvr.prod.onp.nasba
service_description / Disk Usage
contact_groups opsec
first_notification 1
last_notification 2
notification_interval 30
escalation_period 24x7
escalation_options c,u,r
}Previous Nagios employee
Re: Import host and service escalations and BPI configs
I used the import tool in the new server, which is a new build of 5.4.2.
so I tar the /usr/local/nagios/etc directory from the 5.2.3 server, brought it over to the new 5.4.2 server, made the /usr/local/nagios/etc/cfgprep/orig directory, untarred the file, then proceeded with the following commands:
so I tar the /usr/local/nagios/etc directory from the 5.2.3 server, brought it over to the new 5.4.2 server, made the /usr/local/nagios/etc/cfgprep/orig directory, untarred the file, then proceeded with the following commands:
Code: Select all
for f in orig/* ; do /usr/local/nagiosxi/tools/xiprepimport.php $f ; done
for f in orig/hosts/* ; do /usr/local/nagiosxi/tools/xiprepimport.php $f ; done
for f in ../orig/services/* ; do /usr/local/nagiosxi/tools/xiprepimport.php $f ; done