Ad Widget

Collapse

Zabbix agent config is being overwritten/restored all the time on Windows hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piotr.nawrocki
    Junior Member
    • Jul 2019
    • 3

    #1

    Zabbix agent config is being overwritten/restored all the time on Windows hosts

    Hello,

    we have a really big problem with the Zabbix agent configuration file.
    We are using templates to monitor DHCP, SQL and IIS and each of them requires PowerShell scripts to be run on the host and also userparameters to be configured.
    We added 3 or 4 lines to our common config file which is used on all Windows Servers - those parameters include additional configuration directory to be read by Zabbix agent, allow to use user unsafe parameters and change timeout to 30 seconds.
    After we send this config file to appropriate hosts with PowerShell and restart the agent - this works file some time but after the file is restored to the previous version without any information in the agent log.
    If we change the config file manually (not with PowerShell) it is exactly the same.
    We tried even to remove agent service and install it again with new config - same situation.
    How this is possible that agent config file is being restored to previous version?

    In the sever log we see following entries (examples):
    124422:20190730:150602.854 item "hostname:dhcp[ScopeinUse,A.B.C.D]" became supported
    124419:20190730:154530.094 item "hostname:dhcp[ScopeinUse,A.B.C.D]" became not supported: Unsupported item key.

    I replaced real hostnames and scope IPs with placeholders.
    Did anybody encourter such situation?
    Please provide us any hints because right now Zabbix is totally unusable because of this.
  • piotr.nawrocki
    Junior Member
    • Jul 2019
    • 3

    #2
    Anybody? We even deleted Agent from the host and installed it with new config - same results - good config file stays only couple minutes and then it is gone.

    Comment

    • eljibe
      Member
      • Apr 2014
      • 31

      #3
      Is there an action that is defined on the server so that it sets the configuration file to the standard ? We have set up such an action on our server as a compliancy policy.
      If the configuration file does not contain specific content, it's ovr written and the agent is restarted.

      Comment

      • piotr.nawrocki
        Junior Member
        • Jul 2019
        • 3

        #4
        I am posting both configuration files below - the new one only has additional lines - nothing is deleted - so I guess this condition you mentioned does not apply here.

        Config 1
        LogFile=C:\Zabbix\zabbix_agentd.log
        ServerActive=A.A.A.A
        Server=A.A.A.A.
        EnableRemoteCommands=1



        Config 2
        LogFile=C:\Zabbix\zabbix_agentd.log
        ServerActive=A.A.A.A
        Server=A.A.A.A
        EnableRemoteCommands=1
        Timeout=30
        Include=C:\Zabbix\conf.d\
        UnsafeUserParameters=1

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1781

          #5
          I'm pretty sure Zabbix agent does not have any functionality to write or delete configuration files. There must be some other software or process replacing the config files. Maybe you need to ask the server administrator about this.

          Markku

          Comment

          • rsterenb
            Member
            • Apr 2015
            • 31

            #6
            Are you certain there is no configuration management process overwriting that file? E.g. we use Puppet to fully configure the Zabbix Agent (amongst others), so if we would manually change it, Puppet would restore it.
            Or does this happens when the Zabbix Agent gets updated? (We have a different update process, so I don't know if a regular update would restore the Zabbix Agent config files.)

            Comment

            Working...