Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | virukav@gmail.com |
The module provides the generic api to parse the logs, to store the parsed data in the IntervalMap and to query data from the IntervalMap based on the given time interval.
- data Interval v = Interval {}
- type LogRequest = Maybe LogInterval
- merge :: LogEntry a => LogTree a -> LogTree a -> LogTree a
- parse :: LogEntry a => FilePath -> IO (LogTree a)
- hints :: (Averageable a, LogEntry a) => LogRequest -> ConfigParser -> LogTree a -> [Hint]
- fmtHints :: [Hint] -> Doc
- average :: (Averageable a, LogEntry a) => LogRequest -> LogTree a -> a
- list :: LogEntry a => LogRequest -> LogTree a -> [a]
- intervals :: LogEntry a => LogRequest -> LogTree a -> [LogInterval]
- hasInterval :: LogEntry a => LogRequest -> LogTree a -> Bool
- mkInterval :: UTCTime -> UTCTime -> LogInterval
Documentation
data Interval v
A closed interval. The lower bound should be less than or equal to the higher bound.
type LogRequest = Maybe LogIntervalSource
The request time interval to query sysmon reports. If the value of the request interval is Nothing the default max time interval request will be used. See function maxInterval below.
parse :: LogEntry a => FilePath -> IO (LogTree a)Source
Generic parse the log files and store the data in the log tree. To parse sysmon logs use parseSysmon from SysmonLog package. This package implements Sysmon instance of LogEntry class (see Sample.hs)
hints :: (Averageable a, LogEntry a) => LogRequest -> ConfigParser -> LogTree a -> [Hint]Source
Max interval to cover all intervals in the log tree
Get hints for the average sysmon report corresponding to the request time interval. To override the default hints parameters use ConfigFile api. See HConfig data type in SysmonTypes package for the list of the configuartion parameters.
average :: (Averageable a, LogEntry a) => LogRequest -> LogTree a -> aSource
Average sysmon report corresponding to the requested time interval
list :: LogEntry a => LogRequest -> LogTree a -> [a]Source
Get log reports which intersecs with the requested time interval
intervals :: LogEntry a => LogRequest -> LogTree a -> [LogInterval]Source
Get intervals which intersect with the requested interval
hasInterval :: LogEntry a => LogRequest -> LogTree a -> BoolSource
Check if the log tree contains an interval corresponding to the requested time interval
mkInterval :: UTCTime -> UTCTime -> LogIntervalSource
Create log time interval