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

Zabbix alert #2601

Open
ognjen011 opened this issue Dec 9, 2019 · 10 comments
Open

Zabbix alert #2601

ognjen011 opened this issue Dec 9, 2019 · 10 comments

Comments

@ognjen011
Copy link

Hello,

does anyone have an actual example of sending alerts to zabbix, template of what it should look like?

@himanshurajput32
Copy link

@ognjen011 Were you able to find this? If yes then It would be great if you could share it here.

@ognjen011
Copy link
Author

I just did this so far as per documentation:

alert:

  • "zabbix"

    zabbix:

  • zbx_sender_host: "zabbix ip address"

  • zbx_sender_port: 10051

  • zbx_host: "{[list of devices in zabbix that receive this type of alert]}"

  • zbx_item: "ElastAlert"

but i am now seeing:

did not find expected key
in "rules/zabbix.yaml", line 17, column 3

Whats more i am seeing another problem in line which was fine before. If i make changes and remove "zabbix:" Then i am getting a python error

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/elastalert-0.2.1-py3.6.egg/elastalert/util.py", line 26, in get_module
module_path, module_class = module_name.rsplit('.', 1)
ValueError: not enough values to unpack (expected 2, got 1)

I am not too sure how is this supposed to work or does it even work.

@himanshurajput32
Copy link

@ognjen011 After looking into the code, I think "zbx_key" parameter is also required which is not mentioned in the doc.

@ognjen011
Copy link
Author

Possible but i still have the same problem. I am not sure of the formatting, there has to be something at the zabbix alert indentation as a second value. I added zbx_key but it has not made any difference for me.

@essodjolo
Copy link

Hello all!
I'm also looking for a way to send ElastAlert alerts to Zabbix.
Any solution so far? That would be great if you can share.

Regards

@essodjolo
Copy link

Hi all,

Finally found a solution that worked for me.
In case this might be useful to anyone, here's how you can manage to send ElastAlert messages to Zabbix.

  • create a "zabbix trapper" item under a host in your Zabbix server
  • create a script which uses zabbix_sender to send informations it gets as parameters to a Zabbix server
  • add command rule to your ElastAlert rule so that your previous script will be called along with the desired parameters
  • In your Zabbix server interface, you can create a trigger to handle the received values as it suits your use case.

I hope this will help you also.

Regards

@Jurka007
Copy link

See my comment on #2586

@wajika
Copy link

wajika commented Dec 9, 2020

Hi all,

Finally found a solution that worked for me.
In case this might be useful to anyone, here's how you can manage to send ElastAlert messages to Zabbix.

  • create a "zabbix trapper" item under a host in your Zabbix server
  • create a script which uses zabbix_sender to send informations it gets as parameters to a Zabbix server
  • add command rule to your ElastAlert rule so that your previous script will be called along with the desired parameters
  • In your Zabbix server interface, you can create a trigger to handle the received values as it suits your use case.

I hope this will help you also.

Regards

hi essodjolo.
Can you tell me more about what to do on the zabbix server interface?
For example, what type should be selected for the new item and what is the key.
3

@essodjolo
Copy link

essodjolo commented Dec 9, 2020 via email

@wajika
Copy link

wajika commented Dec 11, 2020

Hi,The item type should be "zabbix trapper". You are free to give the key whichever name you like, but you have to specify that key name while sending the data with zabbix_sender.RegardsEssodjolo KAHANAM  ---- On mer., 09 déc. 2020 06:48:10 +0100 notifications@github.com wrote ---- Hi all, Finally found a solution that worked for me. In case this might be useful to anyone, here's how you can manage to send ElastAlert messages to Zabbix. create a "zabbix trapper" item under a host in your Zabbix server create a script which uses zabbix_sender to send informations it gets as parameters to a Zabbix server add command rule to your ElastAlert rule so that your previous script will be called along with the desired parameters In your Zabbix server interface, you can create a trigger to handle the received values as it suits your use case. I hope this will help you also. Regards hi essodjolo. Can you tell me more about what to do on the zabbix server interface? For example, what type should be selected for the new item and what is the key. —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you for your reply. I have now created items on zabbix web.

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

5 participants