Ad Widget

Collapse

Use value in text file as hostname in Windows zabbix_agentd.conf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eVal
    Junior Member
    • Jun 2017
    • 7

    #1

    Use value in text file as hostname in Windows zabbix_agentd.conf

    Hello,

    I have a working Zabbix 4.0 setup and auto registration of Windows active agents work like a charm. But I have troubles of making my hosts really unique.

    On all the hosts out in the field there is an text file that contains a unique string of characters. I want to use the data of the text file as the hostname in my zabbix_agentd.conf.
    I can solve this by using a batch script that puts the data of the text file in a variable and then find and replace in the zabbix_agentd.conf. But this is just one time.

    Is it possible to update the hostname with the data of the text file each time the Zabbix agent service is started?

    Something like:
    Hostname="for /f "delims=" %%x in (C:\uuid.txt) "
Working...