This grabber will listen to a log file, and extract data from it. It, of course, depends on an instance of LogParser to extract that data from the file.
net.pieroxy.conkw.webapp.grabbers.logfile.TailLogFileGrabbertaillog{
"implementation":"net.pieroxy.conkw.webapp.grabbers.logfile.TailLogFileGrabber",
"config": {
"filename":"/home/pieroxy/.conkw/logs/http.log",
"parserClassName":"net.pieroxy.conkw.webapp.grabbers.logfile.parsers.HttpLogFileParser",
"accumulator":"multi([name(sizehist,log125hist(size,1000,1000000)),name(byct,stablekey(contentType,count(),3)),name(byuri,stablekey(uri,count(),3)),sum(size,0),count(),sum(time,0)])"
}
}
filename, without much surprise, is the file this instance should monitor.parserClassName represents the fully qualified class name used to parse those logs and output a LogRecord out of them. See the Provide your classes documentation to see how you can write your own parsers.accumulator is an expression allowing you to tell conkw how you want those datapoints aggregated. See Aggregating multi dimensional datapoints to understand how you can aggregate data.While it may be of some use, the net.pieroxy.conkw.webapp.grabbers.logfile.parsers.HttpLogFileParser is more meant as an example of log parser to help you write your own. It is able to parse conkw http log file. Here is the data it extracts, for each line in the file:
For each line, the values extracted are:
For each line, the dimensions extracted are:
/.