[ZBX-9410] Can't use syslog (eventlog) logging with Zabbix agent on Windows Created: 2015 Mar 18 Updated: 2019 Jan 17 Resolved: 2015 Mar 23 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.0.14 |
Fix Version/s: | 2.0.15rc1, 2.2.10rc1, 2.4.5rc1, 2.5.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Andris Zeila | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | eventlog, logging, windows | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Windows |
Description |
On Windows when LogFile option is not set Zabbix agent is supposed to write log messages to Windows event log. But the ReportEvent( system_log_handle, wType, 0, MSG_ZABBIX_MESSAGE, NULL, sizeof(*strings)-1, 0, strings, NULL); fails with ERROR_INVALID_PARAMETER because the wNumStrings parameter is calculated incorrectly. It should be sizeof(strings) / sizeof(*strings) rather than sizeof(*strings)-1 Another problem is that agent always tries to use "Zabbix Agent" as event source event if multiple-agents startup option was specified. |
Comments |
Comment by Andris Zeila [ 2015 Mar 18 ] |
Additionally would be great to write eventlog message if LogFile was set and agent failed to open it. Otherwise with services there is no way to tell why the agent did not start. wiper Because of complexity a new issue was created for this improvement: ZBXNEXT-2752 |
Comment by Andris Zeila [ 2015 Mar 19 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9410 |
Comment by Aleksandrs Saveljevs [ 2015 Mar 23 ] |
(1) Help for Zabbix agent currently says:
" -m --multiple-agents Service name will include hostname",
It seems that "-m" is only meant for Zabbix agent installed as a service, but the changes in the branch also make the agent name include hostname if the agent is started as a stand-alone application. It should be discussed whether this is good. asaveljevs After discussion with sasha we decided that this is not good - "-m" should only be used with services and we do not really advertise the fact that agent can be started in the console. wiper RESOLVED in r52819 asaveljevs Good, except that files include/version.h and build/win32/project/resource.rc were accidentally committed. After reverting these changes, it should be good to merge. CLOSED. |
Comment by Andris Zeila [ 2015 Mar 23 ] |
Released in:
|