Trigger.get API response returns visible name not hostname

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: 3.4.8
    • Component/s: 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. 

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

              Created:
              Updated:
              Resolved: