-
Notifications
You must be signed in to change notification settings - Fork 303
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 support of Graylog GELF Alerter #1050
Conversation
Thanks for the submission. I recommend looking at the |
Yep, till the end of the week will do it |
Minor fixes in GelfAlerter Add tests
@jertel |
Thanks for adding the unit tests. Will you please also update the schema.yaml file, with the expected parameter data types? Search for "discord" or "alerta" for examples of what is needed. |
Ready. @nsano-rururu many thanks for your edits, with them it is better. |
elastalert/alerters/gelf.py
Outdated
self.additional_headers = self.rule.get('gelf_http_headers') | ||
self.ca_cert = self.rule.get('gelf_ca_cert') | ||
self.http_ignore_ssl_errors = self.rule.get('http_ignore_ssl_errors', False) | ||
self.timeout = self.rule.get('timeout', 30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About settings Won't you add validation settings that are referenced when rules are executed? If the data type and input value variations are fixed, add settings.
https://github.com/jertel/elastalert2/blob/master/elastalert/schema.yaml
example
gelf_ignore_ssl_errors: {type: boolean}
gelf_type: {type: string, enum: ['http', 'tcp']}
gelf_version: {type: string}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is gelf_log_level a number? Have you decided on a range? If the minimum and maximum are fixed, we recommend adding the following settings to schema.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About gelf_version
- i didn't want to add a specified version list to schemas. The latest version is 1.1 and it is default now and this version was released in 2013.
About gelf_log_level
- good point. I'm adding a range now.
Description
Checklist
make test-docker
with my changes.