Ad Widget

Collapse

how to check zabbix agent config syntax ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kuncham26
    Junior Member
    • Jun 2016
    • 6

    #1

    how to check zabbix agent config syntax ?

    After agent install and edited the agent config file but how to check syntax and configuration correct or not ? without starting the agent .
    Last edited by kuncham26; 21-01-2019, 09:40.
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    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.

    Comment


    • kuncham26
      kuncham26 commented
      Editing a comment
      I need without starting the agent is there any possible why to check ? i now that process i need syntax verification without starting the agent & with out checking log files. ...!
  • Daniel Palacz
    Junior Member
    • Aug 2022
    • 1

    #3
    Hi,
    anything changed in new versions and there would be such possibility like 'syntax check without starting the agent'?

    Comment

    • serverman
      Junior Member
      • Apr 2025
      • 8

      #4
      Its now implemented:
      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.
      In this case the syntax of HostnameItem is wrong it should be "HostnameItem=system.hostname[shorthost,lower]".

      Comment

      Working...