Zabbix’s ODBC DSN often uses Server=localhost\INSTANCE. This requires SQL Browser (UDP port 1434) to resolve the dynamic port. If SQL Browser is disabled, the connection hangs then fails.
Fix: Start SQL Browser and ensure Windows Firewall allows UDP 1434 inbound.
Sometimes, it’s not an error. A development SQL Server with no active databases, no user connections, and auto_close = ON will show zero for User Connections and Batch Requests/sec – resulting in “no data for 30m” because the trend function expects a positive delta.
Fix: Adjust the trigger expression. Replace nodata(30m) with nodata(30m) and last()<>0 or simply increase the threshold for low-traffic servers.
Example:
telnet <MSSQL_server_IP> 1433
If the connection is successful, you should see a blank screen.
| Error Message | Zabbix Interpretation | Typical Impact |
|---------------|----------------------|----------------|
| Failed to fetch info data | The item’s pre-processing or retrieval script returned non-zero exit code or error output. | Immediate data loss for that poll. |
| No data for 30m | The item has not received any new value for the last 30 minutes (configured in zabbix_server.conf or item’s update interval). | Sustained monitoring outage. |
This specific error in Zabbix typically triggers when the monitoring system hasn't received any data from the MSSQL instance for a prolonged period (30 minutes), often due to ODBC configuration issues or insufficient permissions for the monitoring user. Alert Message Draft
You can use the following text for your trigger name or notification body:
Trigger Name: MSSQL: Failed to fetch info data (or no data for 30m) zabbix mssql failed to fetch info data -or no data for 30m-
Problem Description: No monitoring data has been received from the MSSQL instance on HOST.NAME for at least 30 minutes. This may indicate a connection failure, an ODBC driver issue, or an expired monitoring user session. Troubleshooting & Fixes
If this alert is active, check the following common causes identified by users in the Zabbix Community Forums:
ODBC Configuration: Ensure the odbc.ini file does not store credentials. For Zabbix, username and password should be passed as arguments from the frontend.
Port Syntax: MSSQL servers often require a comma before the port in the connection string (e.g., Server = ipaddress,1433) rather than a colon.
Encryption Settings: Try adding Encrypt = yes to your connection parameters.
SSL Certificates: If your server uses a self-signed certificate, you may need to include TrustServerCertificate=Yes in your odbc.ini or connection string to prevent handshake failures.
User Permissions: Verify the monitoring user has the required rights. For MSSQL 2022, you must grant VIEW SERVER PERFORMANCE STATE and VIEW ANY DEFINITION. Trigger Expression Example
To customize the time period or item, the standard expression for a 30-minute "no data" alert looks like this: nodata(/Host/mssql.info_item,30m)=1 If you'd like, I can help you:
Draft a remediation script to restart the Zabbix agent or ODBC services. Zabbix’s ODBC DSN often uses Server=localhost\INSTANCE
Provide the exact SQL commands to verify your monitoring user's permissions.
Adjust the Zabbix Action to send this alert to Slack, Discord, or Email. Let me know which Zabbix version you are currently running!
Problem: MSSQL: Failed to fetch info data (or no data for 30m)
PiotrJ. Junior Member. Joined: May 2023. Posts: 26. Problem: MSSQL: Failed to fetch info data (or no data for 30m) 21-09-2023, 19:
MSSQL: Failed to fetch info data (or no data for 30m) - Zabbix
ybcnyc. Junior Member. Joined: Jun 2022. Posts: 1. MSSQL monitoring - MSSQL: Failed to fetch info data (or no data for 30m) 16-06-
Zabbix nodata trigger, really a lifesaver | by Werner Dijkerman
"MSSQL: Failed to fetch info data (or no data for 30m)" typically indicates a communication or permission breakdown between Zabbix and your SQL Server
. This usually occurs when using the "MSSQL by ODBC" or "MSSQL by Zabbix agent 2" templates. Common Solutions Trust Server Certificate (ODBC Driver 18+) Sometimes, it’s not an error
: If you recently upgraded to ODBC Driver 18, it forces encryption by default. If your SQL Server uses a self-signed certificate, you must add TrustServerCertificate=yes to your connection string or the file. Some users found reverting to ODBC Driver 17
resolved the issue immediately as it is more compatible with older configurations. Database Permissions
: Ensure the Zabbix monitoring user has the following permissions on the MSSQL instance: VIEW SERVER STATE (for 2017/2019) or VIEW SERVER PERFORMANCE STATE (for 2022). VIEW ANY DEFINITION Access to the database for job monitoring. Correct Connection Syntax
or Zabbix macros, the port must be specified after a comma, not a colon (e.g., Server = 192.168.1.50,1433 as a separate directive often fails. Macro Configuration : Verify that your host macros are correctly set: $MSSQL.USER $MSSQL.PASSWORD $MSSQL.DSN (must match the name in your /etc/odbc.ini on the Zabbix server/proxy). Agent 2 Configuration
: If using the Zabbix Agent 2 plugin, ensure you have configured the mssql.conf file (located in zabbix_agent2.d/plugins.d/ ) with the correct URI, username, and password. Diagnostic Steps
MSSQL: Failed to fetch info data (or no data for 30m) - Zabbix
ybcnyc. Junior Member. Joined: Jun 2022. Posts: 1. MSSQL monitoring - MSSQL: Failed to fetch info data (or no data for 30m) 16-06-
Problem: MSSQL: Failed to fetch info data (or no data for 30m)