I am trying to use the import function to import some flat files.
The import is choking on trying to update the services in the generated file _multiple_hosts.cfg
I get the following error:
1 items failed to import successfully Hide Details
You must enter a proper host name. You can not use the characters: \~!$%^&*"'|<>?,()=
For some reason, nagios does not seem to like the comma in the host_name entries when I specify multiple hosts.
I created a simple file out of the original one which only contains a single entry:
cat cfgprep/MY_multiple_hosts.cfg
define service {
use siview-test-service
host_name efkxdccolv011,efkxdccolv021
service_description SiView DCS Servers
check_command check_nrpe!check_dcs_col
}
The hosts have been defined and I see them in the Config manager.
Below is what they look like in the host generate cfg file
define host {
use aix-server ; Inherit from the AIX-servers template
host_name efkxdccolv011
alias efkxdccolv011
register 1
}
define host {
use aix-server ; Inherit from the AIX-servers template
host_name efkxdccolv021
alias efkxdccolv021
register 1
}
Everything works fine when there is only a single host. Its when I supply 2 on the host_name line that causes the error.
I am running nagiosxi 5.4.0 on a REHL 7.2 system.
Import failed. Invalid characters in the host name
Re: Import failed. Invalid characters in the host name
You cannot have commas in a host_name directive. That is typically used to delimit object identifiers in Nagios Core (members of a hostgroup, for example), so you can't use it in a single-value directive like host_name.
Though your usage in this case is technically correct, I think it's probably tripping up the import tool. I'm going to investigate a bit and file a bug report.
Though your usage in this case is technically correct, I think it's probably tripping up the import tool. I'm going to investigate a bit and file a bug report.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/