If nagios claims:

Error: 'bar' is not a valid parent for host 'foo'!

it is because bar doesn’t exist (e.g. you used a name directive instead of a hostname one).