Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rule can not be tested #106

Open
zffocussss opened this issue Jun 26, 2019 · 2 comments
Open

rule can not be tested #106

zffocussss opened this issue Jun 26, 2019 · 2 comments

Comments

@zffocussss
Copy link

/opt/elastalert/rules $ elastalert-test-rule test1.yaml
Traceback (most recent call last):
File "/usr/bin/elastalert-test-rule", line 11, in
load_entry_point('elastalert==0.2.0b2', 'console_scripts', 'elastalert-test-rule')()
File "/usr/lib/python2.7/site-packages/elastalert-0.2.0b2-py2.7.egg/elastalert/test_rule.py", line 441, in main
test_instance.run_rule_test()
File "/usr/lib/python2.7/site-packages/elastalert-0.2.0b2-py2.7.egg/elastalert/test_rule.py", line 408, in run_rule_test
conf = load_conf(args, defaults, overwrites)
File "/usr/lib/python2.7/site-packages/elastalert-0.2.0b2-py2.7.egg/elastalert/config.py", line 44, in load_conf
conf = yaml_loader(filename)
File "/usr/lib/python2.7/site-packages/PyStaticConfiguration-0.10.4-py2.7.egg/staticconf/loader.py", line 167, in yaml_loader
with open(filename) as fh:
TypeError: coercing to Unicode: need string or buffer, NoneType found

@mbassett
Copy link

mbassett commented Jun 26, 2019

To piggy back on this, it doesn't work in the webui either.

`
22:44:12.171Z ERROR elastalert-server:
TestController: Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main

    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/elastalert/elastalert/test_rule.py", line 445, in <module>
    main()
  File "/opt/elastalert/elastalert/test_rule.py", line 441, in main

    test_instance.run_rule_test()
  File "/opt/elastalert/elastalert/test_rule.py", line 408, in run_rule_test

    conf = load_conf(args, defaults, overwrites)
  File "elastalert/config.py", line 47, in load_conf

    configure_logging(args, conf)
  File "elastalert/config.py", line 106, in configure_logging

    if args.verbose and args.debug:

AttributeError: 'Namespace' object has no attribute 'verbose'\

`

@mbassett
Copy link

mbassett commented Jun 26, 2019

I just saw this in the release notes of 3.0.0beta

Note
This is a beta pre-release with ElasticSearch 7 support. As such there will be bugs, testing rules for example is currently broken in ElastAlert v0.2.0b2 (Yelp/elastalert#2204 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants