Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14376

Trigger.get API response returns visible name not hostname

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 3.4.8
    • API (A)
    • None

      Steps to reproduce:

      1. Create host with IP as hostname and DNS name as visible name
      2. Run the following api query:
        {
        "jsonrpc":"2.0",
        "method":"trigger.get",
        "params":{
        "output":[
        "triggerid",
        "description",
        "priority",
        "hostname"
        ],
        "filter":{
        "priority":[
        "3",
        "4",
        "5"
        ],
        "value":"1"
        },
        "active":"true",
        "sortfield": "hostname"
        },
        "id":1,
        "auth":"{{zabbix_token}}"
        }

      Result:
      You will see the visible name and not the hostname for all triggers and their hosts. 
      Expected:
      One would hope that you would see the hostname which in this case is the IP address.

       

      I realize that the trigger.get query does not have the a hostname object associated directly with it however the query runs fine so either it should not be allowed or should actually return the correct value imo. 

            Unassigned Unassigned
            frenchtoasters Tyler French
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: