-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect or disable log #145
Comments
Really sorry. Wrong forum. I was looking to solve Apache logs on Zabbix. |
I'm reopening this. Also libzbxpgsql log files generated on zabbix_agentd.log are too extensive. Is there a way to redirect this to another file? |
I read those threads but no solution is there :( |
Please provide some context. Which Zabbix version do you use? Did you compile module yourself or installed from packages? |
I'm using Zabbix 4.2.3 from packages from repo.zabbix.com. I'm using Ubuntu 18.04. Everything runs fine. Just the zabbix log file is huge. Follows example of text in log file:
and much more |
Which version of Zabbix did you use to compile the module? I think it may help if you take Zabbix 4.2.3 sources and recompile the module. |
I did that. I compiled the module using the source code of Zabbix 4.2.3. |
Hm, have you restarted Zabbix agents after that? |
Yes. Still no good |
If you have nothing to loose, you can try out #142. |
The log messages you posted should only be visible in |
@cavaliercoder, as I understand, @shayani is seeing these messages without raising log level to |
The Zabbix loglevel is on WARN and even after recompiling the module, I'm still seeing the extensive DEBUG-like info. |
I can't believe this. Please double-check everything. When Zabbix agent starts it prints its version in the log. Module also prints its version and the version of Zabbix it was compiled for. You can also get the latter from the binary: $ strings ~/libzbxpgsql.so | grep '^[[:digit:]].[[:digit:]].[[:digit:]]$' Make sure Zabbix loads the correct binary of the module. |
When I start zabbix_agentd, it shows the versions:
When I run the strings commands:
The file |
What will |
|
Could you please check this? $ grep HAVE___VA_ARGS__ /path/to/zabbix_source_dir/include/config.h |
|
config.h, not config.h.in |
|
Wait, this file is required to compile the module... It is generated automatically when you run ./configure script. |
Oh, I see. This module uses Autotools too and has its own config.h which is probably included into Zabbix sources when they need it. Try to run ./configure in Zabbix source directory, recompile the module and restart the agent. I think you will be fine after that. |
I ran
Finally, restarted the agent. The moduled loaded fine, but still looks lots of info on the log file. |
Hm... Can you check this again? $ grep HAVE___VA_ARGS__ /root/zabbix-4.2.3/include/config.h |
|
OK, this is good. This is how it should be, I guess. But I can't understand why module recompilation did not pick up this change. Have you just removed .so file? Have you done As a last resort, you can put #define HAVE___VA_ARGS__ 1 on top of src/libzbxpgsql.h file. |
Oh, I did not execute I did it now and recompiled the module. Now it's working fine! Thanks! |
How to change the log level for libzbxpgsql, or redirect them to another file? My zabbix_server.log is too chatty and I cannot read others important log warnings.
Thanks
The text was updated successfully, but these errors were encountered: