After agent install and edited the agent config file but how to check syntax and configuration correct or not ? without starting the agent .
Ad Widget
Collapse
how to check zabbix agent config syntax ?
Collapse
X
-
By starting the agent?
If there would be a syntax error, the agent would not start as service and the error messages displayed first would not be very meaningful. In this case just start the agent from the command line (if on Linux) and see more detailed error message which exact line in the config is bad.
If the agent starts as service then check the agent log file if no suspicious problem lines show up.
Hope this helps. -
Hi,
anything changed in new versions and there would be such possibility like 'syntax check without starting the agent'?Comment
-
Its now implemented:
In this case the syntax of HostnameItem is wrong it should be "HostnameItem=system.hostname[shorthost,lower]".Code:C:\Program Files\zabbix\bin> .\zabbix_agent2.exe -c 'C:\Program Files\zabbix\conf\zabbix_agent2.conf' -T Validating configuration file "C:\\Program Files\\zabbix\\conf\\zabbix_agent2.conf" zabbix_agent2 [3820]: ERROR: Failed to prepare metric print manager: Failed to process configuration: cannot get system hostname using "[system.hostname,shorthost,lower]" item specified by "HostnameItem" configuration parameter: Invalid item key format.
Comment
Comment