Imported Configuration Truncated?
Posted: Fri Jun 29, 2012 12:28 pm
Hi there,
I'm in the process of importing a decent sized Core configuration into a new Nagios XI installation. I've followed the instructions for the XI Config Import Pre Tool and received no errors during the process. After the new configurations were created, I followed the instructions for importing them into XI.
The import itself went fine, also with no errors. However, when I get to the post-import process, I start to have problems. The first two steps of the "Write Config Files" process worked fine, no errors. When I hit the third step, check configuration files, I get the following error :
Error: Could not find any host matching 'server12.exampl' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1184)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1184)
Error processing object config files!
If I look at the config file mentioned, it's pretty clear that the data was truncated while being written out. Here's the definition in question (Though there are more in the config like this)
define service {
service_description Available Memory
use service-server-standard
hostgroup_name linux-server-critical,linux-server-standard,nac-appliance-standard
servicegroups linux-server-standard
check_command check_snmp_memory!-C $USER3$
host !server1.example.com,!server2.example.com,!server3.example.com,!server4.example.com,!server5.example.com,!server6.example.com,!server7.example.com,!server8.example.com,!server9.example.com,!server10.example.com,!server11.example.com,!server12.exampl
register 1
}
So how does one go about fixing this? Yes, I have really long host entries like this in the original config, and they work fine.
Server details :
RHEL 6.3
x86_64 architecture
4G RAM
4 CPUs
Nagios XI 2011r3.2 (Manual Install)
I'm in the process of importing a decent sized Core configuration into a new Nagios XI installation. I've followed the instructions for the XI Config Import Pre Tool and received no errors during the process. After the new configurations were created, I followed the instructions for importing them into XI.
The import itself went fine, also with no errors. However, when I get to the post-import process, I start to have problems. The first two steps of the "Write Config Files" process worked fine, no errors. When I hit the third step, check configuration files, I get the following error :
Error: Could not find any host matching 'server12.exampl' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1184)
Error: Could not expand hostgroups and/or hosts specified in service (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1184)
Error processing object config files!
If I look at the config file mentioned, it's pretty clear that the data was truncated while being written out. Here's the definition in question (Though there are more in the config like this)
define service {
service_description Available Memory
use service-server-standard
hostgroup_name linux-server-critical,linux-server-standard,nac-appliance-standard
servicegroups linux-server-standard
check_command check_snmp_memory!-C $USER3$
host !server1.example.com,!server2.example.com,!server3.example.com,!server4.example.com,!server5.example.com,!server6.example.com,!server7.example.com,!server8.example.com,!server9.example.com,!server10.example.com,!server11.example.com,!server12.exampl
register 1
}
So how does one go about fixing this? Yes, I have really long host entries like this in the original config, and they work fine.
Server details :
RHEL 6.3
x86_64 architecture
4G RAM
4 CPUs
Nagios XI 2011r3.2 (Manual Install)