Thread: [GENERAL] pgAudit_Analyze - parse error in pgaudit_analyze.log

[GENERAL] pgAudit_Analyze - parse error in pgaudit_analyze.log

From
Dylan Luong
Date:

Hi

 

I have configured pgAudit extension on my DEV PostgreSQL instance.

I am trying to configure the pgAudit_Analyze to read the audit logs and loads them into a database table.

Following the steps in https://github.com/pgaudit/pgaudit_analyze I have perl script pgaudit_analyze running as a daemon process. I can see csv files in my log directory, however, in the pgaudit_analyze.log I am seeing the following errors consistently.

 

reading postgresql-14-12-16-13-56.csv

reading postgresql-14-12-16-14-00.csv

reading postgresql-14-12-16-14-30.csv

reading postgresql-14-12-16-15-00.csv

reading postgresql-14-12-16-15-30.csv

reading postgresql-14-12-16-16-00.csv

reading postgresql-14-12-16-16-30.csv

Can't call method "parse" on an undefined value at ./pgaudit_analyze line 509, <$hFile> line 282.

at ./pgaudit_analyze line 44

        main::__ANON__('Can\'t call method "parse" on an undefined value at ./pgaudit...') called at ./pgaudit_analyze line 509

        main::auditWrite('5850e4ff.6355', 'postgres', 4, 'AUDIT: SESSION,1,1,MISC,SET,,,"\x{a}SET DateStyle=ISO;\x{a}SET client...') called at ./pgaudit_analyze line 474

        main::logWrite('5850e4ff.6355', 'postgres', '2016-12-14 16:51:51.265 ACDT', 4, 'set', 'log', 00000, '5/20971', 0, ...) called at ./pgaudit_analyze line 696

        eval {...} called at ./pgaudit_analyze line 643

 

reading postgresql-14-12-16-13-56.csv

reading postgresql-14-12-16-14-00.csv

reading postgresql-14-12-16-14-30.csv

reading postgresql-14-12-16-15-00.csv

reading postgresql-14-12-16-15-30.csv

reading postgresql-14-12-16-16-00.csv

reading postgresql-14-12-16-16-30.csv

Can't call method "parse" on an undefined value at ./pgaudit_analyze line 509, <$hFile> line 282.

at ./pgaudit_analyze line 44

        main::__ANON__('Can\'t call method "parse" on an undefined value at ./pgaudit...') called at ./pgaudit_analyze line 509

        main::auditWrite('5850e4ff.6355', 'postgres', 4, 'AUDIT: SESSION,1,1,MISC,SET,,,"\x{a}SET DateStyle=ISO;\x{a}SET client...') called at ./pgaudit_analyze line 474

        main::logWrite('5850e4ff.6355', 'postgres', '2016-12-14 16:51:51.265 ACDT', 4, 'set', 'log', 00000, '5/20971', 0, ...) called at ./pgaudit_analyze line 696

        eval {...} called at ./pgaudit_analyze line 643

 

Please help.

 

My DEV server is Red Hat 6. PostgreSQL9.5

 

Regards

Dylan

 

Re: [GENERAL] pgAudit_Analyze - parse error in pgaudit_analyze.log

From
David Steele
Date:
On 12/14/16 10:06 PM, Dylan Luong wrote:
>
> /Can't call method "parse" on an undefined value at ./pgaudit_analyze
> line 509, <$hFile> line 282./
>
> /at ./pgaudit_analyze line 44/

This looks like the issue that appears to be fixed by this pull request:

https://github.com/pgaudit/pgaudit_analyze/pull/1

I haven't had time to assess to performance impact of this patch yet,
which is why it hasn't been merged.  You are welcome to give it a try.

--
-David
david@pgmasters.net