How do you check the status from other column from scripts?
list Aulestia Jimmy
How can i check or query the values from a other column in a script? I wooul like to execute a script1 that create the COLUMN 1, this script1 use the status, maybe COLOR o hobbitgraph variable from a COLUMN2 Greetings, Jimmy Aulestia ADMINISTRACION 0&M PLATAFORMA DE VOZ Movil: XX XXX XXXX Oficina: XXXXXXXXX / XXXXXXX - ext XXXX user-d9ec8fc5bab2@xymon.invalid
list Josh Luthman
I don't write scripts but maybe you could curl the status page and look at the background (it's red or green based on condition).
▸
On 11/26/09, Aulestia Jimmy <user-d9ec8fc5bab2@xymon.invalid> wrote:How can i check or query the values from a other column in a script? I wooul like to execute a script1 that create the COLUMN 1, this script1 use the status, maybe COLOR o hobbitgraph variable from a COLUMN2 Greetings, Jimmy Aulestia ADMINISTRACION 0&M PLATAFORMA DE VOZ Movil: XX XXX XXXX Oficina: XXXXXXXXX / XXXXXXX - ext XXXX user-d9ec8fc5bab2@xymon.invalid
--
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
"The secret to creativity is knowing how to hide your sources."
--- Albert Einstein
list Ralph Mitchell
If you have access to the server, you can query the status table a lot
easier than that. Look in the man page for the bb command. You'll use
something like:
server/bin/bb localhost 'hobbitdboard'
There's a bunch of arguments you can pass to pick out information by column
(test name), host name, color, &c.
Once you've worked out what you want, you can have your script launched by
xymon at regular intervals, in which case you'd use:
$BB $BBDISP 'hobbitdboard arg1 arg2 etc"
Ralph Mitchell
On Thu, Nov 26, 2009 at 8:43 PM, Josh Luthman
▸
<user-4c45a83f15cb@xymon.invalid>wrote:
I don't write scripts but maybe you could curl the status page and look at the background (it's red or green based on condition). On 11/26/09, Aulestia Jimmy <user-d9ec8fc5bab2@xymon.invalid> wrote:How can i check or query the values from a other column in a script? I wooul like to execute a script1 that create the COLUMN 1, this script1 use the status, maybe COLOR o hobbitgraph variable from a COLUMN2 Greetings, Jimmy Aulestia ADMINISTRACION 0&M PLATAFORMA DE VOZ Movil: XX XXX XXXX Oficina: XXXXXXXXX / XXXXXXX - ext XXXX user-d9ec8fc5bab2@xymon.invalid-- Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX "The secret to creativity is knowing how to hide your sources." --- Albert Einstein
list Buchan Milne
▸
On Friday, 27 November 2009 02:32:13 Aulestia Jimmy wrote:
How can i check or query the values from a other column in a script?
Start with 'man bb' ... What scripting language are you planning on using? Shell scripting? I have an initial perl module which should make it easy to do something like this in perl (without executing bb), but I haven't tried something like this in it. If you are considering perl, I would make it available to get some feedback ..
▸
I wooul like to execute a script1 that create the COLUMN 1, this script1 use the status, maybe COLOR
If you just want to combine some existing tests, you can have a look at bbcombotest. Enable the task in hobbitlaunch.cfg, and see 'man bbcombotest' and 'man bbcombotest.cfg'
o hobbitgraph variable from a COLUMN2
If you want values from the graphs, you need to get them out of the rrd files. In shell scripts, you would use 'rrdtool fetch', see 'man rrdfetch'. In perl, you could use the perl RRD module. AFAIK, thresholds from RRD files is on the roadmap for Xymon, which might in future allow you to do this without scripting. Regards, Buchan
list Matthew Moldvan
I recently found the bb command with the hobbitdboard to work pretty well for grabbing info on a specific test and specific host:
# ./bbcmd
# bb 136.180.70.203 'hobbitdboard <full_host_name_as_in_bb-hosts>.conn' <full_host_name_as_in_bb-hosts>|conn|green|OrdAstLe|1258268784|1260293536|1260295336|0|0|136.180.70.203|-1|green <!-- [flags:OrdAstLe] --> Tue Dec 8 12:31:25 2009 conn ok
// notice the single quotes for the DATA area, as the "bb" command only takes two arguments, you have to encase these in quotes
Getting that command to run in a script is a little more complex and required me to do an su to the xymon user ...
CMD='/usr/lib64/xymon/server/bin/bb 127.0.0.1 "drop '${HOSTNAME}'"'
echo ${CMD}
su - xymon -c "${CMD}"
Some other useful stuff is in there too, check out http://hobbitmon.sourceforge.net/docs/man1/bb.1.html.
Hope that helps.
Unix System Administrator
Computer Science Corporation
General Dynamics Land Systems
XXXXX Mound Rd.
Sterling Heights, MI. 48310
Desk: (XXX) XXX-XXXX
Oracle IM: moldvanm
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
[hobbit] How do you check the status from other column from scripts?
Aulestia Jimmy to:
hobbit
11/26/2009 08:36 PM
Please respond to hobbit
▸
How can i check or query the values from a other column in a script?
I wooul like to execute a script1 that create the COLUMN 1, this script1 use the status, maybe COLOR o hobbitgraph variable from a COLUMN2
Greetings,
Jimmy Aulestia
ADMINISTRACION 0&M PLATAFORMA DE VOZ Movil: XX XXX XXXX
Oficina: XXXXXXXXX / XXXXXXX - ext XXXX
user-d9ec8fc5bab2@xymon.invalid
En Telefónica-Movistar nos sentimos orgullosos de ser la Mejor Empresa para Trabajar en el Ecuador - Ranking Great Place To Work 2008
list Thomas R. Brand
I would like to set up a check for some processes to change color only if the process has been 'down' for more than '15' minutes (eg more than 3 poll periods.) I have over 2500 servers located in different time zones from AST thru HST. Various jobs/processes are shut down for 5-15 minutes each day at various times throughout the day on each server. We don't want to generate any events on the bb2.html page if these jobs are only down for less than 15 minutes and then start back up. Running version Xymon 4.3.0-0.beta2 <http://hobbitmon.sourceforge.net/> I tried to set "DURATION>16" in hobbit-clients.cfg : PROC "%.*ssh " 0 3 red TRACK=ssh DURATION>16 but it seems to be ignored # ~xymon/server/bin/bbcmd ~xymon/server/bin/hobbitd_client --dump-config | head -20 Shows: PROC "%.*ssh " 0 3 red TRACK=ssh HOST=s09trbrxs (line: 386) I know the DURATION qualifier will work in the hobbit-alerts.cfg; is there an equivalent setting in the hobbit-clients.cfg section for the PROC section? Thanks, Tom Brand Disclaimer: 1) all opinions are my own, 2) I may be completely wrong, 3) my advice is worth at least as much as what you are paying for it, or your money cheerfully refunded.