[hobbit] Is there a way to clone host definitions in bb-hosts?
John Burk
john.d.burk at gmail.com
Wed Jun 11 06:46:34 CEST 2008
Oh well... would have been nice.
Might be something to add as a feature request. I've been doing
clusters for quite a few years now, and have seen the size of them
increase from commonly less than a hundred hosts to 1000+ in the last
few years. 1000+ is not out of the ordinary now, whereas even 3 years
ago one I did that was 350 hosts would have wound up around #115 in
the top 500 supercomputer list (or so the IBM tech who came by to see
it told me). When the cluster sizes grow like this, the config files
can get kind of unwieldy without some sort of template syntax.
It's too bad there's also not a feature to pull the addr's from the
dns or some other resolution mechanism, and an expression syntax to
define a range of hosts, eg, if you had hosts node0001-node1500, you
could express it in one line as:
+ node[0001-1500] # conn NOPROPRED:+cpu
where the "+" (or some other token) would tell hobbit to do an address
lookup instead of pulling it from the bb-hosts file.
Barring that, the cluster mgmt s/w I use does use a similar type of
syntax for host range definition, and I can always use the cmd-line
tools from that to list the host info for the cluster, then pipe that
through awk/sed and build the client include files on the fly, but it
harks back to the days of perl one-liners. Not that that's
necessarily a bad thing...
johnB
2008/6/10 John Burk <john.d.burk at gmail.com>:
> Sweet. This is exactly what I was looking for.
>
> I'll experiment tomorrow and see if the var (guess I'll have to start
> calling it a macro) can be defined in the body of bb-hosts and still
> be evaluated correctly in the include files that contain the client
> entries. I'm guessing it will since the section of the hobbit-alerts
> manpage that deals with macros mentions that macros can be nested, but
> that the inner macro must be defined first. This leads me to believe
> that the config file parser reads line-by-line evaluating as it goes.
>
> I'm just going to get started in the next day or two with alerts
> within hobbit, hence my unfamiliarity with macros. I had quickly
> scanned the hobbit-alerts manpage today but had missed the
> significance of the section on macros, mainly because it looked at
> first glance to be regex evaluation; the example with
> "$WEBHOSTS=%(www|intranet|support|mail).foo.com" caught my eye. Does
> the leading '%' always signify some sort of regular expression in
> hobbit?
>
>
> johnB
>
> 2008/6/10 Tim McCloskey <devzero at cox.net>:
>> So I was curious about the whole macro thing and decided to test it out. It
>> has only been a few minutes but the following seems to work fine. I hope
>> this helps in some way.
>>
>>
>>
>> bb-hosts:
>>
>> $foo="dns"
>> ipaddress servername # $foo
>>
>>
>> Regards,
>>
>> Tim
>>
>>
>>
>> Tim McCloskey wrote:
>>>
>>> As mentioned, perhaps someone with knowledge on the topic can answer.
>>>
>>> To extend the question further, since macros (variables) are able to be
>>> used within the hobbit-alerts.cfg file I wonder if variables can be assigned
>>> in bb-hosts and hobbit-clients.cfg? At one point I thought of trying to
>>> keep all of our host/client/alerts data within mysql, but it was only a
>>> thought.
>>>
>>> Regards,
>>> Tim
>>>
>>>
>>> John Burk wrote:
>>> I'm using includes in my bb-hosts to keep the file
>>>>
>>>> length down, but my included files are comprised of hundreds of hosts
>>>> all identical except for the ipaddresses and hostnames.
>>>>
>>>> Surely there must be a way to template this, I just can't find it in
>>>> the bb-hosts manpage...
>>>
>>> ...
>>>>
>>>> and so on in mind-numbing repetition...
>>>> ==============================
>>>>
>>>> I'd like to be able to define the tags in a template, and simply use
>>>> that template. Does this mechanism exist in bb-host? That way
>>>> if/when I need to change the tags for all my hosts, I only need to do
>>>> it in one place, and not on every line in 3 different files.
>>>
>>>
>>>
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe at hswn.dk
>>>
>>>
>>>
>>
>>
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
>>
>>
>>
>
More information about the Xymon
mailing list