[icinga-users] host_name and availability reports (how is this in incinga2?)

Simon Oosthoek soosthoek at nieuwland.nl
Tue Feb 5 12:47:29 CET 2013


Hi Gunnar

On 02/05/2013 09:42 AM, Gunnar Beutner wrote:
> Am 04.02.2013 20:56, schrieb Simon Oosthoek:

>> If I look at the config structure examples I find for icinga2, I see the
>> host definition looks like
>> object host "hostname" {
>>
>> stuff
>>
>> }
>>
>> So I infer that hostname is still the identifier for the host.
>>

> Well, short of forcing users to manually specify some other unique
> identifier there's no way for Icinga 2 to determine whether a config
> object has previously had a different name:
>
> object Host "localhost" {
>       unique_id = "5fe49ae3-fc9c-4935-a936-b59485af725f",
>
>       ...
> }
>
> This wouldn't be that much of a problem if the configs are automatically
> generated (e.g. from LConf) but this is not always the case. What other
> identifiers would you suggest we use instead? I can't really think of
> any good ones right now.
>

The problem is mainly with manually generated configurations, so when 
automated tools are used to generate the config, there's no problem 
finding a unique ID.

In reasonably sized configurations, there's usually other systems 
involved in administrating the assets, e.g. we use RT with Asset 
Tracker, so we could use the numbers generated there to get a unique ID.

Or you could use UUID or MAC addresses as in your example.

A completely manual solution would be to start a textfile with numbers 
and the names of all the hosts and always add new ones at the bottom, 
only ever increasing the number and using that as unique ID.

Or you could make one up and have icinga2 check the config for 
duplicates and warn the user about that.

I guess the main difficulty is finding a system to use for unique IDs...

Another problem may be interfacing with other tools, but I guess that 
pnp4nagios will need patches to work with icinga2 anyway?

Cheers

Simon




More information about the icinga-users mailing list