SQL query from Logstash causes an error PGobject

Logstash passes a request type:

SELECT * from dbmon_stat_activity()

I get an error in the log:

_[2018-07-02T14:00:00,384][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject>}_

The function that is called by this query:

CREATE OR REPLACE FUNCTION public.dbmon_stat_activity()
RETURNS SETOF pg_stat_activity
     LANGUAGE plpgsql
     SECURITY DEFINER
    AS $function$
    DECLARE
     rcrd RECORD;
    BEGIN
      FOR rcrd IN SELECT * FROM pg_stat_activity
      LOOP
        RETURN NEXT rcrd;
      END LOOP;
      RETURN;
    END;
    $function$

In accordance with what is written here and here I need to select the type of data in the table.
How can this be done in a function or is it necessary to edit a table?

If you manually execute this query, then everything works without errors.
Is this error related to JDBC?
Are there any alternative versions of the driver?

Thank you in advance

One of the columns returned by the query has a data type that Logstash doesn't know how to handle. You can type cast that column to a recognized data type (e.g. VARCHAR) in the query's SELECT statement.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.