Skip to content

Commit

Permalink
fix(zabbix): add ipaddress and hostname (#2279)
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Oct 23, 2024
1 parent 335e843 commit 21da034
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keep/providers/zabbix_provider/zabbix_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ def _format_alert(
event_id = event.get("id")
trigger_id = event.get("triggerId")
zabbix_url = event.pop("ZABBIX.URL", None)
hostname = event.get("HOST.NAME")
ip_address = event.get("HOST.IP")

if zabbix_url == "{$ZABBIX.URL}":
# This means user did not configure $ZABBIX.URL in Zabbix probably
Expand Down Expand Up @@ -638,6 +640,9 @@ def _format_alert(
url=url,
lastReceived=last_received,
tags=tags,
hostname=hostname,
service=hostname,
ip_address=ip_address,
)


Expand Down

0 comments on commit 21da034

Please sign in to comment.