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

Add prometheus metrics #2622

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nicholasgibson2
Copy link

Replacement PR for #2211

abhishekjiitr and others added 3 commits April 17, 2019 03:10
Start exporting metrics in Prometheus format on port 9090.
Relevant Metrics added, most of the metrics have a *rule_name*_label:
(All metrics except 6th are per rule)
1. Number of hits
2. Number of matches
3. Time taken to evaluate rule
4. Number of alerts sent
5. Number of alerts not sent
6. Total Number of elastalert_errors
7. Number of silenced alerts
@nicholasgibson2 nicholasgibson2 marked this pull request as ready for review December 19, 2019 22:46
@nicholasgibson2
Copy link
Author

@andres-tw FYI

@kannanvr
Copy link

kannanvr commented Feb 4, 2020

Hi All, When the metrics part will be available to use. We are all eagerly awiting for this PR to get merge... Please do the needful

GIBSON, NICHOLAS R and others added 2 commits February 4, 2020 13:06
@Shashankft9
Copy link

Just mentioning this here as well:
abhishekjiitr#1 (comment)

@nicholasgibson2
Copy link
Author

Can someone assist me with the build issues?

@abhishekjiitr
Copy link
Contributor

@nicholasgibson2 the code seems to be running fine, flake8 is exiting with NZEC because of some code-style errors:

./elastalert/prometheus_wrapper.py:3:1: E302 expected 2 blank lines, found 1

./elastalert/prometheus_wrapper.py:15:26: E221 multiple spaces before operator

./elastalert/prometheus_wrapper.py:16:23: E221 multiple spaces before operator

./elastalert/prometheus_wrapper.py:17:26: E221 multiple spaces before operator

./elastalert/prometheus_wrapper.py:18:29: E221 multiple spaces before operator

./elastalert/prometheus_wrapper.py:19:30: E221 multiple spaces before operator

./elastalert/prometheus_wrapper.py:20:141: E501 line too long (144 > 140 characters)

./elastalert/prometheus_wrapper.py:21:25: E221 multiple spaces before operator

./elastalert/prometheus_wrapper.py:22:141: E501 line too long (144 > 140 characters)

./elastalert/elastalert.py:58:1: E302 expected 2 blank lines, found 1

./elastalert/elastalert.py:108:141: E501 line too long (145 > 140 characters)

./elastalert/elastalert.py:2055:9: F841 local variable 'p' is assigned to but never used

Check detailed log here: https://travis-ci.org/Yelp/elastalert/jobs/648613367?utm_medium=notification&utm_source=github_status

@nicholasgibson2
Copy link
Author

Alright fixed the build issues

@andres-tw
Copy link

@nicholasgibson2 have you thought about submitting this PR to https://github.com/jertel/elastalert ?

@nicholasgibson2
Copy link
Author

@andres-tw I'll check it out!

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

Successfully merging this pull request may close these issues.

5 participants