Is there a way to clone host definitions in bb-hosts?
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|mysqlthreadsconnected|mysqlthreadrunqueue|mysqlopenfiles|mysqlopentables|mysqlopenedtables|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
Get familiar with bash or tcsh =)
On Tue, Jun 10, 2008 at 7:29 PM, John Burk <john.d.burk at gmail.com> 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|mysqlthreadsconnected|mysqlthreadrunqueue|mysqlopenfiles|mysqlopentables|mysqlopenedtables|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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
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 <josh at imaginenetworksllc.com>:
Get familiar with bash or tcsh =)
On Tue, Jun 10, 2008 at 7:29 PM, John Burk <john.d.burk at gmail.com> 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|mysqlthreadsconnected|mysqlthreadrunqueue|mysqlopenfiles|mysqlopentables|mysqlopenedtables|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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
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 <john.d.burk at gmail.com> 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 <josh at imaginenetworksllc.com>:
Get familiar with bash or tcsh =)
On Tue, Jun 10, 2008 at 7:29 PM, John Burk <john.d.burk at gmail.com> 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|mysqlthreadsconnected|mysqlthreadrunqueue|mysqlopenfiles|mysqlopentables|mysqlopenedtables|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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
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
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
Our cluster nodes are node000 -> node999
We do the following:
for I in seq -w 0 999; do echo "getent hosts node$I | cut -d' ' -f1
node$I # ssh etc"; done > /tmp/output.txt
CC
-----Original Message----- From: Josh Luthman [mailto:josh at imaginenetworksllc.com] Sent: Wednesday, 11 June 2008 9:15 AM To: hobbit at hswn.dk 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 <john.d.burk at gmail.com> 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 <josh at imaginenetworksllc.com>:
Get familiar with bash or tcsh =)
On Tue, Jun 10, 2008 at 7:29 PM, John Burk <john.d.burk at gmail.com> 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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
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
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Colin gets what I'm saying! That is exactly what I was getting to.
On Tue, Jun 10, 2008 at 9:26 PM, Coe, Colin C. (Unix Engineer) <Colin.Coe at woodside.com.au> wrote:
Our cluster nodes are node000 -> node999
We do the following:
for I in
seq -w 0 999; do echo "getent hosts node$I | cut -d' ' -f1node$I # ssh etc"; done > /tmp/output.txtCC
-----Original Message----- From: Josh Luthman [mailto:josh at imaginenetworksllc.com] Sent: Wednesday, 11 June 2008 9:15 AM To: hobbit at hswn.dk 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 <john.d.burk at gmail.com> 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 <josh at imaginenetworksllc.com>:
Get familiar with bash or tcsh =)
On Tue, Jun 10, 2008 at 7:29 PM, John Burk <john.d.burk at gmail.com> 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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
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
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
Not sure if this will help but take a look at the .default. section in the bb-hosts man page. Seems that all of the odd bits could be defined there, but you would still have large lists of 'ip hostname #'.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I use the Hobbit Server 4.2. Cause we have some staff here, who just only have to monitor our server status on Hobbit, I would like to disable the Menu of the Hobbit Status.
I mean the menu, where it is written the "Views", "Reports", "Administration" and "Help" For the User Login, I have installed a .htaccess file. Is it possible to disable the Menu by soem user depend rules?
Regards
Maik
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIUKxQr4r+EhimPOURAvdgAKDJPivi8Tv2bH82hMMqIYNCZKEOTQCgxEnn 8ONpXEGZnZoHR8D81eB+7F0= =lYMq -----END PGP SIGNATURE-----
Disable access to certain pages via .htacess and the modifiy the menu_items.js file.
~: cat menu_items.js
var MENU_ITEMS = [ ['Views', null, null, ['Main view', '/bb.html'], ['All non-green view', '/bb2.html'], ['Critical systems', '/cgi-bin/hobbit-nkview.sh'], ], ];
May not be exactly what you are looking for, works for me.
Regards,
-t
Heinelt Maik wroteEdit menu:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I use the Hobbit Server 4.2. Cause we have some staff here, who just only have to monitor our server status on Hobbit, I would like to disable the Menu of the Hobbit Status.
I mean the menu, where it is written the "Views", "Reports", "Administration" and "Help" For the User Login, I have installed a .htaccess file. Is it possible to disable the Menu by soem user depend rules?
Regards
Maik
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIUKxQr4r+EhimPOURAvdgAKDJPivi8Tv2bH82hMMqIYNCZKEOTQCgxEnn 8ONpXEGZnZoHR8D81eB+7F0= =lYMq -----END PGP SIGNATURE-----
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Tue, June 10, 2008 20:50, John Burk 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.
Same background here, and my thoughts about that response were less charitable than yours.
You probably know that whatever you're doing in vi (or vim) with search and replace could be scripted using a sed pipe and very similar syntax to your vi commands. AFAIK, you'd have to template this yourself and write such a script to transform your templates into bb-host includes. I hope someone else on the list can be more helpful than that.
regards, j.
Hodie natus est radici frater.
Wait - could you not just sort the entire file by $1 and then wc and have it output what has occured 2 or more times?
On 6/10/08, Hobbit User in Richmond <hobbit at epperson.homelinux.net> wrote:
On Tue, June 10, 2008 20:50, John Burk 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.
Same background here, and my thoughts about that response were less charitable than yours.
You probably know that whatever you're doing in vi (or vim) with search and replace could be scripted using a sed pipe and very similar syntax to your vi commands. AFAIK, you'd have to template this yourself and write such a script to transform your templates into bb-host includes. I hope someone else on the list can be more helpful than that.
regards, j.
Hodie natus est radici frater.
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
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.
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
I spoke too soon.... Seems that it only worked since I copied an existing host (with a defined 'dns' test). So I had 2 lines of the same host, both testing dns, but probably not from $foo on the second line. Changing $foo to smtp did not work. Oh well, live and learn. Sorry about the extra email folks.
Tim McCloskey wrote:
bb-hosts:
$foo="dns" ipaddress servername # $foo
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
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
On Wednesday 11 June 2008 01:29:21 John Burk 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...
[...]
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?
No. This is the biggest weakness in Hobbit, but it is also one of the BigBrother-compatibility features.
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.
But, do you want it only for bb-hosts (IOW, which tests to run and which tests to not propagate), or also for thresholds, log/file/dir checks, alerts etc?
Henrik has mentioned that the configuration issues need to be looked at, but it's a tradeoff between simplicity+repetitive, and excessively complex.
Regards, Buchan
participants (7)
-
bgmilne@staff.telkomsa.net
-
Colin.Coe@woodside.com.au
-
devzero@cox.net
-
hobbit@epperson.homelinux.net
-
john.d.burk@gmail.com
-
josh@imaginenetworksllc.com
-
maik@vegasystems.com