Xymon Mailing List Archive search

Where is the client data stored in hobbit server?

9 messages in this thread

list Ari Syrup · Wed, 10 Oct 2007 19:40:05 +0900 ·
Hello,

In the some html outputs of the each test there is a "Client data" link and
of course its data with it.....

I would like to implement a customized script to parse all the lines of the
"Client data" and send an alert if certain keyword matches. I think it would
be nice because you don't have to implement it in all the client
sides.....Definitely there are many people who are interested in it ???
And I can't figure out where the data is stored in the hobbit server side.


My question is,,,,Where is the "Client data" stored in the hobbit server
side? Please help me with finding it...
list Johann Eggers · Wed, 10 Oct 2007 13:11:05 +0200 ·
Hi,

 
the hostdata are stored in the data/hostdata/<hostname> directories...

 
But I think it's only saved if a red condition exists for that host.

 
-Johann-
quoted from Ari Syrup

 
From: Ari Syrup [mailto:user-9edad2bba057@xymon.invalid] 
Sent: Mittwoch, 10. Oktober 2007 12:40
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Where is the client data stored in hobbit server?

 
Hello,

In the some html outputs of the each test there is a "Client data" link
and of course its data with it.....

I would like to implement a customized script to parse all the lines of
the "Client data" and send an alert if certain keyword matches. I think
it would be nice because you don't have to implement it in all the
client sides.....Definitely there are many people who are interested in
it ??? 
And I can't figure out where the data is stored in the hobbit server
side.


My question is,,,,Where is the "Client data" stored in the hobbit server
side? Please help me with finding it...
list Ari Syrup · Wed, 10 Oct 2007 20:27:35 +0900 ·
Thank you, Johann,

I also was able to locate the directory with some part of the client data.

But I was also wondering maybe there should be the stored real time data
somewhere at least 5 minutes(client interval),,, or you can't view the real
data in the html.....


2007/10/10, Johann Eggers <user-769b09132207@xymon.invalid>:
quoted from Johann Eggers
 Hi,


the hostdata are stored in the data/hostdata/<hostname> directories…


But I think it's only saved if a red condition exists for that host.


-Johann-


*From:* Ari Syrup [mailto:user-9edad2bba057@xymon.invalid]
*Sent:* Mittwoch, 10. Oktober 2007 12:40
*To:* user-ae9b8668bcde@xymon.invalid
*Subject:* [hobbit] Where is the client data stored in hobbit server?


Hello,

In the some html outputs of the each test there is a "Client data" link
and of course its data with it.....

I would like to implement a customized script to parse all the lines of
the "Client data" and send an alert if certain keyword matches. I think it
would be nice because you don't have to implement it in all the client
sides.....Definitely there are many people who are interested in it ???
And I can't figure out where the data is stored in the hobbit server side.


My question is,,,,Where is the "Client data" stored in the hobbit server
side? Please help me with finding it...
list Henrik Størner · Wed, 10 Oct 2007 13:48:31 +0200 ·
quoted from Ari Syrup
On Wed, Oct 10, 2007 at 07:40:05PM +0900, Ari Syrup wrote:
I would like to implement a customized script to parse all the lines of the
"Client data" and send an alert if certain keyword matches. I think it would
be nice because you don't have to implement it in all the client
sides.....Definitely there are many people who are interested in it ???
And I can't figure out where the data is stored in the hobbit server side.

My question is,,,,Where is the "Client data" stored in the hobbit server
side? Please help me with finding it...
The client data are stored in memory.

There are two ways you can do this.

1) You can use the command
      bb 127.0.0.1 "clientlog HOSTNAME"
   to fetch the current client data, then do your processing.

2) (My recommended solution) Write your script as a Hobbit server-
   side extension, and run it on the server as
      bbcmd hobbitd_channel --channel=client YOURSCRIPT
   Your script would get all of the client data fed on STDIN,
   beginning with a line "@@client...|HOSTNAME|..." and 
   ending with "@@". Try running (as the hobbit user)
      bbcmd hobbitd_channel --channel=client cat
   and watch the data that is generated.


Regards,
Henrik
list Tom Kauffman · Wed, 10 Oct 2007 12:29:46 -0400 ·
We're starting to move to the new IBM P6 environment, so I started
looking at backing the 4.3 do_vmstat.c into 4.2.

This pretty well showed I'm not a C programmer.

However -- I added the two additional fields, cpu_ec and cpu_pc to the
AIX structure in the 4.2 do_vmstat.c, recompiled, and the result works
with the new P6 box. It will also work with new P5 or earlier systems,
as the two extra values will just stay at <NAN> in the RRD. For existing
older systems, I used 'rrdaddsource' from the RRD web site to add the
cpu_pc and cpu_ec datasets to my existing RRD and everything is working
just fine.

I did have to change the vmstat_ec and vmstat_pc graph entries -- the
4.3 code is doing a multiply by 100 that doesn't seem to be required.
The pc value is actual physical CPU usage and the ec value is percentage
of entitlement. In the short list below, this system is using between
0.01 and 0.02 physical CPUs and running between 7 and 17 percent of the
entitlement (set at 0.10 CPU)

Thanks for such a GREAT tool!

The AIX Doc on the two fields:

Beginning with AIX 5.3, the vmstat command reports the number of
physical processors consumed (pc), and the percentage of entitlement
consumed (ec), in Micro-Partitioning environments. These metrics will
only be displayed on Micro-Partitioning environments.

pc 	Number of physical processors consumed. Displayed only if the
partition is running with shared processor.
ec 	The percentage of entitled capacity consumed. Displayed only if
the partition is running with shared processor. Because the time base
over which this data is computed can vary, the entitled capacity
percentage can sometimes exceed 100%. This excess is noticeable only
with small sampling intervals.

And sample vmstats from my test system:

kthr    memory              page              faults              cpu
----- ----------- ------------------------ ------------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
pc    ec
 0  0 825268 603594   0   0   0   0    0   0  31  244 155  2  6 92  0
0.01   9.6
 1  0 825269 603591   0   0   0   0    0   0  24 7474 148  5  9 86  0
0.02  16.7
 1  0 825266 603594   0   0   0   0    0   0  19  297 153  3  4 92  0
0.01   9.5
 1  0 825125 603722   0   0   0   0    0   0  28 3514 152  5 11 84  0
0.02  17.7
 3  0 825037 603810   0   0   0   0    0   0  28  259 143  2  5 93  0
0.01   8.5
 1  0 825041 603806   0   0   0   0    0   0  23  223 139  2  4 94  0
0.01   7.6
 2  0 825040 603807   0   0   0   0    0   0  27  236 156  2  7 91  0
0.01  10.6
 4  0 825041 603806   0   0   0   0    0   0  24  206 142  1  4 95  0
0.01   6.8
 1  0 824855 603992   0   0   0   0    0   0  25  262 154  3  4 93  0
0.01   8.8
 1  0 824851 603996   0   0   0   0    0   0  24  201 144  2  4 94  0
0.01   7.5
CONFIDENTIALITY NOTICE:  This email and any attachments are for the 
exclusive and confidential use of the intended recipient.  If you are not
the intended recipient, please do not read, distribute or take action in 
reliance upon this message. If you have received this in error, please 
notify us immediately by return email and promptly delete this message 
and its attachments from your computer system. We do not waive  
attorney-client or work product privilege by the transmission of this
message.
list Stef Coene · Wed, 10 Oct 2007 18:42:28 +0200 ·
quoted from Tom Kauffman
On Wednesday 10 October 2007, Kauffman, Tom wrote:
We're starting to move to the new IBM P6 environment, so I started
looking at backing the 4.3 do_vmstat.c into 4.2.

This pretty well showed I'm not a C programmer.

However -- I added the two additional fields, cpu_ec and cpu_pc to the
AIX structure in the 4.2 do_vmstat.c, recompiled, and the result works
with the new P6 box. It will also work with new P5 or earlier systems,
as the two extra values will just stay at <NAN> in the RRD. For existing
older systems, I used 'rrdaddsource' from the RRD web site to add the
cpu_pc and cpu_ec datasets to my existing RRD and everything is working
just fine.
Take a look at
http://www.docum.org/twiki/bin/view/Hobbit/AixPower5
and
http://www.docum.org/twiki/bin/view/Hobbit/AixTips
if you are running hobbit client on aix.


Stef
list Tom Kauffman · Wed, 10 Oct 2007 15:01:02 -0400 ·
The AixPower5 is where I ended up, except that I'm not stripping the
decimal point in do_vmstat.c. The vmstat_ec values look correct, but the
rrd dump shows a value of zero for vmstat_pc instead of the expected
1.00000000e-02. 

Time to play around a bit more; I'll add the decimal strip code and see
what I get as a result.

Thanks for the pointer to the AIX tips -- I've got an Oracle DBA that
will enjoy the memory graphs. I obviously need to spend more time
looking around :-)

Tom

-----Original Message-----
From: Stef Coene [mailto:user-dbffe946c0f4@xymon.invalid] 
Sent: Wednesday, October 10, 2007 12:42 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Henrik -- some notes on AIX and the 4.3
do_vmstat.c
quoted from Stef Coene

On Wednesday 10 October 2007, Kauffman, Tom wrote:
We're starting to move to the new IBM P6 environment, so I started
looking at backing the 4.3 do_vmstat.c into 4.2.

This pretty well showed I'm not a C programmer.

However -- I added the two additional fields, cpu_ec and cpu_pc to the
AIX structure in the 4.2 do_vmstat.c, recompiled, and the result works
with the new P6 box. It will also work with new P5 or earlier systems,
as the two extra values will just stay at <NAN> in the RRD. For
existing
older systems, I used 'rrdaddsource' from the RRD web site to add the
cpu_pc and cpu_ec datasets to my existing RRD and everything is
working
just fine.
Take a look at
http://www.docum.org/twiki/bin/view/Hobbit/AixPower5
and
http://www.docum.org/twiki/bin/view/Hobbit/AixTips
if you are running hobbit client on aix.


Stef


CONFIDENTIALITY NOTICE:  This email and any attachments are for the 
exclusive and confidential use of the intended recipient.  If you are not
the intended recipient, please do not read, distribute or take action in 
reliance upon this message. If you have received this in error, please 
notify us immediately by return email and promptly delete this message 
and its attachments from your computer system. We do not waive  
attorney-client or work product privilege by the transmission of this
message.
list Stef Coene · Wed, 10 Oct 2007 21:32:33 +0200 ·
quoted from Tom Kauffman
On Wednesday 10 October 2007, Kauffman, Tom wrote:
The AixPower5 is where I ended up, except that I'm not stripping the
decimal point in do_vmstat.c. The vmstat_ec values look correct, but the
rrd dump shows a value of zero for vmstat_pc instead of the expected
1.00000000e-02.

Time to play around a bit more; I'll add the decimal strip code and see
what I get as a result.

Thanks for the pointer to the AIX tips -- I've got an Oracle DBA that
will enjoy the memory graphs. I obviously need to spend more time
looking around :-)
I have lots of AIX enhancements (etherchannel, errpt, DS4 statitsics, iostat, 
vmstat, hacmp, ...) but I don't have the time to document them.  Some of the 
scripts are integrated in other custom monitor scripts.
I can not publish the scripts and information because this will not make my 
boss not happy :( 


Stef
list Ari Syrup · Thu, 11 Oct 2007 08:31:07 +0900 ·
Henrik,

Thank you very much!! The information is really helpful for me not only to
implement the script but to understand the hobbit design.

I really look forward to the version 4.3.0 release. ( Hope all the regex
work fine !! ).


2007/10/10, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid>:
quoted from Ari Syrup
On Wed, Oct 10, 2007 at 07:40:05PM +0900, Ari Syrup wrote:
I would like to implement a customized script to parse all the lines of
the
"Client data" and send an alert if certain keyword matches. I think it
would
be nice because you don't have to implement it in all the client
sides.....Definitely there are many people who are interested in it ???
And I can't figure out where the data is stored in the hobbit server
side.

My question is,,,,Where is the "Client data" stored in the hobbit server
side? Please help me with finding it...
The client data are stored in memory.

There are two ways you can do this.

1) You can use the command
      bb 127.0.0.1 "clientlog HOSTNAME"
   to fetch the current client data, then do your processing.

2) (My recommended solution) Write your script as a Hobbit server-
   side extension, and run it on the server as
      bbcmd hobbitd_channel --channel=client YOURSCRIPT
   Your script would get all of the client data fed on STDIN,
   beginning with a line "@@client...|HOSTNAME|..." and
   ending with "@@". Try running (as the hobbit user)
      bbcmd hobbitd_channel --channel=client cat
   and watch the data that is generated.


Regards,
Henrik