brunotm / elasticsplunk

A Search command to explore Elasticsearch data within Splunk.
MIT License
40 stars 25 forks source link

option scan=false is not working #15

Closed kaem2111 closed 6 years ago

kaem2111 commented 6 years ago

Thank you very much for the implementation of this elasticsplunk interface. Unfortunaly there is a small issue when executing the code in elasticsplunk.py (line 256):

        if self.scan:
            res = ....

Even if defined as bool in splunk, in python self.scan is a string and the if statement therefore always evaluates to true - the else branch is never executed. If you substitute it e.g. with

        if self.scan in ["true", "True", 1]:  

everything works fine.

brunotm commented 6 years ago

Hi @kaem2111,

Good catch! Thanks again.

brunotm commented 6 years ago

Fixed on master. Thanks!