Ad Widget

Collapse

Update config through Zabbix scripts without need to restart service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sowse
    Junior Member
    • Feb 2020
    • 2

    #1

    Update config through Zabbix scripts without need to restart service

    Hi, I'd like to set up "update config" script (Remote Command) for some particular hosts. As for today Zabbix agent is being installed by GPO, where the number of configuration options are limited.

    My question is if I'm able to to update hosts' config file on the fly without need to restart Zabbix agent service?

    Since restarting service is denied if user's account don't have Administrator privileges I wonder it's actually possible.
    Also, correct me if I'm wrong, but if I'd update config and restart computer - does updated config will be taken into account?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    I assume that when you say "GPO", you mean a Microsoft Windows Group Policy Object? Not everyone here is a windows expert, so not everyone will know what you mean when you abbreviate that.

    To answer the last part of your question, if you update the config file and completely reboot/restart the computer, then yes, when the agent starts it will read the updated configuration. I assume your Group Policy has the zabbix_agentd.exe set to auto-start as a service.

    The zabbix_agentd has some on-the-fly configurability, primarily to increase or decrease logging level, but even doing that likely requires administrator-level access on Windows and it doesn't include re-reading the full configuration file.

    There is no documented method of getting zabbix_agentd to re-read its configuration on-the-fly, so restarting the service (as would happen during a reboot) seems to be the only way to get it to re-read the configuration.

    If you're using a configuration management system (something like puppet, or on Windows perhaps "desired state configuration") it should be possible to write your configuration state rules such that the agent is fully restarted any time the contents of the configuration file changes.

    Comment

    • sowse
      Junior Member
      • Feb 2020
      • 2

      #3
      Originally posted by tim.mooney
      I assume that when you say "GPO", you mean a Microsoft Windows Group Policy Object?
      That's right.

      Thank you for your comment, that's everything I wanted to know and your reply answers my question.

      Comment

      Working...