Import failed. Invalid characters in the host name
Posted: Fri Mar 24, 2017 11:13 am
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.
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.