logstreamtool
v1.1.1
Published
Tool for dealing with logs as a stream of events for analysis
Maintainers
Readme
logstreamtool
Process (json stream) logs in a streaming fashion, doing analyses like summing numbers of events.
Use
logstreamtool [--bole] [--sum hour] < logfileFlags
--boleProcess timestamps in thetimefield and parse them as ISO8601 dates.--sum periodSum the values of each field in the period.--mean periodTake the mean of the values in each period.--mode periodTake the mode of the values in each period.--median periodTake the median of the values in each period.--variance periodTake the variance of the values in each period.--stdev periodTake the standard deviation of the values in each period.--min periodTake the minimum value in each period.--max periodTake the maximum value in each period.--count periodCount the occurances of each key in the period.--first periodTake the first value in each period.--last periodTake the last value in each period.--sample periodTake a random value from each period.
Periods
Any period accepted by floordate should work.
- s, sec, secs, second, seconds
- m, min, mins, minute, minutes
- h, hr, hrs, hour, hours
- d, day, days
- w, wk, wks, week, weeks
- M, mon, mons, month, months
- q, qtr, qtrs, quarter, quarters
- y, yr, yrs, year, years
Examples
logstreamtool --bole --sum minute < logfileRead a log file written by bole, and sum
the values of each field over each minute.
