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

  • Verify item configuration
  • Test the SQL/query manually
  • Check DB credentials & permissions
  • Verify ODBC/JDBC driver and DSN
  • Network and firewall
  • Timeouts and query duration
  • Agent and proxy status
  • Templates and macro values
  • Resource limits on DB server
  • Zabbix server load
  • Item history & trends
  • Enable debug logging temporarily
  • 
      "action_name": "MSSQL Fetch Failure Alert",
      "conditions": 
        "trigger_name": "MSSQL: Failed to fetch info data OR no data for 30m",
        "trigger_severity": ["high", "disaster"]
      ,
      "operations": 
        "default_subject": "CRITICAL: MSSQL data fetch failed on HOST.NAME",
        "default_message": "Problem started at EVENT.TIME on EVENT.DATE\n
        Problem name: TRIGGER.NAME\n
        Host: HOST.NAME\n
        Severity: TRIGGER.SEVERITY\n\n
        Original event ID: EVENT.ID\n
        Check MSSQL connectivity:\n
        1. Verify SQL Server is running\n
        2. Check firewall rules\n
        3. Validate credentials in Zabbix configuration\n
        4. Review SQL error logs\n\n
        Last 5 fetch attempts: ITEM.VALUE<ms.sql[fetch_data],5>",
        "recovery_subject": "RECOVERY: MSSQL fetch restored on HOST.NAME",
        "recovery_message": "Problem resolved at EVENT.RECOVERY.TIME\n
        Duration: EVENT.DURATION\n
        Host: HOST.NAME"
    
    <!-- Item to track fetch failures -->
    <item name="MSSQL: Info fetch status" key="mssql.info.fetch.status">
      <type>Zabbix agent</type>
      <key>perf.ms sql[fetch.status]</key>
      <value_type>Numeric (unsigned)</value_type>
      <units>status</units>
      <delay>60s</delay>
      <description>1 = fetch failed, 0 = fetch successful</description>
    </item>
    

    <!-- Item with last value tracking --> <item name="MSSQL: Last successful fetch" key="msql.last.success.time"> <type>Zabbix agent</type> <key>perf.mssql[last_success]</key> <value_type>Numeric (unsigned)</value_type> <units>unixtime</units> <delay>60s</delay> </item>

    If you are using the Zabbix Agent 2 with the native MSSQL plugin, the agent runs under a specific Windows user account. That account must have permissions to read SQL Server performance counters.

    The Problem: The Zabbix Agent runs as SYSTEM (or a local user), but SQL Server restricts access to Dynamic Management Views (DMVs) like sys.dm_os_performance_counters. zabbix mssql failed to fetch info data -or no data for 30m-

    The Fix: You need to grant the Zabbix Agent user access to the SQL Server instance.

    T-SQL Command to grant access quickly:

    USE master;
    GO
    CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS;
    GO
    GRANT VIEW SERVER STATE TO [NT AUTHORITY\SYSTEM];
    GO
    

    Note: Replace [NT AUTHORITY\SYSTEM] with the specific user running the Zabbix Agent service if different. Verify item configuration


    Subject: Resolving "Failed to fetch info data" and "No data for 30m" errors for Microsoft SQL Server. Audience: System Administrators, DevOps Engineers, DBAs.

    Zabbix uses ODBC to perform specific SQL queries. A common failure occurs when there is a bitness mismatch between the Zabbix Agent and the ODBC Driver.

    The Problem:

    Diagnosis: Run odbcad32.exe (located in C:\Windows\System32 for 64-bit drivers and C:\Windows\SysWOW64 for 32-bit drivers) to verify the driver is installed and configured correctly for the correct architecture.

    Solution: