Failed To Fetch Info Data -or No Data For 30m- - Zabbix Mssql

-- For Zabbix dashboard to monitor fetch status
SELECT 
  h.hostid,
  h.name as host,
  i.key_,
  i.lastvalue as fetch_status,
  CASE WHEN i.lastvalue = '0' THEN 'OK' ELSE 'FAILED' END as status,
  FROM_UNIXTIME(i.lastclock) as last_check
FROM items i
JOIN hosts h ON i.hostid = h.hostid
WHERE i.key_ = 'ms.sql.fetch_success'
AND (i.lastvalue = '1' OR i.lastclock < UNIX_TIMESTAMP() - 1800)
ORDER BY i.lastclock DESC;

The errors “Failed to fetch info data” and “No data for 30m” in Zabbix MSSQL monitoring are symptoms of distinct underlying issues. The former is often permission or query-related; the latter points to timeouts or connectivity loss. A systematic diagnostic approach—starting with log analysis, manual ODBC testing, and MSSQL session inspection—enables rapid resolution. Implementing Zabbix Agent 2 and fine-tuning timeouts significantly reduces recurrence, ensuring reliable database observability.

The errors “Failed to fetch info data” and “No data for 30m” are not Zabbix bugs – they are symptoms of a broken contract between your monitoring tool and your database. By systematically checking ODBC drivers, service account permissions, instance names, and localization, you can restore full visibility.

Remember: No data is never acceptable for a production SQL Server. Use the diagnostics in this guide to enforce a 15-minute maximum data outage, and set up proactive alerts for the monitoring system itself.

After fixing the issue once, document the exact DSN, login permissions, and UserParameter overrides in your runbook. The next time SQL Server patches or a failover occurs, you’ll recover in minutes – not days.


Further Resources

Last updated: For Zabbix 6.4+ and SQL Server 2017-2022.

The "MSSQL: Failed to fetch info data (or no data for 30m)" alert in Zabbix is a common trigger indicating that the master item used to gather SQL Server metrics—either via Zabbix Agent 2 —is failing to return results Common Root Causes & Fixes Missing or Incorrect Permissions

: The monitoring user must have specific rights to view server state and access the . Use the following T-SQL to grant required permissions: GRANT VIEW SERVER STATE TO [zabbix_user] VIEW SERVER PERFORMANCE STATE for SQL 2022+) GRANT VIEW ANY DEFINITION TO [zabbix_user] Read access to msdb.dbo.sysjobs msdb.dbo.sysjobservers msdb.dbo.sysjobactivity Zabbix Git repository ODBC Configuration Issues (ODBC Template) Port Formatting

: Microsoft SQL Server typically uses a comma for the port (e.g., Server = 192.168.1.10,1433 ) rather than a colon Trust Server Certificate zabbix mssql failed to fetch info data -or no data for 30m-

: If you are using a self-signed certificate, you may need to add TrustServerCertificate=Yes or use the flag if testing with $MSSQL.USER $MSSQL.PASSWORD

are set at the host level, as credentials stored directly in often fail to work with Zabbix Zabbix Git repository Zabbix Agent 2 Configuration Plugin Config Location mssql.conf

file is often placed in a subdirectory that Agent 2 doesn't read by default . Move it to the zabbix_agent2.d directory or ensure your zabbix_agent2.conf includes a path to it (e.g., Include=./zabbix_agent2.d/plugins.d/*.conf Restart Required

: Any change to the plugin configuration or the agent requires a full service restart to apply Encryption and Driver Version Modern drivers (like ODBC Driver 18) default to Encrypt=yes -- For Zabbix dashboard to monitor fetch status SELECT h

. If your server isn't configured for it, connection attempts will fail Check for driver-specific errors in the Zabbix Server or Proxy logs

to identify network-related or instance-specific connection failures Troubleshooting Steps

Problem: MSSQL: Failed to fetch info data (or no data for 30m)


| Cause | Solution | |-------|----------| | ODBC timeout | Increase QueryTimeout in item → odbc.select[DSN,query,,30] (30 sec) | | Zabbix server timeout | Set Timeout=10 in zabbix_server.conf (restart server) | | Intermittent network | Deploy Zabbix proxy on same host as MSSQL. | | Agent overload | Increase StartAgents and StartPollersUnreachable. | The errors “Failed to fetch info data” and