Closed rfyodorov closed 11 months ago
In oldes version 6.4.2 everything normal.
I tried put #define HAVE___VA_ARGS__ 1
in src/libzbxpgsql.h it doen't help.
@rfyodorov, could you please give https://github.com/i-ky/libzbxpgsql/tree/fix-for-ZBX-22336 a try?
If you're using 6.4 then you should consider migrating to zabbix_agent2
and its PostreSQL plugin.
https://www.zabbix.com/documentation/current/en/manual/appendix/config/zabbix_agent2_plugins/postgresql_plugin
@rfyodorov, could you please give https://github.com/i-ky/libzbxpgsql/tree/fix-for-ZBX-22336 a try?
Thank you very much @i-ky Your patch helped me.
Now looks good:
249945:20231102:143147.260 Starting Zabbix Agent [linux]. Zabbix 6.4.8 (revision ecda9311a92). 249945:20231102:143147.261 **** Enabled features **** 249945:20231102:143147.261 IPv6 support: YES 249945:20231102:143147.261 TLS support: YES 249945:20231102:143147.261 ************************** 249945:20231102:143147.261 using configuration file: /etc/zabbix/zabbix_agentd.conf 249945:20231102:143147.264 using module configuration file: /etc/zabbix/libzbxpgsql.conf 249945:20231102:143147.265 agent #0 started [main process] starting agent module Zabbix 6.4.8249946:20231102:143147.266 agent #1 started [collector] 249947:20231102:143147.266 agent #2 started [listener #1] 249948:20231102:143147.267 agent #3 started [listener #2] 249949:20231102:143147.267 agent #4 started [listener #3] 249950:20231102:143147.268 agent #5 started [active checks #1]
zabbix_agentd -t pg.modver zabbix_agentd [259285]: using module configuration file: /etc/zabbix/libzbxpgsql.conf starting agent module Zabbix 6.4.8pg.modver [s|Zabbix 6.4.8, compiled for Zabbix 6.4.8]
I had some problems with the build (used source zabbix-6.4.8):
1) It was necessary to replace the names of libraries src/libzbxpgsql.h
- #include <sysinc.h>
+ #include <zbxsysinc.h>
- #include <common.h>
+ #include <zbxcommon.h>
2) Also I added the folder "common" in variable ZABBIX_HEADERS in m4/ax_lib_zabbix.m4
if test -f "$ZABBIX_HEADERS/include/module.h"; then
- ZABBIX_HEADERS="$ZABBIX_HEADERS/include"
+ ZABBIX_HEADERS="$ZABBIX_HEADERS/include -I$ZABBIX_HEADERS/include/common"
@OrangeDog, would you be interested in a PR with my fix?
@i-ky I'm happy to merge most things. As I mentioned, the use-case for this project is rapidly dwindling anyway.
In new versions zabbix_agent > 6.4.3 i got message:
failed to find both zabbix_check_log_level() and zbx_log_level, be aware that module may spam with log messages
At result I see huge messages in zabbix_agent.log
May be somebody can fix it?