Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9683

How to get hosts.available and snmp.available status by SQL in Zabbix 7.0.

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Commercial support required
    • Icon: Major Major
    • None
    • 7.0.5
    • Server (S)
    • None

      Hello, Team,

       

      This is Yu.  I am zabbix user.

      I am building Zabbix with Zabbix 7.0.
      Postgres SQL version is 15-15.8.
      Every day, I have to check the SNMP and Zabbix Agent status indicators for each host in the Zabbix GUI.
      I visually check whether the indicator is green or red.

      In Zabbix 6.0, the two statuses were obtained by SQL command.
      However, since Zabbix 7.0, the table structure is different in that SQL command, so it cannot be retrieved.
      In Zabbix 6.0, the following SQL command was successful:

       

      psql -UName -dDBName -c "select hosts.hostid, hosts.host, hosts, hosts.name, interface.ip, hosts.available, hosts.snmp_available from hosts"

       

      What are the field and table names corresponding to hosts.available and hosts.snmp_available in Zabbix 7.0 ?

      Best regards,

            zabbix.dev Zabbix Development Team
            yuu.imamura Yu Imamura
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 40h
                40h
                Remaining:
                Remaining Estimate - 40h
                40h
                Logged:
                Time Spent - Not Specified
                Not Specified