-----Original Message-----
From: Josh Luthman [mailto:user-4c45a83f15cb@xymon.invalid]
Sent: Wednesday, 11 June 2008 9:15 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Is there a way to clone host
definitions in bb-hosts?
What I do in cases of this are to use for, if/then kind of things.
Example, I have a log that sticks in lines like
1.2.3.4 n y
2.2.5.6 x z
And I find repeating lines by IP in $1 then get a count of
them using wc.
I can show you the script if this didn't come out clear.
Josh
On 6/10/08, John Burk <user-fd40c532888d@xymon.invalid> wrote:
let's just assume that after wrangling *nix machines for
over 20 years
I'm familiar with a couple of shells.
What I'm looking for is a more helpful answer; loading several files
up into vi and doing a search and replace on all lines that match a
pattern feels kludgy to me.
2008/6/10 Josh Luthman <user-4c45a83f15cb@xymon.invalid>:
Get familiar with bash or tcsh =)
On Tue, Jun 10, 2008 at 7:29 PM, John Burk
<user-fd40c532888d@xymon.invalid> wrote:
I'm using hobbit for monitoring a compute cluster of nearly 1000
identical hosts. 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...
<< bb-hosts >>
==============================
172.16.133.45 spork # bbd http://spork/
group Qube Supervisor
172.16.136.68 greenjeans # conn mysql RAID
NOCOLUMNS:files,ports
TRENDS:*,vmstat:vmstat|vmstat5,mysql:mysql|mysqlthreadsconnect
ed|mysqlthreadrunqueue|mysqlopenfiles|mysqlopentables|mysqlope
nedtables|mysqlrestrictiontablerowcount
page farm Farm Hosts
include clients.d/opteron
include clients.d/rfl
include clients.d/hp_blade
==============================
Right now I'm doing this:
<< clients.d/hpblade >>
==============================
subpage chassis01 bladeChassis 01
172.16.131.20 rn0101 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.21 rn0102 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.22 rn0103 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.23 rn0104 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.24 rn0105 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.25 rn0106 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.26 rn0107 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.27 rn0108 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.28 rn0109 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.29 rn0110 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.30 rn0111 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.31 rn0112 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.32 rn0113 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.33 rn0114 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.34 rn0115 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.35 rn0116 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
subpage chassis02 bladeChassis 02
172.16.131.60 rn0201 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.61 rn0202 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.62 rn0203 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
172.16.131.63 rn0204 # NOPROPRED:+cpu
NOPROPYELLOW:+memory
NOCOLUMNS:files,ports
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.
John Burk
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
Those who don't understand UNIX are condemned to reinvent
it, poorly.
--- Henry Spencer
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer