Bug#294983: [Nagios-devel] [txemi2@euskalnet.net: [Pkg-nagios-devel] Bug#294983: wishlist: not require alias and host_name in hosts.cfg]
Andreas Ericsson
Andreas Ericsson <ae@op5.se>, 294983@bugs.debian.org
Wed, 16 Feb 2005 10:22:35 +0100
Andreas Ericsson wrote:
> Subhendu Ghosh wrote:
>
>>
>> using templates you can define a default alias - alias is only used if
>> you need it in notifications...
>>
>
> Indeed. Perhaps
> define host{
> name default-host-template
> ....
> alias $HOSTNAME$
> address $HOSTNAME$
> ...
> }
>
> might work.
>
>> however host_names have to be unique and the address field can contain
>> more than one address - so they have to be entered
>>
>
> No. Addresses are also unique, and if the short form (as determined by
> search and domain directives in /etc/resolv.conf) is entered as
> host_name that's all you really need for the host.
>
Clarification; So long as you don't add dummy-hosts, addresses are
unique (really unique, not just forced to be by Nagios).
>> also 1.x is in a bug fix mode only
>> development/features are in 2.x
>>
>> It might be simpler to write a pre-init script that parses the config
>> and writes out the address if needed from the hostname.
>>
>
> No. It would indeed be very simple to add this functionality to the core
> code (2 extra if()'s in the xodtemplate_add_host() function). I've
> suggested it myself for the alias variable which is only required for
> the cgi's.
>
>> -sg
>>
>> On Tue, 15 Feb 2005, sean finney wrote:
>>
>>> hi nagios-devel,
>>>
>>> we have a feature request from a user that i think is pretty reasonable
>>> and not too big an effort to accomplish. basically, nagios requires
>>> that all host objects have a host_name, address, and alias attribute.
>>>
>>> the user requested that as a default, if only the host_name is provided
>>> that it be used to derive the other two attributes.
>>>
>>> btw, this is for the 1.x cvs branch.
>>>
>>> thoughts? comments?
>>>
>>> sean finney
>>> (debian nagios package maintainer)
>>>
>>> ps - i would appreciate it if you would maintain the CC field so that
>>> further correspondance is kept with the bug record.
>>>
>>> ----- Forwarded message from txemi <txemi2@euskalnet.net> -----
>>>
>>> From: txemi <txemi2@euskalnet.net>
>>> To: Debian Bug Tracking System <submit@bugs.debian.org>
>>> Subject: [Pkg-nagios-devel] Bug#294983: wishlist: not require alias
>>> and host_name in hosts.cfg
>>> Date: Sat, 12 Feb 2005 21:24:29 +0100
>>>
>>> Package: nagios
>>> Severity: wishlist
>>>
>>> wishlist: not require alias and host_name in hosts.cfg
>>>
>>> Most boring thing of setting up nagios is writting big configuration
>>> files.
>>> But some little changes could in my opinion short and increase
>>> readability of this files.
>>>
>>> In my hosts.cfg I have a lot of sections like this:
>>>
>>> define host{
>>> use my-generic-host
>>> host_name myhost.com
>>> alias myhost.com
>>> address myhost.com
>>> check_command check_ssh
>>> }
>>>
>>> In most of my hosts host_name is equal to alias and address, so it
>>> could be written like this:
>>>
>>> define host{
>>> use my-generic-host
>>> address myhost.com
>>> check_command check_ssh
>>> }
>>>
>>> But it cannot be done as host_name, alias and address are necessary.
>>>
>>> I would like that in host_name and alias absence they would take
>>> address value. So I could say the same with less text making it
>>> easier to write, read, change, mantain, understand...
>>>
>>> that is all...
>>>
>>> txemi <txemi2@euskalnet.net>
>>> http://txemi.webhop.org
>>>
>>>
>>>
>>> -- System Information:
>>> Debian Release: 3.1
>>> APT prefers unstable
>>> APT policy: (500, 'unstable')
>>> Architecture: i386 (i686)
>>> Kernel: Linux 2.6.10-1-686
>>> Locale: LANG=es_ES@euro, LC_CTYPE=es_ES@euro (charmap=ISO-8859-15)
>>>
>>>
>>> _______________________________________________
>>> Pkg-nagios-devel mailing list
>>> Pkg-nagios-devel@lists.alioth.debian.org
>>> http://lists.alioth.debian.org/mailman/listinfo/pkg-nagios-devel
>>>
>>>
>>> ----- End forwarded message -----
>>>
>>>
>>
>
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Lead Developer