-
Incident report
-
Resolution: Fixed
-
Minor
-
2.2.13
-
None
In src/libs/zbxserver/expression.c:DBget_drule_value_by_event() function the SQL select to get the rule name is wrong - it will simply return first discovery rule name:
Index: src/libs/zbxserver/expression.c =================================================================== --- src/libs/zbxserver/expression.c (revision 61108) +++ src/libs/zbxserver/expression.c (working copy) @@ -1191,7 +1191,7 @@ { case EVENT_OBJECT_DHOST: result = DBselect("select r.%s from drules r,dhosts h" - " where r.druleid=r.druleid and h.dhostid=" ZBX_FS_UI64, + " where r.druleid=h.druleid and h.dhostid=" ZBX_FS_UI64, fieldname, event->objectid); break; case EVENT_OBJECT_DSERVICE: