bmSearch Class
main class from which we call all methods/classes to parse, retrieve pertinent values and post then to an Elasticsearch engine.
def bmSearch.bmSearch.__init__ |
( |
|
self, |
|
|
|
kwargs |
|
) |
| |
__init__ :
constructor accept kwargs
**kwargs:
file : path to file to parse. I can be plain text, gzip or bzip2 compressed. By default what configured in /etc/bmSearch/config.py
method : how to read the file, 2 possibilities
- "file" : read the file and exit after reach end file. By default.
- "stream" : connect to the file and stream data. No exit while programm running
action : tell what to do, 2 cases
- "storeToELK" : to store in Elasticsearch instance configured in /etc/bmSearch/config.py
- "updateToELK" : to update in Elasticsearch instance data (deliveredRecip)
Constructor call mailLogParser(**kwargs), mailLogParser().getFileContent(), mailLogParser().parseContent() and mailLogParser().updateEntry()
31 def __init__(self,**kwargs):
34 constructor accept kwargs 37 file : path to file to parse. I can be plain text, gzip or bzip2 compressed. By default what configured in /etc/bmSearch/config.py 39 method : how to read the file, 2 possibilities 40 - "file" : read the file and exit after reach end file. By default. 41 - "stream" : connect to the file and stream data. No exit while programm running 43 action : tell what to do, 2 cases 44 - "storeToELK" : to store in Elasticsearch instance configured in /etc/bmSearch/config.py 45 - "updateToELK" : to update in Elasticsearch instance data (deliveredRecip) 47 Constructor call mailLogParser(**kwargs), mailLogParser().getFileContent(), mailLogParser().parseContent() and mailLogParser().updateEntry()