Skip to content

EventIDs filter not working #43

@deqlz

Description

@deqlz
OS: Windows 10 Corporate (20H2)
Zabbix: 4.4.3
Сonnection: via Checkpoint VPN

I am trying to get an Event with a given event_id from Zabbix.
An event with this id exists and is currently active. Connection to Zabbix is successful. Moreover, if I remove the EventIDs filter, it finds more than 600 events. But (!) I cannot access some of them directly from the Zabbix web interface under the same user.

Code:

session, err := zabbix.NewSession("zabbix_url/api_jsonrpc.php", "user", "password")
if err != nil {
    panic(err)
}

var event_ids []string = []string{"2589270"}
params := zabbix.EventGetParams{
    EventIDs:               event_ids,
}
events, err := session.GetEvents(params)
fmt.Println(events)

Out:

[]

Errors:

2021/07/06 18:49:09 Error getting events: No results were found matching the given search parameters
2021/07/06 18:49:09 No events found
2021/07/06 18:49:09 Validated 0 Events

What could be the problem?

At the same time, everything works correctly from curl:
screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions