zabbix-tools / libzbxpgsql Goto Github PK
View Code? Open in Web Editor NEWMonitor PostgreSQL with Zabbix
Home Page: http://cavaliercoder.com/libzbxpgsql/
License: Other
Monitor PostgreSQL with Zabbix
Home Page: http://cavaliercoder.com/libzbxpgsql/
License: Other
Hello, I'd rather say it first, I'm a total noob with Zabbix and PGSQL but I appreciate the development you've done for the PGSQL integration with Zabbix!
I have followed the instructions of your website, and while everything went fine on the remote server (where postgresql runs), I cannot make it work on the zabbox server. I imported the template, checked the macros (they were fine), attached the template to the host and restarted the agent on the remote server.
Under Hosts > Items, I see about 15 entries pertaining to your template, they all have status "not supported" (ZBX_NOTSUPPORTED).
I wonder why? On the remote server, the zabbix agent log has this in it:
29292:20151010:163607.248 Zabbix Agent stopped. Zabbix 2.2.2 (revision 42525).
696:20151010:163626.720 Starting Zabbix Agent [musicbrainz-mirror.tuxdomain]. Zabbix 2.2.2 (revision 42525).
696:20151010:163626.720 using configuration file: /etc/zabbix/zabbix_agentd.conf
697:20151010:163626.722 agent #0 started [collector]
698:20151010:163626.722 agent #1 started [listener #1]
701:20151010:163626.722 agent #4 started [active checks #1]
699:20151010:163626.723 agent #2 started [listener #2]
700:20151010:163626.723 agent #3 started [listener #3]
701:20151010:163626.734 active check "pg.index.discovery[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:163626.734 active check "pg.table.discovery[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.780 active check "pg.backends.count[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.781 active check "pg.buffers_alloc[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.781 active check "pg.buffers_backend[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.buffers_backend_fsync[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.buffers_checkpoint[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.buffers_clean[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.checkpoints_req[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.checkpoints_timed[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.checkpoint_sync_time[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.checkpoint_write_time[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.connect[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.db.discovery[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.maxwritten_clean[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.queries.longest[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.setting.discovery[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.782 active check "pg.stats_reset[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.783 active check "pg.tablespace.discovery[host=127.0.0.1 port=5432,postgres]" is not supported
701:20151010:164026.783 active check "pg.version[host=127.0.0.1 port=5432,postgres]" is not supported
If you can shed some light on this, I'd appreciate a lot!
Thank you and best regards
Thought I'd give you something easy...
The IO stats metrics have the wrong multiplier set in the template for these two discovery item prototypes:
Time spent reading data ({#DATABASE})
Time spent writing data ({#DATABASE})
They both have a multiplier setting of 1000, but they should be 0.0001. Those metrics come from the blk_read_time and blk_write_time columns of pg_stat_database, which are measured in milliseconds, so need to be divided by 1000.
When I turned them on for a fresh install and ran pgbench it said I'd spent days writing data and months reading data... lol.
Thanks,
Rob
Hello,
I managed to compile and install it all, and quering for data manually on the zabbix server from the remote zabbix agent database server works like:
zabbix_get -s prod03.xxxxx.net -k "pg.maxwritten_clean[host=prod03 port=5558 user=postgres,postgres]"
But data never arrives at the zabbix server! Since I copied the key from the "latest data", I think that everything is set up correctly when compared to manual zabbix-get.
There are no errors whatsoever, how could I debug this ?
Since even pg.modver
is not available, it's probably not related to PG_CONN
settings...
See #58, maybe the template at https://raw.githubusercontent.com/cavaliercoder/libzbxpgsql/v1_template/template_postgresql_server.xml is somehow not compatible with version 1.0.0 for zabbix2 ?
The current name makes sense as standard name for a shared module, but not for the scope of the monitoring package (deb/rpm/other).
The package should be named zabbix-agent-pgsql
more inline with Zabbix's naming convention and is more apparent as an extension to the Zabbix agent.
The package could then contain multiple templates, documentation, etc. for multiple monitoring scenarios related to PostgreSQL.
Hi Cavaliercoder,
I have another question, I'm having some problems with the Backend connections are exhausted on {HOST.NAME} trigger. The expression of the trigger is {Template-PostgreSQL-Linux:pg.prepared_xacts_ratio[{$PG_CONN},{$PG_DB}].last()}<{$PG_BACKENDS_CRIT}
and the default $PG_BACKENDS_CRIT
is 5. In the item PostgreSQL Prepared transaction used %
we can see the function pg.prepared_xacts_ratio[{$PG_CONN},{$PG_DB}]
returns the total of transactions that could be commited as it is described on the description of the item:
"Returns the number of transactions that are currently prepared for two phase commit as a percentage of the maximum available prepared transactions."
So if the value is 0, there are no transactions prepared for commit. So why the trigger activate if the value is less then 5%? Shouldn't it activate if the value is more then 95% (for an example)? Is this trigger correct, because it's always activating since there is no transaction waiting on the server.
Regards,
Cristiano
Hello,
it would be nice if you add a sql-query for an example-user that has only read-permissions to all tables that you need in this module
Hey Ryan,
Here are some additional metrics that we gather that could be very useful for others. You may want to add them to your base code. Super-user privileges are not needed for these queries.
Thanks,
Rob
select round(100*max(age(datfrozenxid))::float/2000000000)::int from pg_database;
select round(100*max(age(datfrozenxid))::float/(select setting from pg_settings where name = 'autovacuum_freeze_max_age')::float) from pg_database;
select count(*) from pg_prepared_xacts;
select coalesce(max((extract(epoch from clock_timestamp()) - extract(epoch from prepared))::integer),0) from pg_prepared_xacts;
select case when setting::integer = 0 then 0 else round(100*(select count(*) from pg_prepared_xacts)::float/setting::integer) end from pg_settings where name = 'max_prepared_transactions';
select round(100*max(age(datfrozenxid))::float/2000000000)::int from pg_database where datname = $1;
select round(100*max(age(datfrozenxid))::float/(select setting from pg_settings where name = 'autovacuum_freeze_max_age')::float) from pg_database where datname = $1;
select count(*) from pg_prepared_xacts where database = $1;
select coalesce(max((extract(epoch from clock_timestamp()) - extract(epoch from prepared))::integer),0) from pg_prepared_xacts where database = $1;
After install Zabbix agent and follow steps here, I note that my agent not load libzbxpgsql.so properly.
I do service zabbix-agent restart
, then tail -f /var/log/zabbix/zabbix_agentd.log
, and it is the result:
I have Zabbix agent 3.0.3 with Debian Testing
8841:20160622:181210.329 IPv6 support: YES
8841:20160622:181210.329 TLS support: YES
8841:20160622:181210.329 **************************
8841:20160622:181210.329 using configuration file: /etc/zabbix/zabbix_agentd.conf
8841:20160622:181210.330 agent #0 started [main process]
8842:20160622:181210.330 agent #1 started [collector]
8843:20160622:181210.330 agent #2 started [listener #1]
8844:20160622:181210.330 agent #3 started [listener #2]
8845:20160622:181210.330 agent #4 started [listener #3]
8846:20160622:181210.331 agent #5 started [active checks #1]
8846:20160622:181810.381 active check "pg.backends.count[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.381 active check "pg.buffers_alloc[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.buffers_backend[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.buffers_backend_fsync[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.buffers_checkpoint[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.buffers_clean[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.checkpoints_req[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.checkpoints_timed[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.checkpoint_avg_interval[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.382 active check "pg.checkpoint_sync_time[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.checkpoint_time_perc[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.checkpoint_write_time[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.connect[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.db.discovery[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.db.xid_age[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.index.discovery[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.maxwritten_clean[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.modver" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.queries.longest[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.setting.discovery[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.starttime[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.stats_reset[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.table.discovery[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.tablespace.discovery[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.uptime[host=/tmp,postgres]" is not supported: Unsupported item key.
8846:20160622:181810.383 active check "pg.version[host=/tmp,postgres]" is not supported: Unsupported item key.
Hi,
I've just tried to use your new module for Zabbix.
I follow the installation and configuration guide.
But when I start the zabbix-agent service, it crashed few seconds after.
18196:20150515:140934.555 Failed to execute PostgreSQL query in pg_get_int(pg.backends.count) with: ERROR: column "pid" does not exist
LINE 1: SELECT COUNT(pid) FROM pg_stat_activity
^
18196:20150515:140934.555 active check "pg.backends.count[localhost,5432,zabbix_server,postgres,network]" is not supported
18196:20150515:140934.555 Got signal [signal:11(SIGSEGV),reason:1,refaddr:(nil)]. Crashing ...
18196:20150515:140934.555 ====== Fatal information: ======
18196:20150515:140934.555 Program counter: 0x40db70
18196:20150515:140934.555 === Registers: ===
18196:20150515:140934.555 r8 = 7f5b029d3720 = 140028862609184 = 140028862609184
18196:20150515:140934.555 r9 = 1 = 1 = 1
18196:20150515:140934.555 r10 = 5d6b726f7774656e = 6731599891106391406 = 6731599891106391406
18196:20150515:140934.555 r11 = 206 = 518 = 518
18196:20150515:140934.555 r12 = 2743 = 10051 = 10051
18196:20150515:140934.555 r13 = 7f5d10 = 8346896 = 8346896
18196:20150515:140934.555 r14 = 0 = 0 = 0
18196:20150515:140934.555 r15 = 1c0 = 448 = 448
18196:20150515:140934.555 rdi = 43b150 = 4436304 = 4436304
18196:20150515:140934.555 rsi = 172 = 370 = 370
18196:20150515:140934.555 rbp = 5555e1fd = 1431691773 = 1431691773
18196:20150515:140934.555 rbx = 180 = 384 = 384
18196:20150515:140934.555 rdx = 648d64 = 6589796 = 6589796
18196:20150515:140934.555 rax = 7ff160 = 8384864 = 8384864
18196:20150515:140934.555 rcx = 7f6410 = 8348688 = 8348688
18196:20150515:140934.555 rsp = 7fff7f5a0510 = 140735329994000 = 140735329994000
18196:20150515:140934.555 rip = 40db70 = 4250480 = 4250480
18196:20150515:140934.555 efl = 10202 = 66050 = 66050
18196:20150515:140934.555 csgsfs = 33 = 51 = 51
18196:20150515:140934.555 err = 4 = 4 = 4
18196:20150515:140934.555 trapno = e = 14 = 14
18196:20150515:140934.555 oldmask = 0 = 0 = 0
18196:20150515:140934.555 cr2 = 0 = 0 = 0
18196:20150515:140934.555 === Backtrace: ===
18196:20150515:140934.556 10: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x425c9e]
18196:20150515:140934.556 9: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x4260a7]
18196:20150515:140934.556 8: /lib/x86_64-linux-gnu/libc.so.6(+0x321e0) [0x7f5b015061e0]
18196:20150515:140934.556 7: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x40db70]
18196:20150515:140934.556 6: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x40e247]
18196:20150515:140934.556 5: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x424912]
18196:20150515:140934.556 4: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x4130e2]
18196:20150515:140934.556 3: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x4255ac]
18196:20150515:140934.556 2: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x40bfe1]
18196:20150515:140934.556 1: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f5b014f2ead]
18196:20150515:140934.556 0: /usr/sbin/zabbix_agentd: active checks #1 processing active checks [0x40c0d1]
18196:20150515:140934.556 === Memory map: ===
18196:20150515:140934.556 00400000-00447000 r-xp 00000000 fe:00 22385 /usr/sbin/zabbix_agentd
18196:20150515:140934.556 00647000-00649000 rw-p 00047000 fe:00 22385 /usr/sbin/zabbix_agentd
18196:20150515:140934.556 00649000-0064e000 rw-p 00000000 00:00 0
18196:20150515:140934.556 007ef000-00810000 rw-p 00000000 00:00 0 [heap]
18196:20150515:140934.556 00810000-00929000 rw-p 00000000 00:00 0 [heap]
18196:20150515:140934.556 7f5afda82000-7f5afda97000 r-xp 00000000 fe:00 128526 /lib/x86_64-linux-gnu/libgcc_s.so.1
18196:20150515:140934.556 7f5afda97000-7f5afdc97000 ---p 00015000 fe:00 128526 /lib/x86_64-linux-gnu/libgcc_s.so.1
18196:20150515:140934.556 7f5afdc97000-7f5afdc98000 rw-p 00015000 fe:00 128526 /lib/x86_64-linux-gnu/libgcc_s.so.1
18196:20150515:140934.556 7f5afdc98000-7f5afde62000 r-xp 00000000 fe:00 4817 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18196:20150515:140934.556 7f5afde62000-7f5afe062000 ---p 001ca000 fe:00 4817 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18196:20150515:140934.556 7f5afe062000-7f5afe07d000 r--p 001ca000 fe:00 4817 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18196:20150515:140934.556 7f5afe07d000-7f5afe08c000 rw-p 001e5000 fe:00 4817 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
18196:20150515:140934.556 7f5afe08c000-7f5afe090000 rw-p 00000000 00:00 0
18196:20150515:140934.556 7f5afe090000-7f5afe0e6000 r-xp 00000000 fe:00 4832 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
18196:20150515:140934.556 7f5afe0e6000-7f5afe2e6000 ---p 00056000 fe:00 4832 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
18196:20150515:140934.556 7f5afe2e6000-7f5afe2e9000 r--p 00056000 fe:00 4832 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
18196:20150515:140934.556 7f5afe2e9000-7f5afe2f0000 rw-p 00059000 fe:00 4832 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
18196:20150515:140934.556 7f5afe2f0000-7f5afe31a000 r-xp 00000000 fe:00 18655 /usr/lib/libpq.so.5.4
18196:20150515:140934.556 7f5afe31a000-7f5afe519000 ---p 0002a000 fe:00 18655 /usr/lib/libpq.so.5.4
18196:20150515:140934.556 7f5afe519000-7f5afe51b000 r--p 00029000 fe:00 18655 /usr/lib/libpq.so.5.4
18196:20150515:140934.557 7f5afe51b000-7f5afe51d000 rw-p 0002b000 fe:00 18655 /usr/lib/libpq.so.5.4
18196:20150515:140934.557 7f5afe51d000-7f5afe526000 r-xp 00000000 fe:00 27633 /usr/lib/modules/libzbxpgsql.so
18196:20150515:140934.557 7f5afe526000-7f5afe725000 ---p 00009000 fe:00 27633 /usr/lib/modules/libzbxpgsql.so
18196:20150515:140934.557 7f5afe725000-7f5afe726000 r--p 00008000 fe:00 27633 /usr/lib/modules/libzbxpgsql.so
18196:20150515:140934.557 7f5afe726000-7f5afe727000 rw-p 00009000 fe:00 27633 /usr/lib/modules/libzbxpgsql.so
18196:20150515:140934.557 7f5afe727000-7f5afe732000 r-xp 00000000 fe:00 128612 /lib/x86_64-linux-gnu/libnss_files-2.13.so
18196:20150515:140934.557 7f5afe732000-7f5afe931000 ---p 0000b000 fe:00 128612 /lib/x86_64-linux-gnu/libnss_files-2.13.so
18196:20150515:140934.557 7f5afe931000-7f5afe932000 r--p 0000a000 fe:00 128612 /lib/x86_64-linux-gnu/libnss_files-2.13.so
18196:20150515:140934.557 7f5afe932000-7f5afe933000 rw-p 0000b000 fe:00 128612 /lib/x86_64-linux-gnu/libnss_files-2.13.so
18196:20150515:140934.557 7f5afe933000-7f5afe93d000 r-xp 00000000 fe:00 128614 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
18196:20150515:140934.557 7f5afe93d000-7f5afeb3c000 ---p 0000a000 fe:00 128614 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
18196:20150515:140934.558 7f5afeb3c000-7f5afeb3d000 r--p 00009000 fe:00 128614 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
18196:20150515:140934.558 7f5afeb3d000-7f5afeb3e000 rw-p 0000a000 fe:00 128614 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
18196:20150515:140934.558 7f5afeb3e000-7f5afeb53000 r-xp 00000000 fe:00 128609 /lib/x86_64-linux-gnu/libnsl-2.13.so
18196:20150515:140934.558 7f5afeb53000-7f5afed52000 ---p 00015000 fe:00 128609 /lib/x86_64-linux-gnu/libnsl-2.13.so
18196:20150515:140934.558 7f5afed52000-7f5afed53000 r--p 00014000 fe:00 128609 /lib/x86_64-linux-gnu/libnsl-2.13.so
18196:20150515:140934.558 7f5afed53000-7f5afed54000 rw-p 00015000 fe:00 128609 /lib/x86_64-linux-gnu/libnsl-2.13.so
18196:20150515:140934.558 7f5afed54000-7f5afed56000 rw-p 00000000 00:00 0
18196:20150515:140934.558 7f5afed56000-7f5afed5d000 r-xp 00000000 fe:00 128610 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
18196:20150515:140934.558 7f5afed5d000-7f5afef5c000 ---p 00007000 fe:00 128610 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
18196:20150515:140934.558 7f5afef5c000-7f5afef5d000 r--p 00006000 fe:00 128610 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
18196:20150515:140934.558 7f5afef5d000-7f5afef5e000 rw-p 00007000 fe:00 128610 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
18196:20150515:140934.558 7f5afef5e000-7f5afef61000 r-xp 00000000 fe:00 135251 /lib/x86_64-linux-gnu/libkeyutils.so.1.4
18196:20150515:140934.559 7f5afef61000-7f5aff160000 ---p 00003000 fe:00 135251 /lib/x86_64-linux-gnu/libkeyutils.so.1.4
18196:20150515:140934.559 7f5aff160000-7f5aff161000 r--p 00002000 fe:00 135251 /lib/x86_64-linux-gnu/libkeyutils.so.1.4
18196:20150515:140934.559 7f5aff161000-7f5aff162000 rw-p 00003000 fe:00 135251 /lib/x86_64-linux-gnu/libkeyutils.so.1.4
18196:20150515:140934.559 7f5aff162000-7f5aff16a000 r-xp 00000000 fe:00 9728 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
18196:20150515:140934.559 7f5aff16a000-7f5aff369000 ---p 00008000 fe:00 9728 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
18196:20150515:140934.559 7f5aff369000-7f5aff36a000 r--p 00007000 fe:00 9728 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
18196:20150515:140934.559 7f5aff36a000-7f5aff36b000 rw-p 00008000 fe:00 9728 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
18196:20150515:140934.559 7f5aff36b000-7f5aff36e000 r-xp 00000000 fe:00 128768 /lib/x86_64-linux-gnu/libcom_err.so.2.1
18196:20150515:140934.559 7f5aff36e000-7f5aff56d000 ---p 00003000 fe:00 128768 /lib/x86_64-linux-gnu/libcom_err.so.2.1
18196:20150515:140934.559 7f5aff56d000-7f5aff56e000 r--p 00002000 fe:00 128768 /lib/x86_64-linux-gnu/libcom_err.so.2.1
18196:20150515:140934.559 7f5aff56e000-7f5aff56f000 rw-p 00003000 fe:00 128768 /lib/x86_64-linux-gnu/libcom_err.so.2.1
18196:20150515:140934.559 7f5aff56f000-7f5aff595000 r-xp 00000000 fe:00 9734 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
18196:20150515:140934.559 7f5aff595000-7f5aff795000 ---p 00026000 fe:00 9734 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
18196:20150515:140934.560 7f5aff795000-7f5aff796000 r--p 00026000 fe:00 9734 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
18196:20150515:140934.560 7f5aff796000-7f5aff797000 rw-p 00027000 fe:00 9734 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
18196:20150515:140934.560 7f5aff797000-7f5aff798000 rw-p 00000000 00:00 0
18196:20150515:140934.560 7f5aff798000-7f5aff861000 r-xp 00000000 fe:00 9746 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
18196:20150515:140934.561 7f5aff861000-7f5affa60000 ---p 000c9000 fe:00 9746 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
18196:20150515:140934.561 7f5affa60000-7f5affa6a000 r--p 000c8000 fe:00 9746 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
18196:20150515:140934.561 7f5affa6a000-7f5affa6c000 rw-p 000d2000 fe:00 9746 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
18196:20150515:140934.561 7f5affa6c000-7f5affa6f000 r-xp 00000000 fe:00 128446 /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
18196:20150515:140934.561 7f5affa6f000-7f5affc6e000 ---p 00003000 fe:00 128446 /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
18196:20150515:140934.561 7f5affc6e000-7f5affc6f000 rw-p 00002000 fe:00 128446 /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
18196:20150515:140934.561 7f5affc6f000-7f5affc80000 r-xp 00000000 fe:00 4769 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
18196:20150515:140934.561 7f5affc80000-7f5affe7f000 ---p 00011000 fe:00 4769 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
18196:20150515:140934.561 7f5affe7f000-7f5affe80000 r--p 00010000 fe:00 4769 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
18196:20150515:140934.561 7f5affe80000-7f5affe81000 rw-p 00011000 fe:00 4769 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
18196:20150515:140934.561 7f5affe81000-7f5affe91000 r-xp 00000000 fe:00 4779 /usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.16
18196:20150515:140934.561 7f5affe91000-7f5b00090000 ---p 00010000 fe:00 4779 /usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.16
18196:20150515:140934.561 7f5b00090000-7f5b00091000 r--p 0000f000 fe:00 4779 /usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.16
18196:20150515:140934.562 7f5b00091000-7f5b00092000 rw-p 00010000 fe:00 4779 /usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.16
18196:20150515:140934.562 7f5b00092000-7f5b000ab000 r-xp 00000000 fe:00 20501 /usr/lib/x86_64-linux-gnu/librtmp.so.0
18196:20150515:140934.562 7f5b000ab000-7f5b002ab000 ---p 00019000 fe:00 20501 /usr/lib/x86_64-linux-gnu/librtmp.so.0
18196:20150515:140934.562 7f5b002ab000-7f5b002ac000 rw-p 00019000 fe:00 20501 /usr/lib/x86_64-linux-gnu/librtmp.so.0
18196:20150515:140934.562 7f5b002ac000-7f5b002c2000 r-xp 00000000 fe:00 128959 /lib/x86_64-linux-gnu/libz.so.1.2.7
18196:20150515:140934.562 7f5b002c2000-7f5b004c1000 ---p 00016000 fe:00 128959 /lib/x86_64-linux-gnu/libz.so.1.2.7
18196:20150515:140934.562 7f5b004c1000-7f5b004c2000 r--p 00015000 fe:00 128959 /lib/x86_64-linux-gnu/libz.so.1.2.7
18196:20150515:140934.562 7f5b004c2000-7f5b004c3000 rw-p 00016000 fe:00 128959 /lib/x86_64-linux-gnu/libz.so.1.2.7
18196:20150515:140934.566 7f5b004c3000-7f5b004ff000 r-xp 00000000 fe:00 9752 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
18196:20150515:140934.566 7f5b004ff000-7f5b006ff000 ---p 0003c000 fe:00 9752 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
18196:20150515:140934.566 7f5b006ff000-7f5b00700000 r--p 0003c000 fe:00 9752 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
18196:20150515:140934.566 7f5b00700000-7f5b00702000 rw-p 0003d000 fe:00 9752 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
18196:20150515:140934.566 7f5b00702000-7f5b00729000 r-xp 00000000 fe:00 20516 /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
18196:20150515:140934.566 7f5b00729000-7f5b00929000 ---p 00027000 fe:00 20516 /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
18196:20150515:140934.566 7f5b00929000-7f5b0092a000 r--p 00027000 fe:00 20516 /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
18196:20150515:140934.566 7f5b0092a000-7f5b0092b000 rw-p 00028000 fe:00 20516 /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
18196:20150515:140934.566 7f5b0092b000-7f5b0095d000 r-xp 00000000 fe:00 4806 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.8
18196:20150515:140934.566 7f5b0095d000-7f5b00b5d000 ---p 00032000 fe:00 4806 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.8
18196:20150515:140934.566 7f5b00b5d000-7f5b00b5e000 r--p 00032000 fe:00 4806 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.8
18196:20150515:140934.567 7f5b00b5e000-7f5b00b5f000 rw-p 00033000 fe:00 4806 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.8
18196:20150515:140934.567 7f5b00b5f000-7f5b00b76000 r-xp 00000000 fe:00 128163 /lib/x86_64-linux-gnu/libpthread-2.13.so
18196:20150515:140934.567 7f5b00b76000-7f5b00d75000 ---p 00017000 fe:00 128163 /lib/x86_64-linux-gnu/libpthread-2.13.so
18196:20150515:140934.567 7f5b00d75000-7f5b00d76000 r--p 00016000 fe:00 128163 /lib/x86_64-linux-gnu/libpthread-2.13.so
18196:20150515:140934.567 7f5b00d76000-7f5b00d77000 rw-p 00017000 fe:00 128163 /lib/x86_64-linux-gnu/libpthread-2.13.so
18196:20150515:140934.567 7f5b00d77000-7f5b00d7b000 rw-p 00000000 00:00 0
18196:20150515:140934.567 7f5b00d7b000-7f5b00df5000 r-xp 00000000 fe:00 128545 /lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
18196:20150515:140934.567 7f5b00df5000-7f5b00ff5000 ---p 0007a000 fe:00 128545 /lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
18196:20150515:140934.567 7f5b00ff5000-7f5b00ff6000 r--p 0007a000 fe:00 128545 /lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
18196:20150515:140934.567 7f5b00ff6000-7f5b00ff9000 rw-p 0007b000 fe:00 128545 /lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
18196:20150515:140934.567 7f5b00ff9000-7f5b010b2000 r-xp 00000000 fe:00 4803 /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.4
18196:20150515:140934.567 7f5b010b2000-7f5b012b1000 ---p 000b9000 fe:00 4803 /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.4
18196:20150515:140934.567 7f5b012b1000-7f5b012b7000 r--p 000b8000 fe:00 4803 /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.4
18196:20150515:140934.568 7f5b012b7000-7f5b012b9000 rw-p 000be000 fe:00 4803 /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.4
18196:20150515:140934.568 7f5b012b9000-7f5b012d3000 r-xp 00000000 fe:00 9768 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
18196:20150515:140934.568 7f5b012d3000-7f5b014d2000 ---p 0001a000 fe:00 9768 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
18196:20150515:140934.568 7f5b014d2000-7f5b014d3000 r--p 00019000 fe:00 9768 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
18196:20150515:140934.568 7f5b014d3000-7f5b014d4000 rw-p 0001a000 fe:00 9768 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
18196:20150515:140934.568 7f5b014d4000-7f5b01656000 r-xp 00000000 fe:00 128598 /lib/x86_64-linux-gnu/libc-2.13.so
18196:20150515:140934.570 7f5b01656000-7f5b01856000 ---p 00182000 fe:00 128598 /lib/x86_64-linux-gnu/libc-2.13.so
18196:20150515:140934.570 7f5b01856000-7f5b0185a000 r--p 00182000 fe:00 128598 /lib/x86_64-linux-gnu/libc-2.13.so
18196:20150515:140934.570 7f5b0185a000-7f5b0185b000 rw-p 00186000 fe:00 128598 /lib/x86_64-linux-gnu/libc-2.13.so
18196:20150515:140934.570 7f5b0185b000-7f5b01860000 rw-p 00000000 00:00 0
18196:20150515:140934.570 7f5b01860000-7f5b01873000 r-xp 00000000 fe:00 128617 /lib/x86_64-linux-gnu/libresolv-2.13.so
18196:20150515:140934.570 7f5b01873000-7f5b01a72000 ---p 00013000 fe:00 128617 /lib/x86_64-linux-gnu/libresolv-2.13.so
18196:20150515:140934.570 7f5b01a72000-7f5b01a73000 r--p 00012000 fe:00 128617 /lib/x86_64-linux-gnu/libresolv-2.13.so
18196:20150515:140934.570 7f5b01a73000-7f5b01a74000 rw-p 00013000 fe:00 128617 /lib/x86_64-linux-gnu/libresolv-2.13.so
18196:20150515:140934.570 7f5b01a74000-7f5b01a76000 rw-p 00000000 00:00 0
18196:20150515:140934.570 7f5b01a76000-7f5b01a7d000 r-xp 00000000 fe:00 128618 /lib/x86_64-linux-gnu/librt-2.13.so
18196:20150515:140934.571 7f5b01a7d000-7f5b01c7c000 ---p 00007000 fe:00 128618 /lib/x86_64-linux-gnu/librt-2.13.so
18196:20150515:140934.571 7f5b01c7c000-7f5b01c7d000 r--p 00006000 fe:00 128618 /lib/x86_64-linux-gnu/librt-2.13.so
18196:20150515:140934.571 7f5b01c7d000-7f5b01c7e000 rw-p 00007000 fe:00 128618 /lib/x86_64-linux-gnu/librt-2.13.so
18196:20150515:140934.571 7f5b01c7e000-7f5b01c80000 r-xp 00000000 fe:00 128604 /lib/x86_64-linux-gnu/libdl-2.13.so
18196:20150515:140934.571 7f5b01c80000-7f5b01e80000 ---p 00002000 fe:00 128604 /lib/x86_64-linux-gnu/libdl-2.13.so
18196:20150515:140934.571 7f5b01e80000-7f5b01e81000 r--p 00002000 fe:00 128604 /lib/x86_64-linux-gnu/libdl-2.13.so
18196:20150515:140934.571 7f5b01e81000-7f5b01e82000 rw-p 00003000 fe:00 128604 /lib/x86_64-linux-gnu/libdl-2.13.so
18196:20150515:140934.571 7f5b01e82000-7f5b01f03000 r-xp 00000000 fe:00 128606 /lib/x86_64-linux-gnu/libm-2.13.so
18196:20150515:140934.571 7f5b01f03000-7f5b02102000 ---p 00081000 fe:00 128606 /lib/x86_64-linux-gnu/libm-2.13.so
18196:20150515:140934.571 7f5b02102000-7f5b02103000 r--p 00080000 fe:00 128606 /lib/x86_64-linux-gnu/libm-2.13.so
18196:20150515:140934.571 7f5b02103000-7f5b02104000 rw-p 00081000 fe:00 128606 /lib/x86_64-linux-gnu/libm-2.13.so
18196:20150515:140934.571 7f5b02104000-7f5b02165000 r-xp 00000000 fe:00 20537 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.2.0
18196:20150515:140934.571 7f5b02165000-7f5b02364000 ---p 00061000 fe:00 20537 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.2.0
18196:20150515:140934.572 7f5b02364000-7f5b02367000 r--p 00060000 fe:00 20537 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.2.0
18196:20150515:140934.572 7f5b02367000-7f5b02368000 rw-p 00063000 fe:00 20537 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.2.0
18196:20150515:140934.572 7f5b02368000-7f5b02376000 r-xp 00000000 fe:00 9783 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.8.3
18196:20150515:140934.572 7f5b02376000-7f5b02575000 ---p 0000e000 fe:00 9783 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.8.3
18196:20150515:140934.572 7f5b02575000-7f5b02576000 r--p 0000d000 fe:00 9783 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.8.3
18196:20150515:140934.572 7f5b02576000-7f5b02577000 rw-p 0000e000 fe:00 9783 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.8.3
18196:20150515:140934.572 7f5b02577000-7f5b025c3000 r-xp 00000000 fe:00 9784 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.8.3
18196:20150515:140934.572 7f5b025c3000-7f5b027c3000 ---p 0004c000 fe:00 9784 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.8.3
18196:20150515:140934.572 7f5b027c3000-7f5b027c5000 r--p 0004c000 fe:00 9784 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.8.3
18196:20150515:140934.572 7f5b027c5000-7f5b027c6000 rw-p 0004e000 fe:00 9784 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.8.3
18196:20150515:140934.572 7f5b027c6000-7f5b027c8000 rw-p 00000000 00:00 0
18196:20150515:140934.572 7f5b027c8000-7f5b027e8000 r-xp 00000000 fe:00 128592 /lib/x86_64-linux-gnu/ld-2.13.so
18196:20150515:140934.572 7f5b029b6000-7f5b029d3000 rw-s 00000000 00:04 2293761 /SYSV6c006bff (deleted)
18196:20150515:140934.573 7f5b029d3000-7f5b029df000 rw-p 00000000 00:00 0
18196:20150515:140934.573 7f5b029e3000-7f5b029e4000 rw-p 00000000 00:00 0
18196:20150515:140934.573 7f5b029e4000-7f5b029e5000 rw-p 00000000 00:00 0
18196:20150515:140934.573 7f5b029e5000-7f5b029e7000 rw-p 00000000 00:00 0
18196:20150515:140934.574 7f5b029e7000-7f5b029e8000 r--p 0001f000 fe:00 128592 /lib/x86_64-linux-gnu/ld-2.13.so
18196:20150515:140934.574 7f5b029e8000-7f5b029e9000 rw-p 00020000 fe:00 128592 /lib/x86_64-linux-gnu/ld-2.13.so
18196:20150515:140934.574 7f5b029e9000-7f5b029ea000 rw-p 00000000 00:00 0
18196:20150515:140934.574 7fff7f583000-7fff7f5a4000 rw-p 00000000 00:00 0 [stack]
18196:20150515:140934.574 7fff7f5ff000-7fff7f600000 r-xp 00000000 00:00 0 [vdso]
18196:20150515:140934.574 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
18196:20150515:140934.574 ================================
18196:20150515:140934.574 Please consider attaching a disassembly listing to your bug report.
18196:20150515:140934.574 This listing can be produced with, e.g., objdump -DSswx zabbix_agentd.
18196:20150515:140934.574 ================================
18188:20150515:140934.575 One child process died (PID:18196,exitcode/signal:1). Exiting ...
zabbix_agentd [18188]: Error on thread waiting.
I've Postgresql 9.1.14. The authentification of the postgres user is good when I tested it with the command-line.
I've grant access on all tables of postgres user.
Thanks,
Maxime
Sorry hated to open an issue but I'm probably not the only user of Centos 7 w/Postgres9.2. I really liked the premise behind your library but can't break the server.
Is the break because I'm using zabbix22?
[root@tcdb1 ~]# rpm -ivh libzbxpgsql-0.2.1-1.el7.x86_64.rpm
error: Failed dependencies:
zabbix-agent >= 2.2.0 is needed by libzbxpgsql-0.2.1-1.el7.centos.x86_64
[root@tcdb1 ~]# rpm -qa | grep zabb
zabbix22-2.2.10-1.el7.x86_64
zabbix22-agent-2.2.10-1.el7.x86_64
zabbix-release-2.2-1.el7.noarch
We are having an issue with zabbix monitoring for PostgreSQL instances runnning on non-default ports and could not identify the issue.
Zabbix Version - 2.4.7
PostgreSQL DB version - 9.5.1
Zabbix monitoring is setup as per the documentation. PostgreSQL server has to run with non-default port (5411) due to security issues.
I can see libzbxpgsql module is loaded from zabbix agent log on DB server.
23405:20160518:121117.214 Starting Zabbix Agent [Zabbix server]. Zabbix 2.4.7 (revision 56694).
23405:20160518:121117.214 using configuration file: /etc/zabbix/zabbix_agentd.conf
23405:20160518:121117.215 Starting agent module libzbxpgsql 0.2.1
23405:20160518:121117.215 loaded modules: libzbxpgsql.so
23405:20160518:121117.216 agent #0 started [main process]
23407:20160518:121117.216 agent #1 started [collector]
23408:20160518:121117.216 agent #2 started [listener #1]
23409:20160518:121117.217 agent #3 started [listener #2]
23410:20160518:121117.217 agent #4 started [listener #3]
23411:20160518:121117.217 agent #5 started [active checks #1]
23411:20160518:121117.217 active check configuration update from [127.0.0.1:10051] started to fail (cannot connect to [[127.0.0.1]:10051]: [111] Connection refused)
Monitoring template is imported and macros are edited to use the non-default port.
I have added below entries in both pg_hba.conf and pg_identi.conf
pg_hba.conf
local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
host all all 0.0.0.0/0 md5
host all all ::0/0 md5
host replication replication 0.0.0.0/0 md5
local postgres monitoring ident map=monitoring
pg_ident.conf
MAPNAME SYSTEM-USERNAME PG-USERNAME
monitoring root monitoring
monitoring zabbix monitoring
libzbxpgsql checks are pointing only to default port 5432.
zabbix_agentd -p | grep '^pg.'
zabbix_agentd [15363]: Starting agent module libzbxpgsql 0.2.1
pg.modver [s|libzbxpgsql 0.2.1]
zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.connect [u|0]
zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.version [m|ZBX_NOTSUPPORTED] [Unknown error.]
zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
pg.starttime [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.uptime [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.setting[,,data_directory] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.setting.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.query.string[,,SELECT 'Lorem ipsum dolor';] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.query.integer[,,SELECT pg_backend_pid();] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.query.double[,,SELECT CAST(1234 AS double precision);] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.query.discovery[,,SELECT * FROM pg_database;] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.backends.count [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.queries.longest [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.checkpoints_timed [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.checkpoints_req [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.checkpoint_write_time [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.checkpoint_sync_time [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.buffers_checkpoint [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.buffers_clean [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.maxwritten_clean [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.buffers_backend [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.buffers_backend_fsync [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.buffers_alloc [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.stats_reset [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.namespace.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.schema.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.tablespace.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.table.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.table.children.discovery[,,pg_proc] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.index.discovery [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.size [m|ZBX_NOTSUPPORTED] [Unknown error.]zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.table.size [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.table.rows [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.table.children[,,pg_database] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.table.children.size[,,pg_database] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.table.children.rows[,,pg_database] [m|ZBX_NOTSUPPORTED] [Unknown error.]
zabbix_agentd [15363]: pg.index.size [m|ZBX_NOTSUPPORTED] [Unknown error.]
Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.index.rows [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.tablespace.size[,,pg_default] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.namespace.size[,,pg_catalog] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.schema.size[,,pg_catalog] [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.numbackends [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.xact_commit [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.xact_rollback [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.blks_read [m|ZBX_NOTSUPPORTED] [Unknown error.]
pg.db.blks_hit [m|ZBX_NOTSUPPORTED] [Unknown error.]zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.db.tup_returned [m|ZBX_NOTSUPPORTED] [Unknown error.]
zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.db.tup_fetched [m|ZBX_NOTSUPPORTED] [Unknown error.]
zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?pg.db.tup_inserted [m|ZBX_NOTSUPPORTED] [Unknown error.]
zabbix_agentd [15363]: Error: Failed to connect to PostgreSQL in pg_connect():
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
And Zabbix monitoring data is completely empty
is there anything incorrect in our configuration?
Greetings,
Been messing around with your plugin for a few weeks, and may have come up with an edge case.
A previous DBA had a bad habit of setting up multiple instances of postgres to run on separate ports on a single server. With the macro {$PG_CONN} can you specify more than one port to attempt connection to, or can you only connect to a single port per database server?
Thanks for the excellent plugin!
Hi Ryan,
I'm struggling two days trying make this working already. Agent and your monitoring are successfully installed. Template is added to specific host. Testing command zabbix_agentd -p | grep '^pg\.'
shows that module is able to retreive data from Postgres.
However there are no data in 'Latest data'. At first I supposed it might be ver.3.0 compability issue but it behaves the same with Zabbix 2.4.
I'm sure agent is sending other data to server because simple item net.tcp.listen[5432]
shows data normally from active check.
Any clue where I would look for the cause?
Thanks in advance. Dan
Hi, I've searched here a lot and didn't find anything saying it is or isn't possible connecting to a PostgreSQL server on a Windows.
In the configuration, it is said I can connect to a remote server without using the agent, so I thought it could access a PostgreSQL on a Windows database without using the Agent and the lib used on linux, but I can't make the connection work. It tries to use the agent on Windows PostgreSQL Server with this error:
Zabbix Agent [STURESPPTG10]. Zabbix 3.0.0 (revision 58455).
52720:20160706:152802.654 **** Enabled features ****
52720:20160706:152802.669 IPv6 support: YES
52720:20160706:152802.669 TLS support: NO
52720:20160706:152802.669 **************************
52720:20160706:152802.685 using configuration file: C:\Zabbix\zabbix_agentd.conf
52720:20160706:152802.685 agent #0 started [main process]
13124:20160706:152802.701 agent #1 started [collector]
37224:20160706:152802.701 agent #2 started [listener #1]
72972:20160706:152802.701 agent #3 started [listener #2]
65864:20160706:152802.716 agent #4 started [listener #3]
79660:20160706:152802.716 agent #5 started [active checks #1]
79660:20160706:230606.586 active check configuration update from [10.0.1.146:10051] started to fail (ZBX_TCP_READ() failed: [0x0000274C] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
79660:20160706:230706.273 active check configuration update from [10.0.1.146:10051] is working again
79660:20160713:172002.250 active check "pg.db.discovery[host=10.0.1.107 port=5434 user=zabbix,postgres]" is not supported: Unsupported item key.
79660:20160713:172002.266 active check "pg.tablespace.discovery[host=10.0.1.107 port=5434 user=zabbix,postgres]" is not supported: Unsupported item key.
79660:20160713:172002.266 active check "pg.prepared_xacts_ratio[host=10.0.1.107 port=5434 user=zabbix,postgres]" is not supported: Unsupported item key.
.....
I've installed the libzbxpgsql, PostgreSQL Client/Libs and the libzbxpgsql.so on the Zabbix Server to try to access remotely.
Is there a way to connect on a PostgreSQL on a Windows Server 2012?
Thanks,
Cristiano
Attempting to implement on Zabbix Server & Agent 2.4.4
Here is an example of a item argument:
pg.db.discovery[host=(server ip) port=(postgresql port) connect_timeout=10,zabbix]
I have created the role "zabbix" to allow zabbix to connect to postgresql and mapped it to the DB, zabbix.
I updated the pg_hba.conf file as well as the pg_ident.conf file.
When configuring the template for use after installation, I am receiving the following error when using the command: zabbix_agentd -p | grep '^pg.'
zabbix_agentd [32343]: Starting agent module libzbxpgsql 0.2.1
zabbix_agentd [32343]: Warning: Executing command 'echo test'
pg.modver [s|libzbxpgsql 0.2.1]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.connect [u|0]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.version [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.starttime [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.uptime [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.setting[,,data_directory] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.setting.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.query.string[,,SELECT 'Lorem ipsum dolor';] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.query.integer[,,SELECT pg_backend_pid();] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.query.double[,,SELECT CAST(1234 AS double precision);] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.query.discovery[,,SELECT * FROM pg_database;] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.backends.count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.queries.longest [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.checkpoints_timed [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.checkpoints_req [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.checkpoint_write_time [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.checkpoint_sync_time [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.buffers_checkpoint [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.buffers_clean [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.maxwritten_clean [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.buffers_backend [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.buffers_backend_fsync [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.buffers_alloc [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.stats_reset [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.namespace.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.schema.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.tablespace.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.children.discovery[,,pg_proc] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.discovery [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.size [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.size [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.rows [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.children[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.children.size[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.children.rows[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.size [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.rows [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.tablespace.size[,,pg_default] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.namespace.size[,,pg_catalog] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.schema.size[,,pg_catalog] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.numbackends [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.xact_commit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.xact_rollback [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.tup_returned [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.tup_fetched [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.tup_inserted [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.tup_updated [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.tup_deleted [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.conflicts [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.temp_files [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.temp_bytes [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.deadlocks [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.blk_read_time [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.blk_write_time [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.db.stats_reset[,,postgres,,,] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.seq_scan [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.seq_tup_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.idx_scan [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.idx_tup_fetch [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.n_tup_ins [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.n_tup_upd [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.n_tup_del [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.n_tup_hot_upd [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.n_live_tup [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.n_dead_tup [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.last_vacuum[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.last_autovacuum[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.last_analyze[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.last_autoanalyze[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.vacuum_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.autovacuum_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.analyze_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.autoanalyze_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.heap_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.heap_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.idx_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.idx_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.toast_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.toast_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.tidx_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.table.tidx_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.idx_scan [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.idx_tup_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.idx_tup_fetch [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.idx_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [32343]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.index.idx_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
This isn't a duplicate of #19 I swear!
I have a new Zabbix server installation running an Ubuntu 14.04 Zabbix 2.4.7 installation with a PostgreSQL 9.4 as the DB on another server. The Agent is set up and running on the DB server, and successfully collecting data, as well as talking back to the Zabbix server.
Like Issue #19, I've followed the installation instructions to get libzbxpgsql installed, and it is actually loading as per the Zabbix agent logs:
70358:20160108:105140.485 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
70357:20160108:105140.485 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
70356:20160108:105140.486 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
70355:20160108:105140.486 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
70354:20160108:105140.487 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ...
70352:20160108:105140.488 One child process died (PID:70358,exitcode/signal:255). Exiting ...
zabbix_agentd [70352]: Error on thread waiting.
70352:20160108:105140.488 Zabbix Agent stopped. Zabbix 2.2.2 (revision 42525).
122901:20160108:105140.502 Starting Zabbix Agent [zabbix-db.lan.local]. Zabbix 2.2.2 (revision 42525).
122901:20160108:105140.502 using configuration file: /etc/zabbix/zabbix_agentd.conf
122901:20160108:105140.504 Starting agent module libzbxpgsql 0.2.1
122901:20160108:105140.504 loaded modules: libzbxpgsql.so
122906:20160108:105140.506 agent #3 started [listener #3]
122903:20160108:105140.506 agent #0 started [collector]
122907:20160108:105140.506 agent #4 started [active checks #1]
122904:20160108:105140.507 agent #1 started [listener #1]
122905:20160108:105140.507 agent #2 started [listener #2]
122907:20160108:105140.523 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
Checking the Zabbix Agent for PostgreSQL info I see:
$ sudo su -c "zabbix_agentd -p" -s /bin/bash zabbix | grep '^pg'
zabbix_agentd [3357]: Starting agent module libzbxpgsql 0.2.1
pg.modver [s|libzbxpgsql 0.2.1]
pg.connect [u|1]
pg.version [s|PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit]
pg.starttime [s|2016-01-06 15:36:03.557795-08]
pg.uptime [u|166286]
pg.setting[,,data_directory] [m|ZBX_NOTSUPPORTED]
pg.setting.discovery [s|{
pg.query.string[,,SELECT 'Lorem ipsum dolor';] [s|Lorem ipsum dolor]
pg.query.integer[,,SELECT pg_backend_pid();] [u|3381]
pg.query.double[,,SELECT CAST(1234 AS double precision);] [d|1234.000000]
pg.query.discovery[,,SELECT * FROM pg_database;] [s|{
pg.backends.count [u|7]
Also, running a Zabbix Agent check from the commandline as the Zabbix user also shows a result:
$ sudo su -c "zabbix_agentd -t "pg.queries.longest" " -s /bin/bash zabbix
zabbix_agentd [6099]: Starting agent module libzbxpgsql 0.2.1
pg.queries.longest [d|-0.001291]
The item prototypes on the Template, however, are all showing the error ZBX_NOTSUPPORTED
and the Zabbix Agent log is also showing a lot of errors:
4076:20160108:140705.156 active check "pg.buffers_backend_fsync[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.162 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.163 active check "pg.backends.count[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.170 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.170 active check "pg.buffers_alloc[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.177 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.177 active check "pg.buffers_clean[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.184 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.184 active check "pg.buffers_backend[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.189 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.190 active check "pg.buffers_checkpoint[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.194 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.194 active check "pg.checkpoint_sync_time[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.202 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.202 active check "pg.checkpoint_write_time[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.207 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.207 active check "pg.queries.longest[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.212 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.212 active check "pg.maxwritten_clean[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.219 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.219 active check "pg.version[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.224 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.224 active check "pg.checkpoints_req[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.231 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.231 active check "pg.checkpoints_timed[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:140705.237 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:140705.237 active check "pg.stats_reset[host=127.0.0.1 port=5432 user=zabbix,zabbix]" is not supported
4076:20160108:141205.654 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
4076:20160108:141705.717 Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
Any idea why when I can get that information directly via the Zabbix Agent, the Zabbix Template wouldn't be able to?
Hello,
short question, is this modul compatible with Zabbix 3.0?
best regards
Colttt
Zabbix server is up and running, Zabbix agent is installed and configured to work in active mode. libzbxpgsql.x86_64 is installed on the database host, along with the postgresql93-libs.x86_64 prerequisite.
The host has the template assigned, and the following macros are set on the host in zabbix:
{$PG_CONN}
hostaddr = 127.0.0.1 port = 5432 user = POSTGRES
{$PG_DB}
database
These work on the cli:
[root@server lib64]# psql -U postgres -h 127.0.0.1 -p 5432 database
psql (9.3.5)
Type "help" for help.
database=#
When I restart the zabbix-agent service, I get the following in /var/log/zabbix/zabbix_agentd.log :
30241:20160303:145502.900 Failed to connect to PostgreSQL server 'hostaddr = 127.0.0.1 port = 5432 user = POSTGRES' in PG_CONNECT():
invalid port number: "database"
30241:20160303:145502.900 active check "pg.version[hostaddr = 127.0.0.1 port = 5432 user = POSTGRES,database]" is not supported
Any ideas?
Shouldn't the pg.db.blk_read_time and pg.db.blk_write_time multiplies by 0.001 instead of 1000?
I complain about that because the system stats pg_stat_database.{blk_write_time|blk_read_time} store values in miliseconds, so if you want to calculate it in seconds you should divide by 1000 or multiply by 0.001.
Am I missing something?
Hi good afternoon , I need help regarding an error that is generated when loading the module libzbxpgsql
my pg_hba
Local all zabbix peer map = zabbix #prueba
my pg_ident
zabbix root zabbix
macro template
host = 127.0.0.1 port = 5432 password = user = zabbix zabbix
after making this configuration still gives the following error
zabbix_agentd [22302]: Starting agent module libzbxpgsql 0.2.1
pg.modver [s|libzbxpgsql 0.2.1]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.connect [u|0]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.version [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.starttime [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.uptime [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.setting[,,data_directory] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.setting.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.query.string[,,SELECT 'Lorem ipsum dolor';] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.query.integer[,,SELECT pg_backend_pid();] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.query.double[,,SELECT CAST(1234 AS double precision);] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.query.discovery[,,SELECT * FROM pg_database;] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.backends.count [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.queries.longest [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.checkpoints_timed [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.checkpoints_req [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.checkpoint_write_time [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.checkpoint_sync_time [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.buffers_checkpoint [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.buffers_clean [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.maxwritten_clean [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.buffers_backend [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.buffers_backend_fsync [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.buffers_alloc [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.stats_reset [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.namespace.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.schema.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.tablespace.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.children.discovery[,,pg_proc] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.discovery [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.size [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.size [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.rows [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.children[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.children.size[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.children.rows[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.size [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.rows [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.tablespace.size[,,pg_default] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.namespace.size[,,pg_catalog] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.schema.size[,,pg_catalog] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.numbackends [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.xact_commit [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.xact_rollback [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.blks_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.blks_hit [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.tup_returned [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.tup_fetched [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.tup_inserted [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.tup_updated [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.tup_deleted [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.conflicts [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.temp_files [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.temp_bytes [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.deadlocks [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.blk_read_time [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.blk_write_time [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.db.stats_reset[,,postgres,,,] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.seq_scan [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.seq_tup_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.idx_scan [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.idx_tup_fetch [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.n_tup_ins [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.n_tup_upd [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.n_tup_del [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.n_tup_hot_upd [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.n_live_tup [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.n_dead_tup [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.last_vacuum[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.last_autovacuum[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.last_analyze[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.last_autoanalyze[,,pg_database] [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.vacuum_count [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.autovacuum_count [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.analyze_count [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.autoanalyze_count [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.heap_blks_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.heap_blks_hit [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.idx_blks_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.idx_blks_hit [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.toast_blks_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.toast_blks_hit [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.tidx_blks_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.table.tidx_blks_hit [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.idx_scan [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.idx_tup_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.idx_tup_fetch [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.idx_blks_read [m|ZBX_NOTSUPPORTED]
zabbix_agentd [22302]: Error: Failed to connect to PostgreSQL in pg_connect():
fe_sendauth: no password supplied
pg.index.idx_blks_hit [m|ZBX_NOTSUPPORTED]
sh: 1: /find_dbname.sh: not found
sh: 1: /find_dbname_table.sh: not found
sh: 1: /find_sr.sh: not found
sh: 1: /find_sr_client_ip.sh: not found
sh: 1: /find_dbname.sh: not found
sh: 1: /pgsql_simple.sh: not found
sh: 1: /pgsql_primary.sh: not found
sh: 1: /pgsql_standby.sh: not found
sh: 1: /pgsql_server_funcs.sh: not found
sh: 1: /pgsql_server_funcs.sh: not found
sh: 1: /pgsql_server_funcs.sh: not found
sh: 1: /pgsql_db_funcs.sh: not found
sh: 1: /pgsql_userdb_funcs.sh: not found
sh: 1: /pgsql_tbl_funcs.sh: not found
sh: 1: /pgsql_sr_server_funcs.sh: not found
sh: 1: /pgsql_sr_server_funcs.sh: not found
sh: 1: /find_pgpool_backend.sh: not found
sh: 1: /find_pgpool_backend_ip.sh: not found
sh: 1: /pgpool_simple.sh: not found
sh: 1: /pgpool_delegate_ip.sh: not found
sh: 1: /pgpool_backend_status.sh: not found
sh: 1: /pgpool_connections.sh: not found
sh: 1: /pgpool_cache.sh: not found
Hello,
when i look to my database-log and i see a lot of errors like:
`2015-04-14 06:34:51 CEST STATEMENT: SELECT t.oid, t.spcname, a.rolname from pg_tablespace t JOIN pg_authid a ON a.oid = t.spcowner
2015-04-14 06:40:51 CEST ERROR: permission denied for relation pg_authid
why you need access to pg_authid?
Is there convenient way to discover tables across multiple databases with non-default schema (not public)? Zabbix server configured from scratch and agent configured as described in documentation.
CentOS 7, PostgreSQL version 9.4.4, Zabbix 2.4.6
PostgreSQL databases:
bash-4.2$ psql
psql (9.4.4)
Type "help" for help.
postgres=# \c test1
You are now connected to database "test1" as user "postgres".
test1=# set search_path = test1;
SET
test1=# \dt
List of relations
Schema | Name | Type | Owner
--------+----------+-------+----------
test1 | t1_table | table | postgres
(1 row)
test1=# \d t1_table
Table "test1.t1_table"
Column | Type | Modifiers
--------+---------+-----------
i | integer |
Indexes:
"t1_table_i_idx" btree (i)
test1=#
postgres=# \c test2
You are now connected to database "test2" as user "postgres".
test2=# set search_path = test2;
SET
test2=# \dt
List of relations
Schema | Name | Type | Owner
--------+----------+-------+----------
test2 | t2_table | table | postgres
(1 row)
test2=# \d t2_table
Table "test2.t2_table"
Column | Type | Modifiers
--------+---------+-----------
j | integer |
Indexes:
"t2_table_j_idx" btree (j)
agents config:
[root@sav zabbix]# cat zabbix_agentd.conf | grep -v -e "^$" | grep -v "#"
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=10.0.0.8
ServerActive=10.0.0.8
Hostname=10.0.0.10
Include=/etc/zabbix/zabbix_agentd.d/
[root@sav zabbix]# cat /etc/zabbix/zabbix_agentd.d/libzbxpgsql.conf
LoadModule=libzbxpgsql.so
agents log:
18149:20150910:190653.668 Starting Zabbix Agent [10.0.0.10]. Zabbix 2.4.6 (revision 54796).
18149:20150910:190653.668 using configuration file: /etc/zabbix/zabbix_agentd.conf
18149:20150910:190653.669 Starting agent module libzbxpgsql 0.2.0
18149:20150910:190653.669 loaded modules: libzbxpgsql.so
Connection string is configured by this way
{$PG_CONN} -> host=10.0.0.10 port=5432 user=zbx
{$PG_DB} -> postgres
After starting of agent and enabling tables discovery rule I can see successfully established connection to postgres database under zbx user:
2015-09-11 09:50:12 GMT 10.0.0.10 zbx postgres ##LOG: connection authorized: user=zbx database=postgres
then query from pg.table.discovery appears with predictably empty result.
2015-09-11 09:50:12 GMT 10.0.0.10 zbx postgres ##LOG: duration: 0.257 ms execute <unnamed>: SELECT c.oid AS oid , current_database() AS database , n.nspn
ame AS schema , CASE c.reltablespace WHEN 0 THEN (SELECT ds.spcname FROM pg_tablespace ds JOIN pg_database d ON d.dattablespace = ds.oid WHERE d.datname = c
urrent_database()) ELSE (SELECT spcname FROM pg_tablespace WHERE oid = c.reltablespace) END AS tablespace , c.relname AS table ,t.typname AS typ
e , pg_catalog.pg_get_userbyid(c.relowner) AS owner , (SELECT COUNT(inhparent) FROM pg_inherits WHERE inhrelid = c.oid) AS issubclass , pg_catalog.obj_descr
iption(c.oid, 'pg_class') as description FROM pg_class c JOIN pg_namespace n ON c.relnamespace = n.oid JOIN pg_type t ON c.reltype = t.oid WHERE c.relkind='r' A
ND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' AND n.nspname !~ '^pg_toast' ORDER BY c.relname
If I only change {$PG_DB} to "test1" value in template or set it in host macros - table discovered ok.
Databases discoveries are establishing connections to different databases (not only from {$PG_DB}):
2015-09-11 10:52:24 GMT 10.0.0.10 zbx test1 ##LOG: duration: 0.195 ms execute <unnamed>: SELECT SUM(seq_scan::bigint) FROM pg_stat_all_tables WHERE schemaname <>
'pg_catalog' AND schemaname <> 'information_schema' AND schemaname !~ '^pg_toast'
2015-09-11 10:52:24 GMT 10.0.0.10 zbx test2 ##LOG: duration: 0.220 ms execute <unnamed>: SELECT SUM(seq_scan::bigint) FROM pg_stat_all_tables WHERE schemaname <>
'pg_catalog' AND schemaname <> 'information_schema' AND schemaname !~ '^pg_toast'
Whats wrong in my configuration? Or how can I discover tables from more than one databases automatically?
Hey Ryan,
I tried to add two more item prototypes in the "Discover Postgresql Databases" discovery rule using the "pg.query.integer" key to pull in lock wait counts and also idle-in-transaction counts by DB. But Zabbix is complaining "Cannot create item: item already exists with the same key".
Am I going about this wrong? Is there something I need to do to make them unique?
I've attached the xml for the new prototypes.
Thanks,
Rob
Hello.
First of all, thank you for your module!
I've been struggling to setup monitoring of remote pgsql server for three
days now. I'm almost sure I'm missing something trivial. Could you please
give me a hint? I've studied #19, #29 and #30, there was some useful
info for me, but still no success.
My setup:
zabbix server 192.168.44.99
pgsql server 192.168.44.124
On pgsql server I have zabbix agent installed which loads
libzbxpgsql.so at startup:
14509:20160226:003955.740 Starting Zabbix Agent [soder stage]. Zabbix 2.4.7 (revision 56694).
14509:20160226:003955.740 using configuration file: /etc/zabbix/zabbix_agentd.conf
14509:20160226:003955.741 Starting agent module libzbxpgsql 0.2.1
14509:20160226:003955.741 loaded modules: libzbxpgsql.so
14509:20160226:003955.742 agent #0 started [main process]
14512:20160226:003955.742 agent #1 started [collector]
14513:20160226:003955.743 agent #2 started [listener #1]
14514:20160226:003955.743 agent #3 started [listener #2]
14515:20160226:003955.743 agent #4 started [listener #3]
On pgsql server there is access for user zabbix from localhost via tcp
and via socket without authorization and access from zabbix server.
pg_hba.conf has these lines:
local all zabbix trust
host all zabbix 127.0.0.1/32 trust
host all zabbix 192.168.44.99/32 trust
host all zabbix ::1/128 trust
On zabbix server i've created new host, added
template "Template PostgreSQL Server" to it and in "Macros" section
for this host I have these values:
{$PG_CONN} => user=zabbix,postgres
{$PG_DB} => postgres
Btw, are these values relative to zabbix agent running on pgsql
server, or should i add "host=192.168.44.124" to this string? I've tried both variant with the same resut.
In section "agent interfaces" for this host I have an entry with its
ip 192.168.44.124 and port 10050.
I see packets with tcpdump between zabbix and psql servers on port
10050, and zabbix reports that its agent on psql is ok, but i receive
no data about postgres, all values are empty. In "Latest data" section
all values about Postgres Server have "-" sign. So it looks like
zabbix does not even try to gather data from postgres.
Thanks in advance.
Zabbix agent fails loading the /usr/lib64/modules/libzbxpgsql.so module, it's blocked by selinux. The zabbix agent context is zabbix_agent_t.
Complete selinux/audit log:
type=AVC msg=audit(1450956124.124:2421): avc: denied { execute } for pid=16905 comm="zabbix_agentd" path="/usr/lib64/modules/libzbxpgsql.so" dev="dm-0" ino=18252580 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=file
Temporary workaroud:
semanage permissive -a zabbix_agent_t
Permanent policy:
allow zabbix_agent_t modules_object_t:file execute;
Maybe the permanent policy has to be included in the zabbix distribution...
Also there can be an own class (e.g. libzbxpgsl_object_t) for which zabbix_agent_t can get policy access.
Hi -
So first of, my apologizes if this isn't the proper venue for raising this kind of request since it's not really a bug.
I've been asked to monitor table size in Postgress using pg_table_size rather than the method used natively by this plugin. i.e.: (SELECT (CAST(relpages AS bigint) * 8192)FROM pg_class WHERE relkind='r' AND relname = '%sโ
I can easily do a custom SQL check and do something like SELECT pg_table_size('schema.table'); and get the information that I need. However I don't want to have to create a bunch of custom SQL queries by hand. There's multiple schemas involved here as well.
Is there a relatively easy way to accomplish this with libzbxpgsql?
Thanks!
19233:20151115:015630.149 Zabbix Agent stopped. Zabbix 2.4.6 (revision 54796).
20276:20151115:015630.176 Starting Zabbix Agent [BlueMind]. Zabbix 2.4.6 (revision 54796).
20276:20151115:015630.176 using configuration file: /etc/zabbix/zabbix_agentd.conf
20276:20151115:015630.177 Starting agent module libzbxpgsql 0.2.1
20276:20151115:015630.178 agent #0 started [main process]
20277:20151115:015630.178 agent #1 started [collector]
20278:20151115:015630.178 agent #2 started [listener #1]
20279:20151115:015630.178 agent #3 started [listener #2]
20280:20151115:015630.178 agent #4 started [listener #3]
20281:20151115:015630.179 agent #5 started [active checks #1]
20282:20151115:015630.179 agent #6 started [active checks #2]
20281:20151115:015630.182 Failed to connect to PostgreSQL in pg_connect():
missing "=" after "monitoring" in connection info string
20282:20151115:015631.023 Failed to connect to PostgreSQL in pg_connect():
missing "=" after "monitoring" in connection info string
Hey Ryan,
This module rocks! It's pretty awesome!
But I did find what appears to be a minor bug.
If I enable table and index auto-discovery then it appears to only discover them in the DB defined by the PG_DB macro, not all the DBs that zabbix can connect to.
I'm using:
PG 9.4.6 running on Centos 6.7 x86_86
Zabbix 2.4.7 running on Centos 7.2.1511 x86_64
I have 2 DBs on postgres:
zabbix (containing the zabbix tables)
pgbench (the benchmarking tables)
I have no filters set in the discovery.
When I left the default PG_DB macro set to the "postgres" DB it failed to discover any tables because the "postgres" DB was empty. Everything other than individual table and index metrics appeared to be collected for the "zabbix" DB.
When I switched PG_DB macro to "zabbix" it then discovered all the Zabbix tables and indexes. Then I switched PG_DB to "pgbench" and it discovered the tables and indexes there.
Thanks!
Rob
There are RHEL packages for libzbxpgsql in Sourceforge.
It would be better if these packages were served as a package repository, so the repository could be added and updates in the future could be managed by yum automatically.
Hi,
I configured everything correct ( i think ) i see the module being loaded. The test works, but my zabbix server gets no data, and i don't see anything in the logs... ( i don't see anything in the lagent logs on debug level either )
i am using zabbix 2.4.6 and the latest libzbxpgsql rpm on centos6
Currently all items log an error when returning ZBX_NOTSUPPORTED
but they should also return via SET_MSG_RESULT
so the zabbix server can record the error message.
Operation seems ok on CentOS 5 x86_64 except when running
$ zabbix_agentd -t pg.modver
The agent seems to return the module version okay, in amongst a segfault stack dump.
zabbix_agentd [6]: Starting agent module libzbxpgsql 0.2.1
zabbix_agentd [6]: ERROR: Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x3]. Crashing ...
zabbix_agentd [6]: ERROR: ====== Fatal information: ======
zabbix_agentd [6]: ERROR: Program counter: 0x3
zabbix_agentd [6]: ERROR: === Registers: ===
zabbix_agentd [6]: ERROR: r8 = 7ffc4bcc5ed0 = 140721580170960 = 140721580170960
zabbix_agentd [6]: ERROR: r9 = 2444258 = 38027864 = 38027864
zabbix_agentd [6]: ERROR: r10 = 0 = 0 = 0
zabbix_agentd [6]: ERROR: r11 = ffffffff = 4294967295 = 4294967295
zabbix_agentd [6]: ERROR: r12 = 0 = 0 = 0
pg.modver [s|libzbxpgsql 0.2.1]
zabbix_agentd [6]: ERROR: r13 = 7ffc4bcc6320 = 140721580172064 = 140721580172064
zabbix_agentd [6]: ERROR: r14 = 0 = 0 = 0
zabbix_agentd [6]: ERROR: r15 = 0 = 0 = 0
zabbix_agentd [6]: ERROR: rdi = 7f7056311480 = 140120459121792 = 140120459121792
zabbix_agentd [6]: ERROR: rsi = 0 = 0 = 0
zabbix_agentd [6]: ERROR: rbp = 7ffc4bcc6200 = 140721580171776 = 140721580171776
zabbix_agentd [6]: ERROR: rbx = 2443400 = 38024192 = 38024192
zabbix_agentd [6]: ERROR: rdx = 3 = 3 = 3
zabbix_agentd [6]: ERROR: rax = 0 = 0 = 0
zabbix_agentd [6]: ERROR: rcx = 0 = 0 = 0
zabbix_agentd [6]: ERROR: rsp = 7ffc4bcc61e8 = 140721580171752 = 140721580171752
zabbix_agentd [6]: ERROR: rip = 3 = 3 = 3
zabbix_agentd [6]: ERROR: efl = 10246 = 66118 = 66118
zabbix_agentd [6]: ERROR: csgsfs = 33 = 51 = 51
zabbix_agentd [6]: ERROR: err = 14 = 20 = 20
zabbix_agentd [6]: ERROR: trapno = e = 14 = 14
zabbix_agentd [6]: ERROR: oldmask = 0 = 0 = 0
zabbix_agentd [6]: ERROR: cr2 = 3 = 3 = 3
zabbix_agentd [6]: ERROR: === Backtrace: ===
http://cavaliercoder.com/libzbxpgsql/agent-keys/
Local monitoring agent
Where it has:-
pg.connect[host=localhost user=monitoring,postgres]
localhost is wrong, it should the dir of your pid file, ie /tmp/
So:-
pg.connect[host=/tmp/ user=monitoring,postgres]
RPM with zabbix-agent in RHEL-like systems is named zabbix22-agent.
Hello,
on postgres 9.3 i dont get values from pg.setting = "ZBX_NOTSUPPORTED"
on Postgres 8.4 i don't get items like psql.db_deadlocks, psql.db_temp_bytes, psql.idle_tx_connections etc.. "Received value [] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]"
I have following:
zabbix-agent 2.4.6-1
zabbix-server 2.4.6-1
database server pgsql 9.3 (zabbix agent)
libzbxpgsql 0.2.1-1
postgresql-libs-8.4.20-3
getting following error after installing libzbxpgsql on a database server.
pg.db.stats_reset[,,postgres,,,] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.seq_scan [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.seq_tup_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.idx_scan [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.idx_tup_fetch [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.n_tup_ins [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.n_tup_upd [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.n_tup_del [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.n_tup_hot_upd [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.n_live_tup [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.n_dead_tup [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.last_vacuum[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.last_autovacuum[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.last_analyze[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.last_autoanalyze[,,pg_database] [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.vacuum_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.autovacuum_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.analyze_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.autoanalyze_count [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.heap_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.heap_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.idx_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.idx_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.toast_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.toast_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.tidx_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.table.tidx_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.index.idx_scan [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.index.idx_tup_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.index.idx_tup_fetch [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.index.idx_blks_read [m|ZBX_NOTSUPPORTED] [Item is not supported.]
zabbix_agentd [4233]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: role "root" does not exist
pg.index.idx_blks_hit [m|ZBX_NOTSUPPORTED] [Item is not supported.]
in version 0.2.0 and 0.2.1 all/most of the items are working, but i get the following error very often for all items:
30996:20150922:093459.364 item "morbo:pg.table.idx_scan[{$PG_CONN},zabbix]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.db.tup_deleted[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.table.n_tup_del[{$PG_CONN},postgres]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.db.tup_inserted[{$PG_CONN},{$PG_DB},postgres]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.db.tup_inserted[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.db.tup_returned[{$PG_CONN},{$PG_DB},postgres]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.db.tup_returned[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.setting[{$PG_CONN},{$PG_DB},archive_command]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.setting[{$PG_CONN},{$PG_DB},archive_mode]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.setting[{$PG_CONN},{$PG_DB},archive_timeout]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.setting[{$PG_CONN},{$PG_DB},array_nulls]" became not supported: Unknown error.
30996:20150922:093459.364 item "morbo:pg.setting[{$PG_CONN},{$PG_DB},authentication_timeout]" became not supported: Unknown error.
here a grep for a specific item..
30994:20150922:081957.187 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30996:20150922:083408.464 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became supported
30995:20150922:083458.585 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30995:20150922:084904.863 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became supported
30994:20150922:084954.941 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30996:20150922:090406.310 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became supported
30993:20150922:090456.469 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30995:20150922:091907.890 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became supported
30994:20150922:091957.976 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30993:20150922:093409.239 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became supported
30994:20150922:093454.362 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
30994:20150922:094910.581 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became supported
30996:20150922:094955.646 item "morbo:pg.db.temp_files[{$PG_CONN},{$PG_DB},zabbix]" became not supported: Unknown error.
i will try to debug them, to get more informations
Hi again.
I have stumbled upon such a problem. When i tried to get table size of a table which size is 8Gb i get an error from Postgres saying that integer value is out of range. I found out that table size is obtained by this string in pg_table.c:
So relpages*8192 = 8496332800 and it's out of int range which is from -2147483648 to +2147483647. So i force data type to bigint
and for other get_table_size items.
Maybe it's not an issue. But sometimes tables take so much space))
I have the same problem. I am using two different Postgres servers and a copy of the template for each of them. Each template has its own name and connection data to the database.
On the first server everything is working properly.
However on the second server the template is experiencing the problem that appears in prints.
The only difference is that the second server, access to customer data is being done through a vpn, and the data that the client sends to the server (active check) are directly by the Internet, outside the vpn.
also follow the settings of my zabbix client.
I'm not having problems with passwords, users, or network.
postgres@:~$ /usr/sbin/zabbix_agentd -p | grep '^pg.'
zabbix_agentd [13503]: Starting agent module libzbxpgsql 0.2.1
pg.modver
pg.connect
pg.version
pg.starttime
pg.uptime
pg.setting[,,data_directory]
pg.setting.discovery
pg.query.string[,,SELECT 'Lorem ipsum dolor';]
pg.query.integer[,,SELECT pg_backend_pid();]
pg.query.double[,,SELECT CAST(1234 AS double precision);]
pg.query.discovery[,,SELECT * FROM pg_database;]
pg.backends.count
pg.queries.longest
pg.checkpoints_timed
pg.checkpoints_req
pg.buffers_clean
pg.maxwritten_clean
pg.buffers_backend
pg.buffers_backend_fsync
pg.buffers_alloc
pg.stats_reset
pg.db.discovery
pg.namespace.discovery
pg.schema.discovery
pg.tablespace.discovery
pg.table.discovery
pg.table.children.discovery[,,pg_proc]
pg.index.discovery
pg.db.size
pg.table.size
pg.table.rows
pg.table.children[,,pg_database]
pg.table.children.size[,,pg_database]
pg.table.children.rows[,,pg_database]
pg.index.size
pg.index.rows
pg.tablespace.size[,,pg_default]
pg.namespace.size[,,pg_catalog]
pg.schema.size[,,pg_catalog]
pg.db.numbackends
pg.db.xact_commit
pg.db.xact_rollback
pg.db.blks_read
pg.db.blks_hit
pg.db.tup_returned
pg.db.tup_fetched
pg.db.tup_inserted
pg.db.tup_updated
pg.db.tup_deleted
pg.db.conflicts
pg.db.temp_files
pg.db.temp_bytes
pg.db.deadlocks
pg.db.blk_read_time
pg.db.blk_write_time
pg.db.stats_reset[,,postgres,,,]
pg.table.seq_scan
pg.table.seq_tup_read
pg.table.idx_scan
pg.table.idx_tup_fetch
pg.table.n_tup_ins
pg.table.n_tup_upd
pg.table.n_tup_del
pg.table.n_tup_hot_upd
pg.table.n_live_tup
pg.table.n_dead_tup
pg.table.last_vacuum[,,pg_database]
pg.table.last_autovacuum[,,pg_database]
pg.table.last_analyze[,,pg_database]
pg.table.last_autoanalyze[,,pg_database]
pg.table.vacuum_count
pg.table.autovacuum_count
pg.table.analyze_count
pg.table.autoanalyze_count
pg.table.heap_blks_read
pg.table.heap_blks_hit
pg.table.idx_blks_read
pg.table.idx_blks_hit
pg.table.toast_blks_read
pg.table.toast_blks_hit
pg.table.tidx_blks_read
pg.table.tidx_blks_hit
pg.index.idx_scan
pg.index.idx_tup_read
pg.index.idx_tup_fetch
pg.index.idx_blks_read
pg.index.idx_blks_hit
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.0.110,192.168.0.254
ServerActive=192.168.0.110,zabbix.xxxxxxxxx.com
root@:~# /etc/init.d/zabbix-agent restart
Stopping Zabbix agent zabbix_agentd
...done.
Starting Zabbix agent zabbix_agentd
...done.
27678:20160721:084628.597 Zabbix Agent stopped. Zabbix 3.0.0 (revision 58460).
14334:20160721:084628.642 Starting Zabbix Agent [srvi0019]. Zabbix 3.0.0 (revision 58460).
14334:20160721:084628.642 **** Enabled features ****
14334:20160721:084628.642 IPv6 support: YES
14334:20160721:084628.642 TLS support: YES
14334:20160721:084628.642 **************************
14334:20160721:084628.642 using configuration file: /etc/zabbix/zabbix_agentd.conf
14334:20160721:084628.642 Starting agent module libzbxpgsql 0.2.1
14334:20160721:084628.643 agent #0 started [main process]
14335:20160721:084628.643 agent #1 started [collector]
14336:20160721:084628.644 agent #2 started [listener #1]
14340:20160721:084628.644 agent #6 started [active checks #2]
14339:20160721:084628.644 agent #5 started [active checks #1]
14338:20160721:084628.646 agent #4 started [listener #3]
14337:20160721:084628.646 agent #3 started [listener #2]
root@:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
I faced with some module errors trying to connect to database.
My macros configuration of Zabbix-agent:
{$PG_CONN} => host=pgmanager.com port=6789 user=ubuntu password=mypass
{$PG_DB} => qa
The first error I get at the Zabbix-agent log:
897:20160727:075843.275 PostgreSQL: ERROR: No such database: template1
897:20160727:075843.275 active check "pg.index.discovery[host=pgmanager.com port=6789 user=ubuntu password=mypass]" is not supported
897:20160727:075843.281 PostgreSQL: ERROR: No such database: template1
897:20160727:075843.281 active check "pg.table.discovery[host=pgmanager.com port=6789 user=ubuntu password=mypass]" is not supported
The second one I have trying to check I get items with zabbix_agentd -p | grep '^pg\.'
:
zabbix_agentd [1221]: Starting agent module libzbxpgsql 1.0.0
pg.modver
zabbix_agentd [1221]: Error: PostgreSQL: FATAL: role "ubuntu" does not exist
pg.connect
zabbix_agentd [1221]: Error: PostgreSQL: FATAL: role "ubuntu" does not exist
pg.version [m|ZBX_NOTSUPPORTED]
zabbix_agentd [1221]: Error: PostgreSQL: FATAL: role "ubuntu" does not exist
pg.starttime [m|ZBX_NOTSUPPORTED]
zabbix_agentd [1221]: Error: PostgreSQL: FATAL: role "ubuntu" does not exist
I set especially in my DBMS ubuntu
role to ignore such stuff. I carelessly can connect to desired database directly by psql
. But it doesn't work in my configuration. Also I still can't get anything in Zabbix server. What could I do wrong? Is there a clear way to fix it?
We can monitor idle connections by - SELECT COUNT(datid) FROM pg_stat_activity where state='idle';
but currently monitoring of idle pgsql connections are not available.
I suppose it should be done in pg.backends.count in which currently implemented -something similar SELECT COUNT(datid) FROM pg_stat_activity where waiting='f';
This is using the libzbxpgsql module 0.2.1 from RPM.
It looks like the "Longest running query" is getting incorrect data. I'm getting back negative values
around -1.4ms on an idle system:
2016-04-29 13:35:04 -0.0012
2016-04-29 13:30:04 -0.0016
2016-04-29 13:25:03 -0.0013
When I enable full logging I see the following query, which appears correct:
SELECT EXTRACT(EPOCH FROM NOW()) - EXTRACT(EPOCH FROM query_start) AS duration FROM pg_stat_activity WHERE state = 'active' ORDER BY duration DESC LIMIT 1
When I run the SQL manually I always get zero on my idle system.
Could the module be returning the wrong data?
Thanks,
Rob
Hey Ryan,
I'm trying to use your pg.query.integer key and I've run into a limitation on the length of the key. Looks like Zabbix has a 255 character limit on key length, which limits the SQL query to around 200 characters (depending on other parameters). I was hoping it was only a limitation on the UI, but even editing the XML for the template and trying to import it gives the same error.
As a workaround I'm going to try using a variable macro to form part of the query. If all else fails I'll create a function in the DB (but I really, really want to avoid that since we'll have dozens of deployments).
I also intend to create some queries to monitor application-level tables, and these queries could also exceed the length limitation.
Can you suggest another method to pass a long query to your plugin keys?
Thanks,
Rob
Implement monitoring of streaming replication as per https://wiki.postgresql.org/wiki/Streaming_Replication
Hello,
I am trying this to monitor postgresql bdr database node or postgresql database. My OS is debian jessie 64 bit and I tried to install is with deb package but it did not work, it installed but it did not return anything with zabbix_agentd -p | grep '^pg.' So I installed it with source package and include modules and it start showing module loaded "loaded modules: libzbxpgsql.so" in logs file. I created a user in root with connect to access for all database in postgresql.
host all root 127.0.0.1/32 trust
host all root 10.11.12.7/32 trust
10.11.12 is mine zabbix server ip address.
but when I run zabbix_agentd -p | grep '^pg.' it give a lot below errors for different parameters.
zabbix_agentd [4594]: Starting agent module libzbxpgsql 0.2.1
pg.modver [s|libzbxpgsql 0.2.1]
zabbix_agentd [4594]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.connect [u|0]
zabbix_agentd [4594]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.version [m|ZBX_NOTSUPPORTED]
zabbix_agentd [4594]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.starttime [m|ZBX_NOTSUPPORTED]
zabbix_agentd [4594]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
pg.uptime [m|ZBX_NOTSUPPORTED]
zabbix_agentd [4594]: Error: Failed to connect to PostgreSQL in pg_connect():
FATAL: database "root" does not exist
template macros settings are given below.
{$PG_CONN} โ host=127.0.0.1 port=5432
{$PG_DB} โ postgres
postgresql errors are
root@root FATAL: database "root" does not exist
Zabbix server package version
root@zabbix:~# dpkg -l | grep zabbix
ii zabbix-agent 1:2.4.7-1+jessie amd64 network monitoring solution - agent
ii zabbix-frontend-php 1:2.4.7-1+jessie all network monitoring solution - PHP front-end
ii zabbix-release 2.4-1+jessie all Zabbix official repository configuration
ii zabbix-server-mysql 1:2.4.7-1+jessie amd64 network monitoring solution - server (using MySQL)
zabbix client version
root@pg1:~# dpkg -l | grep zabbix
ii zabbix-agent 1:2.2.7+dfsg-2 amd64 network monitoring solution - agent
output of zabbix_get command
root@zabbix:# zabbix_get -s pg1 -p 10050 -k pg.connect# zabbix_get -s pg1 -p 10050 -k pg.index.idx_scan
0
root@zabbix:
ZBX_NOTSUPPORTED
May be I am missing something.
Is there any zabbix commands to check connectivity with postgresql on client side. If I use psql I am able to connect to pg server.
root@pg1:~# psql -U root postgres
psql (9.4.5)
Type "help" for help.
I tried zabbix_get with below commands.
root@zabbix:# zabbix_get -s pg1 -p 10050 -k pg.connect# zabbix_get -s pg1 -p 10050 -k pg.index.idx_scan
0
root@zabbix:
ZBX_NOTSUPPORTED
Thanks
Amit Bondwal
Hi! Thank you for your plugin. It's great and useful. But somehow the CPU usage goes straight up after adding template to host. I tried to exclude almost everything in discovery section without any improvement.
Can you give some tips to tune your plugin to reduce such CPU consumption?
Hello,
I would like to ask for advice because of strange behaviour of zabbix-agent with 'libzbxpgsql' module.
Everything works fine, but no data coming from zabbix agent 'libzbxpgsql' module.
Zabbix Agent works fine, can see data from 'Template OS Linux' in Zabbix Web, but no data from 'Template PostgreSQL Server'.
So I started investigating.
Scenario
Zabbix (agent, server) v3.0.3
libzbxpgsql v0.2.1
Both systems: CentOS Linux release 7.2.1511 (Core) (on VMware)
SELinux is disabled.
When I try to get some "genereral" key (e.g. system.cpu.load[all,avg1]
), it is OK, but when I try to get some key from 'libzbxpgsql' library (e.g. pg.modver
), I get:
zabbix_get [11939]: Check access restrictions in Zabbix agent configuration
All processes are running as 'zabbix' user.
I am connecting to database as 'monitoring' user with peer auth mapped from user 'zabbix', it works OK.
More debug info in attachment (using 'zabbix_get').
debug.txt
I really have no other ideas what to try, so will be very thankfull for any advice.
There appears to be a connection leak in one of the items. Based on the frequency in my Zabbix deployment it should be a discovery rule. The last run query on each backend is:
SELECT setting FROM pg_settings WHERE name='server_version_num'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.