easy way to set larrd tags for a group of systems in bb-hosts?
I've been populating my bb-hosts files and adding tags to use many of the tests offered by hobbit that weren't in my BB setup. In doing so, I couldn't help but notice that for some sets of systems, they all use the same tags. For example, say my bb-hosts looks something like this, where different groups of servers have different services, but each server in that group has the same thing:
IP web1.foo.com # "LARRD:*,vmstat:vmstat1|vmstat4" http://www.foo.com/ IP web2.foo.com # "LARRD:*,vmstat:vmstat1|vmstat4" http://www.foo.com/ IP web3.foo.com # "LARRD:*,vmstat:vmstat1|vmstat4" http://www.foo.com/ IP db1.foo.com # "LARRD:*,vmstat:vmstat|vmstat4" IP db2.foo.com # "LARRD:*,vmstat:vmstat|vmstat4" IP db3.foo.com # "LARRD:*,vmstat:vmstat|vmstat4" IP build1.foo.com # "LARRD:*,vmstat:vmstat2|vmstat3" ftp IP build2.foo.com # "LARRD:*,vmstat:vmstat2|vmstat3" ftp IP build3.foo.com # "LARRD:*,vmstat:vmstat2|vmstat3" ftp
Is there an easy way that I can define a macro or meta tag that would capture this data, so I could do something like this (fabricated syntax to follow) where I group into a single variable and just reference that?
web_monitors = ( "LARRD:*,vmstat:vmstat1|vmstat4" http://www.foo.com/ )
web1.foo.com # $web_monitors
I checked the bb-host manpage and found a reference to using an include file to keep bb-hosts short, but I think I would still have to have individual lines in each include file.
Just thought I'd ask.
Tom
On Thu, Jan 27, 2005 at 04:13:43PM -0500, Tom Georgoulias wrote:
I've been populating my bb-hosts files and adding tags to use many of the tests offered by hobbit that weren't in my BB setup. In doing so, I couldn't help but notice that for some sets of systems, they all use the same tags. [snip] Is there an easy way that I can define a macro or meta tag that would capture this data, so I could do something like this (fabricated syntax to follow) where I group into a single variable and just reference that?
web_monitors = ( "LARRD:*,vmstat:vmstat1|vmstat4" http://www.foo.com/ )
web1.foo.com # $web_monitors
Short answer: No. Some tools like BBConfig provide wrappers around the bb-hosts file to create such a "meta-configuration" and have the tool generate a bb-hosts file from it - that is one way to get around this.
Technically, it isn't much of a problem - especially not now that the handling of the bb-hosts file has been moved into a single library routine. (Until recently, several of the bbgen and hobbit tools had their own, specialized code to read and parse the file).
The only problem with is is that it will only work for tools and extensions that are "hobbit-aware", so you might run into some problems with extension-scripts that grep in the bb-hosts file directly.
I've added it to my "TODO" list.
Henrik
participants (2)
-
henrik@hswn.dk
-
tgeorgoulias@nandomedia.com