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

Change Zabbix alerter #820

Merged
merged 6 commits into from
Apr 22, 2022
Merged

Change Zabbix alerter #820

merged 6 commits into from
Apr 22, 2022

Conversation

timeforplanb123
Copy link
Contributor

@timeforplanb123 timeforplanb123 commented Apr 20, 2022

Description

Add the ability to specify zbx_host from available elasticsearch field.

By default, zabbix alerter send "1" to single host with specified zbx_host hostname. For a large number of hosts in zabbix, it would be convenient to specify zbx_host value from available elasticsearch field.

More details - #812

Checklist

  • I have reviewed the contributing guidelines.
  • I have included unit tests for my changes or additions.
  • I have successfully run make test-docker with my changes.
  • I have manually tested all relevant modes of the change in this PR.
  • I have updated the documentation.
  • I have updated the changelog.

Questions or Comments

- add new option zbx_host_from_field for zabbix alerter
- update docs for zabbix alerter
- add new tests to zabbix_test.py for new zbx_host_from_field option
@nsano-rururu
Copy link
Collaborator

Add the following verification check settings.
https://github.com/jertel/elastalert2/blob/master/elastalert/schema.yaml#L688

zbx_host_from_field: {type: boolean}

@timeforplanb123
Copy link
Contributor Author

Added

@jertel
Copy link
Owner

jertel commented Apr 21, 2022

@nsano-rururu are you ok with the style changes being made with this commit? We usually ask that contributors adopt the existing style already used within the source code, to avoid having a mixture of varying coding styles within the project. If that's not important to you we can accept it as-is.

Ex:
image

@nsano-rururu
Copy link
Collaborator

If you want to modify existing code, it's best to follow your existing coding style.

@timeforplanb123
Copy link
Contributor Author

So I need to change the black formatted code and return to the current style?

@jertel
Copy link
Owner

jertel commented Apr 21, 2022

That screenshot I pasted was a small example. What we would prefer is to undo all of your formatting changes, and only submit the logic changes required for your PR functionality.

@timeforplanb123
Copy link
Contributor Author

Fixed :)

@jertel
Copy link
Owner

jertel commented Apr 22, 2022

Thanks for the contribution!

@jertel jertel merged commit 4c0afcb into jertel:master Apr 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants