[ZBX-12778] Broken selection by tags in problem.get and event.get methods Created: 2017 Sep 26  Updated: 2024 Apr 10  Resolved: 2018 Jan 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 3.4.2, 4.0.0alpha1
Fix Version/s: 3.4.4rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Critical
Reporter: Ivo Kurzemnieks Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: api, events, problems
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Sub-task
part of ZBXNEXT-4118 Advanced options for tag-based search... Closed
Team: Team B
Team: Team B
Sprint: Sprint 18, Sprint 19, Sprint 24
Story Points: 4

 Description   

1. Create a host with an item and a few triggers with tags and values:

  • Trigger 1 - Service: abc, service: abcdef
  • Trigger 2 - Service: abc
  • Trigger 3 - App: qwe, Application: qwerty
  • Trigger 4 - App: qwe

or more if desired, but this will do enough for example.

2. Generate some problems and check the API methods problem.get and event.get:

{
    "output": ["eventid"],
    "tags": [
        {
            "tag": "Service",
            "value": "abc"
        }
    ],
    "selectTags": "extend"
}

3. Observe the broken result:

"result": [
        {
            "eventid": "167",
            "tags": []
        },
        {
            "eventid": "168",
            "tags": []
        },
        {
            "tags": [
                [],
                [],
                []
            ]
        }
    ]

4. Expected result:

"result": [
        {
            "eventid": "85",
            "tags": [
                {
                    "tag": "Service",
                    "value": "abc"
                },
                {
                    "tag": "service",
                    "value": "abcdef"
                }
            ]
        },
        {
            "eventid": "86",
            "tags": [
                {
                    "tag": "Service",
                    "value": "abc"
                }
            ]
        }
    ]


 Comments   
Comment by Ivo Kurzemnieks [ 2017 Oct 11 ]

(1) No translation string changes.

sasha CLOSED

Comment by Ivo Kurzemnieks [ 2017 Oct 11 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-12778

Comment by Ivo Kurzemnieks [ 2017 Oct 23 ]

Fixed in:

  • pre-3.4.4rc1 r73816
  • pre-4.0.0alpha1 (trunk) r73817
Comment by Ivo Kurzemnieks [ 2018 Jan 03 ]

(3) [D] API Documentation updated:
https://www.zabbix.com/documentation/3.4/manual/api/changes_3.4

sasha Looks good to me. Thanks! CLOSED

Generated at Fri Apr 19 20:27:54 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.