Shirefolk:
I am playing with the nifty new 4.2 features, and was trying to get the "linecount" function to work. I *thought* I could maybe use this to track the number of entries in a file, and perhaps graph over time, but I am starting to suspect that Henrik meant linecount for something else.
I see where you configure client-local.cfg with:
linecount:<filename>
<handle>:<regex>
This should alert the Hobbit agent to start grepping <filename> for <regex> and somehow bind the count to <handle>?
Then what? Do you configure something in hobbit-clients.cfg to match this?
I tried:
LOG <filename> .* COLOR=GREEN
To see what would happen, but nothing did...
GLH
On Thu, Aug 24, 2006 at 03:41:17PM -0500, Hubbard, Greg L wrote:
I am playing with the nifty new 4.2 features, and was trying to get the "linecount" function to work. I *thought* I could maybe use this to track the number of entries in a file, and perhaps graph over time, but I am starting to suspect that Henrik meant linecount for something else.
No, the general idea was that linecount was a way of doing grep blabla myfile | wc -l and get this into a graph.
I see where you configure client-local.cfg with:
linecount:<filename> <handle>:<regex>
This should alert the Hobbit agent to start grepping <filename> for <regex> and somehow bind the count to <handle>?
Yes. What it ends up doing is putting a section into the client message. In my test configuration I have this in the client-local.cfg file
linecount:/var/log/messages kbd atkbd.c timechg system.time.change
(you can use space to delimit the <handle> from the <regex>, or colon) which gives me this in the client data:
[linecount:/var/log/messages] kbd: 0 timechg: 16
Then what? Do you configure something in hobbit-clients.cfg to match this?
No, it should actually happen by itself. It generates an RRD file for each of the linecount "<handle>" values. So in my example, I'll get these two RRD files: lines.,var,log,messages#kbd.rrd and lines.,var,log,messages#timechg.rrd
and if you have the 4.2 default settings for TEST2RRD and GRAPHS, then this should result in a graph of the linecounts on your "trends" page for the host.
Regards, Henrik
Those were some good hints!
A) the graphs are there in the trends page -- I just didn't know to go look there.
B) I am specifying the regex all wrong.
C) Now I know where to look to verify my configuration
GLH
PS -- I've noticed a number of blemishes in the man pages, etc. -- how would you like us to suggest corrections, or is there some way we can help share the load?
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, August 24, 2006 4:48 PM To: hobbit at hswn.dk Subject: Re: [hobbit] How does linecount work?
On Thu, Aug 24, 2006 at 03:41:17PM -0500, Hubbard, Greg L wrote:
I am playing with the nifty new 4.2 features, and was trying to get the "linecount" function to work. I *thought* I could maybe use this to track the number of entries in a file, and perhaps graph over time,
but I am starting to suspect that Henrik meant linecount for something else.
No, the general idea was that linecount was a way of doing grep blabla myfile | wc -l and get this into a graph.
I see where you configure client-local.cfg with:
linecount:<filename> <handle>:<regex>
This should alert the Hobbit agent to start grepping <filename> for <regex> and somehow bind the count to <handle>?
Yes. What it ends up doing is putting a section into the client message. In my test configuration I have this in the client-local.cfg file
linecount:/var/log/messages kbd atkbd.c timechg system.time.change
(you can use space to delimit the <handle> from the <regex>, or colon) which gives me this in the client data:
[linecount:/var/log/messages] kbd: 0 timechg: 16
Then what? Do you configure something in hobbit-clients.cfg to match this?
No, it should actually happen by itself. It generates an RRD file for each of the linecount "<handle>" values. So in my example, I'll get these two RRD files: lines.,var,log,messages#kbd.rrd and lines.,var,log,messages#timechg.rrd
and if you have the 4.2 default settings for TEST2RRD and GRAPHS, then this should result in a graph of the linecounts on your "trends" page for the host.
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Thu, Aug 24, 2006 at 05:03:17PM -0500, Hubbard, Greg L wrote:
PS -- I've noticed a number of blemishes in the man pages, etc. -- how would you like us to suggest corrections, or is there some way we can help share the load?
If you haven't tried editing man-pages before, they are really just text files with some special markup commands in them. So if you can edit the original file and just correct the text, that will be fine. BTW, if you edited the hobbitd/hobbitd.8 man-page, then you can test the edits with
nroff -man hobbitd/hobbitd.8 | more
to see what it would look like.
By far the easiest for me is if you can create a "diff" file between the original and the corrected man-page. And if you can do it in the "unified" diff format supported by the GNU diff utility, then it's perfect. Just save the original file before you edit it, then when you're done editing run
diff -u originalfile newfile
and send me the output. I've looked through so many diff's that my brain can see right away what you're changing with the diff, and that makes it very easy to proof-read before committing your changes.
Regards, Henrik
participants (2)
-
greg.hubbard@eds.com
-
henrik@hswn.dk