Ad Widget

Collapse

Trouble with agent deployment script on Windows in DHCP network with internal DNS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GraphiqeXpert
    Junior Member
    • Jul 2023
    • 2

    #1

    Trouble with agent deployment script on Windows in DHCP network with internal DNS

    Hi,

    Here is my problem:

    I want to deploy my zabbix agent on my windows machines, via a script. the auto-register is well configured (normally), because, when I launch my script, everything is OK.

    The problem here is that my workstations are in DHCP, but I have an internal DNS.

    The zabbix agent retrieves the ip, but I want it to be based on the DHCP name. This is possible because the graphical interface allows it, but given the size of my network, it's impossible for me to do everything by hand.

    I want my script to retrieve the DNS name (which happens to be the hostname) and base it on that.

    Here's my script:

    HTML Code:
    msiexec /l*v log.txt /i zabbix_agent-6.4.4-windows-amd64-openssl.msi /qn ENABLEREMOTECOMMANDS=1 SERVER=192.168.1.1 SERVERACTIVE=192. 168.1.1 HOSTNAME=%computerName% HOSTMETADATA=TOTO TLSCONNECT=psk TLSACCEPT=psk TLSPSKIDENTITY=TOTO TLSPSKVALUE=[PSK]
    Sorry if I wasn't clear enough + my average English​
  • GraphiqeXpert
    Junior Member
    • Jul 2023
    • 2

    #2
    Hi,

    I was able to answer my own question:

    My system is bits and pieces, but it works.

    Using the script above, I add a Windows client.

    To add DNS, I directly add the template "windows by zabbix agent active".

    This forces the client to return its own information (ip, hostname etc.).​

    Comment

    Working...