Zabbix Pull Connector: Occasional Event Loss Under High VolumeIssue When using the Zabbix Pull Connector (Event Management) to ingest events from Zabbix, a small percentage of events (~0.005%) may be lost and not appear in the `em_event` table, even though the connector reports successful operation. This occurs on both standard and custom Connector Definitions and is caused by a phantom commit race condition in the batch processing logic. Symptoms - Events reported in Zabbix do not appear in ServiceNow `em_event` table - Connector logs show `last_status = Success` with no errors - Loss is intermittent (~0.005% under test conditions) and not correlated with specific event IDs or time windows - Issue occurs regardless of whether using standard `Zabbix_V2` or custom Connector Definitions - MID Server resources are not constrained Release Zurich. Cause ## Root Cause A phantom commit race condition in the Zabbix Pull Connector's batch event-processing logic causes the connector to update its `last_event_signature` (checkpoint) after a batch is retrieved, but before all events from that batch are written to the `em_event` table and committed. If the connector crashes or restarts between signature update and commit, those in-flight events are lost. This race condition is inherent to the batch processing design and affects all Zabbix Connector instances under high-volume scenarios. **Evidence:** Wire-level proof in MID Server debug logs shows Zabbix API response with events physically skipped between consecutive log entries, indicating batch-level loss. ## Affected Versions - All Zabbix Pull Connector versions using batch processing (standard definition `Zabbix_V2` and later) - Confirmed on: Zurich and later ## Detection To verify if event loss is occurring, use the following ServiceNow GlideScript to count unique nodes ingested vs. expected: ```javascript (function countMissingEvents() { var nodePrefix = 'your-test-prefix-'; var suffixRegex = /^your-test-prefix-.{5}$/; // adjust pattern as needed var startTime = new GlideDateTime(); // set to test start var endTime = new GlideDateTime(); // set to test end startTime.setDisplayValue('2026-06-01 15:12:00'); endTime.setDisplayValue('2026-06-01 15:35:00'); var gr = new GlideRecord('em_event'); gr.addQuery('node', 'STARTSWITH', nodePrefix); gr.addQuery('time_of_event', '>=', startTime); gr.addQuery('time_of_event', '<', endTime); gr.query(); var countByNode = {}; while (gr.next()) { var node = gr.getValue('node') + ''; if (!suffixRegex.test(node)) continue; countByNode[node] = (countByNode[node] || 0) + 1; } var uniqueCount = Object.keys(countByNode).length; gs.info('Unique nodes ingested: ' + uniqueCount); gs.info('Expected: [your-expected-count]'); gs.info('Loss rate: ' + (1 - uniqueCount / [expected-count]).toFixed(5)); })(); ``` Resolution ## Workarounds Until the permanent fix is available (see below), use one of the following strategies to mitigate event loss: ### Option A: Event Overlap (Recommended) Reduce the time window between connector cycles so batch window overlaps are minimized. Increase the connector poll frequency by reducing `sysparm_request_interval` on the Connector Instance. Trade-off: Higher API load on Zabbix and MID Server resources. ### Option B: Time-Based Sweep After each full ingestion cycle completes, run a secondary query to backfill any events within the last N seconds that may have been missed. Use an em_match_rule with a deferred check on Zabbix API for events in the overlap window. Trade-off: Additional API calls; latency increase for backfilled events. ### Option C: Count Validation + Alert Implement a periodic GlideScript job that compares expected event count (from Zabbix API query) vs. actual ingested count. If loss is detected, log an alert and trigger a manual full re-sync of that time window. Trade-off: Reactive rather than preventive; requires manual intervention or custom automation. ## Permanent Fix A fix is planned as a Request For Enhancement (RFE) to implement transactional guarantees: update `last_event_signature` only **after** all events in that batch are committed to the database, rather than before. Expected availability: Q3 2026 or later (pending product engineering prioritization). ### Workaround References - **Case:** CS9293403 (Zabbix → ServiceNow Event Management integration event loss investigation) - **Related Connector:** em-connector scope - **Definition:** Zabbix_V2 (standard), ZabbixV2_BIGLOBE (custom example) Related Links - [KB1234567] Event Management Connector Troubleshooting - [PRB0000000] Zabbix Connector Event Loss RFE (when available)