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

PagerTree not mapped loaders.py #2571

Open
AaronSeibert opened this issue Nov 18, 2019 · 0 comments
Open

PagerTree not mapped loaders.py #2571

AaronSeibert opened this issue Nov 18, 2019 · 0 comments

Comments

@AaronSeibert
Copy link

Setting up pagertree alerts today, I was getting an error:

Nov 18 20:57:04 dashboards elastalert[8878]: elastalert.util.EAException: Error initiating alert ['pagertree']: Could not import module pagertree: not enough values to unpack (expected 2, got 1) Nov 18 20:57:04 dashboards elastalert[8878]: During handling of the above exception, another exception occurred: Nov 18 20:57:04 dashboards elastalert[8878]: Traceback (most recent call last): Nov 18 20:57:04 dashboards elastalert[8878]: File "/usr/local/bin/elastalert", line 11, in <module> Nov 18 20:57:04 dashboards elastalert[8878]: load_entry_point('elastalert==0.2.1', 'console_scripts', 'elastalert')() Nov 18 20:57:04 dashboards elastalert[8878]: File "/usr/local/lib/python3.6/dist-packages/elastalert-0.2.1-py3.6.egg/elastalert/elastalert.py", line 2050, in main Nov 18 20:57:04 dashboards elastalert[8878]: client = ElastAlerter(args) Nov 18 20:57:04 dashboards elastalert[8878]: File "/usr/local/lib/python3.6/dist-packages/elastalert-0.2.1-py3.6.egg/elastalert/elastalert.py", line 140, in __init__ Nov 18 20:57:04 dashboards elastalert[8878]: self.rules = self.rules_loader.load(self.conf, self.args) Nov 18 20:57:04 dashboards elastalert[8878]: File "/usr/local/lib/python3.6/dist-packages/elastalert-0.2.1-py3.6.egg/elastalert/loaders.py", line 125, in load Nov 18 20:57:04 dashboards elastalert[8878]: raise EAException('Error loading file %s: %s' % (rule_file, e)) Nov 18 20:57:04 dashboards elastalert[8878]: elastalert.util.EAException: Error loading file /opt/elastalert/rules/heartbeat-monitor-down.yaml: Error initiating alert ['pagertree']: Could not import module pagertree: not enough values to unpack (expected 2, got 1)

I had to modify the loaders.py file adding the pagertree loader:

'pagertree': alerts.PagerTreeAlerter,

Once re-running setup.py and restarting elastalert all was then well.

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

1 participant