Hey guys.
I'm trying to get PostgreSQL's logs to Zabbix, but only when a certain expression is found.
So, on Zabbix, I've created the following item for that:
- Being "proddb2.datacentre.com " the filtered expression.

On the host that I'm trying to get the logs from, zabbix_agent.conf is like this; where "192.168.1.13" is the Zabbix-Proxy on that network:
However, I am getting this error:
But I can access that log file as the Zabbix user:
So, I am not sure why Zabbix keeps saying it can't access it when it looks like it can?
Does anybody have any idea on this, please?
I'm trying to get PostgreSQL's logs to Zabbix, but only when a certain expression is found.
Code:
MESSAGE: Thu Sep 13 18:52:29 AEST 2018 sending [/pgsql/main/pg_wal/000000010000001F0000006A] to [proddb2.datacentre.com] /data/wal_archive
Code:
log[/var/lib/zabbix/postgresql-10.log,"proddb2.datacentre.com",,,,\1]
On the host that I'm trying to get the logs from, zabbix_agent.conf is like this; where "192.168.1.13" is the Zabbix-Proxy on that network:
Code:
Server=192.168.1.13 ServerActive=192.168.1.13
Code:
1176:20180913:191003.525 suppressing log(rt) processing error #2: Cannot open file "/var/lib/zabbix/postgresql-10.log": [13] Permission denied
Code:
[root@proddb ~]# su - zabbix [zabbix@proddb ~]$ tail -n 5 /var/lib/zabbix/postgresql-10.log 2018-09-13 19:09:11 AEST [11011]: [742-1] user=,db=,app=,client=LOG: checkpoint complete: wrote 860 buffers (0.2%); 0 WAL file(s) added, 0 removed, 1 recycled; write=86.012 s, sync=0.004 s, total=86.024 s; sync files=28, longest=0.001 s, average=0.000 s; distance=6795 kB, estimate=6795 kB 2018-09-13 19:12:45 AEST [11011]: [743-1] user=,db=,app=,client=LOG: checkpoint starting: time 2018-09-13 19:14:42 AEST [11011]: [744-1] user=,db=,app=,client=LOG: checkpoint complete: wrote 1166 buffers (0.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=116.572 s, sync=0.003 s, total=116.581 s; sync files=28, longest=0.000 s, average=0.000 s; distance=9251 kB, estimate=9251 kB 2018-09-13 19:17:45 AEST [11011]: [745-1] user=,db=,app=,client=LOG: checkpoint starting: time 2018-09-13 19:18:23 AEST [11011]: [746-1] user=,db=,app=,client=LOG: checkpoint complete: wrote 383 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=38.397 s, sync=0.004 s, total=38.407 s; sync files=28, longest=0.000 s, average=0.000 s; distance=2980 kB, estimate=8624 kB
Does anybody have any idea on this, please?
Comment