Publicadas

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

When the Zabbix MSSQL by ODBC or MSSQL by Zabbix agent template is used, Zabbix expects regular check-ins (e.g., every 5 minutes). If the server returns empty data, crashes, or times out, the nodata() function in Zabbix triggers this alert after 30 minutes of silence. Incorrect ODBC credentials or permissions.

If this fails, your issue lies in /etc/odbc.ini or /etc/odbcinst.ini , or you are missing the Microsoft ODBC Driver for SQL Server on your Zabbix server/proxy. Summary Checklist Action Item Verification Command / Location Zabbix Frontend > Host > Macros Verify Port nc -zv 1433 Check DMVs GRANT VIEW SERVER STATE TO ... in SSMS Boost Timeout Timeout=15 in Zabbix config files Test Agent Directly zabbix_agent2 -t mssql.info.data[...]

Example:

-- For SQL Server 2017, 2019, 2022 USE master; CREATE LOGIN zabbix WITH PASSWORD = 'YourStrongPassword'; GRANT VIEW SERVER STATE TO zabbix; GRANT VIEW ANY DEFINITION TO zabbix; -- For MSDB connectivity USE msdb; CREATE USER zabbix FOR LOGIN zabbix; GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix; GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix; GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix; GRANT SELECT ON msdb.dbo.sysjobs TO zabbix; GO Use code with caution. 2. Root Cause: ODBC Driver Misconfiguration (ODBC Template) zabbix mssql failed to fetch info data -or no data for 30m-

mssql-cli -S <MSSQL_server_IP> -U <Zabbix_monitoring_account> -P <password>

Encountering the "failed to fetch info data (or no data for 30m)" error can be frustrating, but it is highly diagnostic. It is almost always caused by one of the fundamental components in the data chain: connectivity, permissions, configuration, or a known software bug.

USE master; GO -- Grant view server state to allow reading performance counters GRANT VIEW SERVER STATE TO [your_zabbix_user]; GO -- Grant view any definition to see database structures GRANT VIEW ANY DEFINITION TO [your_zabbix_user]; GO -- Grant permissions to the msdb database for backup monitoring USE msdb; GO GRANT SELECT TO [your_zabbix_user]; GO Use code with caution. Step 3: Increase Zabbix Timeout Settings When the Zabbix MSSQL by ODBC or MSSQL

zabbix_get -s 127.0.0.1 -p 10050 -k "db.odbc.select[MSSQL version,$MSSQL.DSN,select @@version]"

Log into your SQL Server Management Studio (SSMS) and execute the following query to grant the necessary privileges to your Zabbix login:

$MSSQL.URI (e.g., sqlserver://192.168.1.50:1433 ) or $MSSQL.DSN If this fails, your issue lies in /etc/odbc

: MSSQL does not use the standard port= directive in odbc.ini . It must be specified with a comma after the IP address (e.g., Server = 192.168.1.100,1433 ).

What appears when you hover over the red "info" icon next to the item in Zabbix?

ybcnyc. Junior Member. Joined: Jun 2022. Posts: 1. MSSQL monitoring - MSSQL: Failed to fetch info data (or no data for 30m) 16-06-

Now Zabbix screamed. The silence broke. Yellow alerts turned to red. A cascade of triggers fired: Zabbix agent on MSSQL01 is unreachable , Template DB MSSQL: Lack of available memory , No data from Database for 30 minutes .