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

Zabbix API method proxy.get doesn't recognise filter option proxy_address

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Major Major
    • 6.4.14rc1, 7.0.0beta3, 7.0 (plan)
    • 6.4.12, 7.0.0beta1
    • Frontend (F)
    • None
    • Docker/Alpine/6.4.12 and 7.0.0beta2
    • S24-W10/11, S24-W12/13, S24-W14/15
    • 0.25

      Steps to reproduce:

      1. start clean instance
      2. create passive proxy with some proxy address field set try to use API
        curl --request POST \
        --url'http://localhost/api_jsonrpc.php'\
        --header'Content-Type: application/json-rpc'\
        --data'\{"jsonrpc":"2.0","method":"user.login","params":{"username":"Admin","password":"zabbix"},"id":1}'
        
      curl --request POST \
      --url'http://localhost/api_jsonrpc.php'\
      --header'Content-Type: application/json-rpc'\
      --data'\{"jsonrpc": "2.0","method": "proxy.get","params": {"output": "extend","filter": {"proxy_address":["10.211.55.13"]},"selectInterface": "extend"},"auth":"296dbd09b7418fb727d0bda04fda048f","id":1}'
      

      Responce:

      {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Invalid parameter \"/filter\": unexpected parameter \"proxy_address\"."},"id":1}
      

      At the same time different filter options are working:

      curl --request POST \
        --url 'http://localhost/api_jsonrpc.php' \
        --header 'Content-Type: application/json-rpc' \
        --data '{"jsonrpc": "2.0","method": "proxy.get","params": {"output": "extend","filter": {"status":["5"]},"selectInterface": "extend"},"auth":"c81d321d0fc0093331c9db31699cb407","id":1}'
      
      {"jsonrpc":"2.0","result":[{"host":"Test","status":"5","description":"","tls_connect":"1","tls_accept":"1","tls_issuer":"","tls_subject":"","proxy_address":"10.211.55.13","auto_compress":"1","lastaccess":"1710153361","version":"0","compatibility":"0","proxyid":"10608","interface":[]}],"id":1}
      

      Without filter:

      curl --request POST \
        --url 'http://localhost/api_jsonrpc.php' \
        --header 'Content-Type: application/json-rpc' \
        --data '{"jsonrpc": "2.0","method": "proxy.get","params": {"output": "extend","selectInterface": "extend"},"auth":"c81d321d0fc0093331c9db31699cb407","id":1}'
      {"jsonrpc":"2.0","result":[{"host":"Test","status":"5","description":"","tls_connect":"1","tls_accept":"1","tls_issuer":"","tls_subject":"","proxy_address":"10.211.55.13","auto_compress":"1","lastaccess":"1710153361","version":"0","compatibility":"0","proxyid":"10608","interface":[]}],"id":1
      

      Result:
      Filter by proxy_address is not supported in 6.4+ versions. In LTS 6.0 works without any issue.

      Expected:
      Works as before.

            jfreibergs Janis Freibergs
            edgar.akhmetshin Edgar Akhmetshin
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: