Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #2411] address/address6 are not required #299
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2411
Created by calestyo on 2012-03-07 00:53:39 +00:00
In http://docs.icinga.org/1.6/en/objectdefinitions.html#objectdefinitions-host the "address" directive is marked red as being required.
However, as mentioned later in the text it is not required.
So I guess, the red colour should be removed. :)
Updated by Wolfgang on 2012-03-07 07:17:20 +00:00
Well, we can argue about this. Technically seen you are right, but:
Updated by mfriedrich on 2012-03-07 09:16:08 +00:00
the core has a safety hook not to work with NULL values. nevertheless, the user must be made aware that not setting the address will trigger a gehthostbyname which requires DNS resolution and can be an unwanted dependency in case of failure. with my dns admin hat on, i would leave the address attribute mandatory.
Updated by calestyo on 2012-03-07 20:18:36 +00:00
Well that this uses DNS then is explained already in the text, right? As well as the implications.
I guess there are many setups where it's just "useless" to set the address field.
At the local institute for example, we run our own authoritative DNS servers.
So I'd suggest... remove the red colour, keep the big fat warning, that DNS is then used and that this has implications.
As it is now at least the text conflicts itself. The red colour says it's required, the text below says it's not.
Updated by mfriedrich on 2012-03-07 20:31:07 +00:00
sure, we run our own dns resolvers as well. but that does not imply that we want to query the local resolver => recursive resolver each time a check runs, and the cache cannot answer.
the default examples on the most commands use $HOSTADDRESS$ as their macros, and not something like $HOSTNAME$ as your config need not be bound to use FQDNs as hostname which would be fully resolvable when being but onto a command as macro being fetched.
if the core would have a bug, and not setting the address field to the hostname (which could be something else than an fqdn btw), this will lead into faulty condition some might not be able to debug.
the past did show that is the most common mistake
you actually can NOT enfore the users to just use fqdn then.
for my personal understanding, the address attribute is a must and i would make it happen in the core as well, if that would not break compatibility.
so my vote is for leaving it to mandatory RED, and adding a note to the users, what could happen if they don't set it.
and to add an addon which enforces the usage of the address attribute - checkmk. and that is good how it is, as it prevents live on execution dns resolve errors, warning your already on config creation if such an automated lookup will fail on generate, doing a rollback transaction.