lvk (class) ∞
-
class
lvk
(log, record, settings=False, plugins=False)[source] ∞ Bases:
object
The LVK event parser
- Key Arguments:
log
– loggersettings
– the settings dictionaryrecord
– the kafka record to parse.plugins
– run the plugin script found in~/.config/gocart/plugins
every time an alert is read
Usage:
To setup your logger and settings, please use the
fundamentals
package (see tutorial here).To parse LVK kafka alerts, use the following:
from gocart.parsers import lvk parser = lvk( log=log, record=record, settings=settings, plugins=True ).parse()
Methods
filter_alert
(alert)filter the alert record with filtering criteria in the settings file and return true (pass) or false (fail)
parse
()*parse the lvk events and write meta data and maps to file