Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19321

Missing event tags in case of multiple problems

XMLWordPrintable

    • Sprint 76 (May 2021)
    • 1

      Steps to reproduce:
      The same installation like ZBX-19159, except one thing. 10 items with 10 triggers. Send data to these 10 items from a file using zabbix_sender:

      zabbix_sender -z 127.0.0.1 -i /tmp/test_problem
      

      File content:

      test test1 1
      test test2 1
      test test3 1
      test test4 1
      test test5 1
      test test6 1
      test test7 1
      test test8 1
      test test9 1
      test test10 1
      test test11 1
      

      Missing tags for each 2 from 3 problem events.
      Result:

      Log file from alert syncer. Tags for these 3 problems are correct, but finally only one problem have required tag:

      247:20210430:143048.073 zbx_setproctitle() title:'alert syncer [queuing alerts]'
      247:20210430:143048.073 In am_db_get_alerts()
      247:20210430:143048.073 query [txnlev:1] [begin;]
      247:20210430:143048.073 query [txnlev:1] [select a.alertid,a.mediatypeid,a.sendto,a.subject,a.message,a.status,a.retries,e.source,e.object,e.objectid,a.parameters,a.eventid,a.p_eventid from alerts a left join events e on a.eventid=e.eventid where alerttype=0 and a.status=3 order by a.alertid]
      247:20210430:143048.074 query [txnlev:1] [commit;]
      247:20210430:143048.074 End of am_db_get_alerts():SUCCEED alerts:0
      247:20210430:143048.074 In am_db_flush_results()
      247:20210430:143048.074 In zbx_ipc_socket_write()
      247:20210430:143048.074 End of zbx_ipc_socket_write():SUCCEED
      247:20210430:143048.074 In zbx_ipc_socket_read()
      247:20210430:143048.074 End of zbx_ipc_socket_read():SUCCEED
      247:20210430:143048.074 query [txnlev:1] [begin;]
      247:20210430:143048.074 In am_db_update_event_tags() eventid:307 tags:{"tags":{"__zbx_servicenow_number":"test2"}}
      247:20210430:143048.074 query [txnlev:1] [select p.eventid from events e left join problem p on p.eventid=e.eventid where e.eventid=307]
      247:20210430:143048.075 End of am_db_update_event_tags()
      247:20210430:143048.075 In am_db_update_event_tags() eventid:308 tags:{"tags":{"__zbx_servicenow_number":"test2"}}
      247:20210430:143048.075 query [txnlev:1] [select p.eventid from events e left join problem p on p.eventid=e.eventid where e.eventid=308]
      247:20210430:143048.075 End of am_db_update_event_tags()
      247:20210430:143048.075 In am_db_update_event_tags() eventid:309 tags:{"tags":{"__zbx_servicenow_number":"test2"}}
      247:20210430:143048.075 query [txnlev:1] [select p.eventid from events e left join problem p on p.eventid=e.eventid where e.eventid=309]
      247:20210430:143048.076 End of am_db_update_event_tags()
      247:20210430:143048.076 In am_db_validate_tags_for_update()
      247:20210430:143048.076 query [txnlev:1] [select tag,value from event_tag where eventid=307]
      247:20210430:143048.076 End of am_db_validate_tags_for_update()
      247:20210430:143048.076 query [txnlev:1] [update alerts set status=1,retries=0,error='' where alertid=293;
      update alerts set status=1,retries=0,error='' where alertid=294;
      update alerts set status=1,retries=0,error='' where alertid=295;
      ]
      247:20210430:143048.077 In DCget_nextid() table:'event_tag' num:1
      247:20210430:143048.077 query [txnlev:1] [select max(eventtagid) from event_tag where eventtagid between 0 and 9223372036854775807]
      247:20210430:143048.078 End of DCget_nextid() table:'event_tag' [58:58]
      247:20210430:143048.078 query [txnlev:1] [insert into event_tag (eventtagid,eventid,tag,value) values (58,307,'__zbx_servicenow_number','test2');
      ]
      247:20210430:143048.078 In DCget_nextid() table:'problem_tag' num:1
      247:20210430:143048.078 query [txnlev:1] [select max(problemtagid) from problem_tag where problemtagid between 0 and 9223372036854775807]
      247:20210430:143048.078 End of DCget_nextid() table:'problem_tag' [57:57]
      247:20210430:143048.078 query [txnlev:1] [insert into problem_tag (problemtagid,eventid,tag,value) values (57,307,'__zbx_servicenow_number','test2');
      ]
      247:20210430:143048.078 query [txnlev:1] [commit;]
      247:20210430:143048.081 End of am_db_flush_results() flushed:3
      247:20210430:143048.081 zbx_setproctitle() title:'alert syncer [queued 0 alerts(s), flushed 3 result(s) in 0.008265 sec, idle 1 sec]'
      

      Expected:
      See screenshot....
      See attached patch file...

            dgoloscapov Dmitrijs Goloscapovs
            dotneft Alexey Pustovalov
            Team A
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: