[ZBX-18732] Zabbix API event.get returns truncated opdata Created: 2020 Dec 03  Updated: 2023 Jun 01  Resolved: 2023 Jun 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 5.0.5
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Galo Xucro Assignee: Oleksii Zagorskyi
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 8.2.2004
perl 5.26.3
percona-server-server-8.0.19
Zabbix::Tiny library


Attachments: PNG File event.get.png    

 Description   

The operational data for this event is a long string from Windows event log. Opdata is displayed correctly in the web interface. When querying the event using event.get method, opdata is truncated and suffixed with '...'.

Steps to reproduce:

  1. Run the script below:
    #!/usr/bin/perl
    use strict;
    use warnings;
    use Zabbix::Tiny;
    my $username = 'service.zbx';
    my $password = 'yyyyyyyyyyy';
    my $url = 'https://zbx.xxx.com/api_jsonrpc.php';
    my $zabbix = Zabbix::Tiny->new(
        server   => $url,
        password => $password,
        user     => $username
    );
    my $events = $zabbix->do(
        'event.get',
        {
            eventids                => "120469480",
        }
    );
    for my $event (@$events) {
        print STDERR "Event opdata '" .  $event->\{opdata} . "'\n";
    }
    

Result:
Event opdata 'Log: Usuario com matricul...'

Expected:

Event opdata 'Log: Usuario com matricula 12345 nao encontrado no AD para ser alterado'



 Comments   
Comment by Oleksii Zagorskyi [ 2020 Dec 09 ]

I could not reproduce it. The API method returns full/long data for "Operational data" field

Comment by Galo Xucro [ 2023 Jun 01 ]

Nevermind, I'm using 6.0 now and it's fine.

Comment by Oleksii Zagorskyi [ 2023 Jun 01 ]

Ok, closed as not reproduced.

Generated at Mon May 05 07:15:38 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.