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

Zabbix API event.get returns truncated opdata

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Need info
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 5.0.5
    • Fix Version/s: None
    • Component/s: API (A)
    • Labels:
      None
    • Environment:
      CentOS 8.2.2004
      perl 5.26.3
      percona-server-server-8.0.19
      Zabbix::Tiny library

      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'

        Attachments

          Activity

            People

            Assignee:
            zalex_ua Oleksii Zagorskyi
            Reporter:
            galoxucro Galo Xucro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: