Skip to content

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

Fetching MSSQL metrics (especially database sizes or heavy performance counters) can take longer than the default Zabbix timeout.

The "No data for 30m" Mechanism: If the script takes 15 seconds to run, but the Zabbix timeout is set to 3 seconds (default), the connection is cut. Zabbix registers this as a failed fetch. If this happens repeatedly, the item goes into a "Not Supported" state for a period (often 10-30 minutes) before retrying, causing the "No data for 30m" gap.

Solution: Increase the timeout value in the Zabbix Agent configuration file.

MSSQL_CMD="/opt/mssql-tools/bin/sqlcmd" SERVER="localhost" DB="master" QUERY="SELECT 1 as FetchTest"

Effective database monitoring requires consistent, timely metric collection. Zabbix typically collects MSSQL performance counters (e.g., buffer cache hit ratio, page life expectancy, blocking processes) using:

When Zabbix triggers "Failed to fetch info data" or "No data for 30m", the root cause is rarely the same. The former suggests an authentication or query execution failure; the latter suggests timeouts, deadlocks, or connectivity intermittency.

The error "MSSQL: Failed to fetch info data (or no data for 30m)" typically indicates a communication failure between the Zabbix server/proxy and the Microsoft SQL instance, often stemming from ODBC misconfiguration, authentication issues, or network restrictions. Key Troubleshooting Areas

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

tester777. Junior Member. Joined: Aug 2020. Posts: 9. #1. MSSQL: Failed to fetch info data (or no data for 30m) - suggestions. 18-

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- ODBC Configuration & DSN

Port Formatting: 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).

Named Instances: If using a named instance, ensure the macro $MSSQL.INSTANCE is set correctly (e.g., MSSQL$InstanceName). For default instances, this macro should remain unchanged.

Trust Certificates: If you can connect via sqlcmd but not Zabbix, you may need to specify TrustServerCertificate=Yes in your odbc.ini file or ensure the Microsoft ODBC Driver 18 is properly handling encryption. Database Permissions

The Zabbix monitoring user needs specific permissions to gather performance data. Missing these will cause data fetching to fail even if the connection is established.

Required Permissions: GRANT VIEW SERVER STATE (or VIEW SERVER PERFORMANCE STATE for 2022+), VIEW ANY DEFINITION, and specific SELECT and EXECUTE rights on msdb objects. Zabbix Backend Configuration zabbix mssql failed to fetch info data -or no data for 30m-

ODBC Pollers: Ensure that ODBC pollers are active by setting StartODBCPollers to at least 1 in your zabbix_server.conf or zabbix_proxy.conf file.

Macro Settings: Verify that the host macros $MSSQL.USER, $MSSQL.PASSWORD, and $MSSQL.DSN exactly match the settings in your odbc.ini file. Network & Testing

Connectivity Test: Run isql -v YourDSNName from the Zabbix server command line as the zabbix user to see if a raw ODBC connection works.

Agent 2 Plugins: If using Zabbix Agent 2, ensure the mssql.conf plugin file is present in the zabbix_agent2.d/plugins.d/ directory and that the Include= directive is active.

Are you using Zabbix Agent 2 or the ODBC-based template for this monitoring?

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

tester777. Junior Member. Joined: Aug 2020. Posts: 9. #1. MSSQL: Failed to fetch info data (or no data for 30m) - suggestions. 18-

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- Microsoft SQL monitoring and integration with Zabbix


The Silent Screen

The Network Operations Center hummed its usual lullaby of cooling fans and low conversation. On the wall, a massive screen displayed a constellation of green dots—each one a server, a service, a heartbeat. In the center of that constellation, glowing a steady, reassuring emerald, was Zabbix.

Leila, the senior on-call engineer, nursed her third coffee of the morning. She glanced at the dashboard. All green. A quiet Tuesday.

Then, at 10:03 AM, she saw it. Not an alarm. Not a siren. An absence.

A single widget on her secondary monitor, the one dedicated to the MSSQL cluster that handled all customer transactions, was… blank. The graph that should have been a lively, jagged line showing query response times was a flat, grey void.

She clicked on the item: MSSQL: User activity per minute. Fetching MSSQL metrics (especially database sizes or heavy

The status read: "Failed to fetch info data."

Leila frowned. Zabbix never screamed. It whispered. And this whisper was wrong.

She checked the logs. The last successful data pull from the database was 28 minutes ago. The Zabbix proxy, which sat in the DMZ, was sending heartbeats. The firewall rules were intact. The user account zabbix_svc had the right permissions. The ODBC driver was there.

Thirty minutes.

She called Tom, the database admin. "Hey, look at your SQL server. Zabbix is blind."

Tom pulled up his own tools. "It's up. CPU 12%. Memory fine. Locks… no deadlocks. Connections…" He paused. "Huh. I see the Zabbix proxy connected. But it's just… waiting."

"Waiting for what?"

"An answer," Tom said quietly. "The query is SELECT COUNT(*) FROM transactions WHERE timestamp > DATEADD(minute, -5, GETUTCDATE()). It should return in milliseconds. But the execution plan shows a table scan on a table with 2.3 billion rows."

Leila’s blood went cold. "The maintenance job."

Two weeks ago, they had disabled the weekly index rebuild on the transactions table to speed up a different report. They had forgotten to re-enable it. The indexes had fragmented into digital gravel. A simple count query now took the server hostage.

She watched the clock tick over to 10:33 AM.

Thirty minutes. "No data for 30m."

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.

The customer portal, which relied on that data for a "system status" widget, showed a spinning circle. Then a dash. Then a blank page.

Leila didn't reach for her coffee. She reached for her terminal.

She bypassed Zabbix entirely. She logged into the SQL server via an emergency admin account and issued the kill command for the orphaned Zabbix query. Then, with shaking fingers, she typed:

ALTER INDEX ALL ON transactions REBUILD; When Zabbix triggers "Failed to fetch info data"

She watched the percentage crawl from 0 to 100. Four minutes.

After the rebuild, she restarted the Zabbix proxy agent. In her dashboard, the grey void flickered. Then a single dot of data appeared. Then a line. Then the familiar, jagged, living waveform of a healthy database.

The green lights returned.

Leila slumped back in her chair. Zabbix hadn't failed. It had done exactly what it was supposed to do: it reported an absence. The failure had been human—a forgotten index, an ignored whisper.

She wrote in her post-mortem: "Zabbix did not lose the data. We lost the ability to fetch it. The silence was the alarm."

Introduction

Zabbix is a popular monitoring tool used to track the performance and health of various systems, including Microsoft SQL Server (MSSQL) databases. However, sometimes Zabbix may encounter issues while monitoring MSSQL databases, resulting in errors such as "failed to fetch info data" or "no data for 30m". This guide aims to provide a step-by-step approach to troubleshooting these issues.

Possible Causes

Before diving into the troubleshooting steps, it's essential to understand the possible causes of these errors:

Troubleshooting Steps

| Cause | Solution | |-------|----------| | Permission denied | GRANT VIEW SERVER STATE TO zabbix_user; | | Missing database | Ensure referenced DB is online or use WHERE DB_NAME() = 'master' | | SQL syntax error | Test query in SSMS before putting in Zabbix item. | | Agent 2 misconfiguration | Use correct connection string: Server=.;Trusted_Connection=True; |

In your Zabbix server, add a log item:

logrt["/var/log/zabbix/zabbix_server.log","failed to fetch info data",,,skip]

Trigger when matches >2 in 10 minutes. That way you are alerted before your SQL dashboards go grey.


The Zabbix Agent service runs as a local Windows user (typically SYSTEM). This account often does not have permissions to read SQL performance counters or query the SQL instance.

Diagnosis: If the error logs suggest "Access Denied" or return null values for metrics.

Solution: Grant the necessary permissions to the Zabbix Agent service account.