How to change a hostname for windows agent

Hi guys i tried to deploy multi netdata agents on windows 11 and have crossed issue about changing hostname. Is there a way i can change it without modify the computer name in system?
From localhost:19999/netdata.conf i could see the hostname in netdata.conf is WIN-xxxxx
But tried to locate C:\Program Files\Netdata\etc\netdata, no netdata.conf file in that folder…

Hello @walthack ,

My apologies for the delay in getting back to you.

By default, Netdata uses the Windows Registry and API to collect certain data, such as the hostname. However, you can customize the hostname displayed in Netdata Cloud by following these steps:

1 . Navigate to the installation directory: c:\Program Files\Netdata\
2 . Right-click on msys2.exe and select Run as Administrator. (You may safely ignore any warnings that appear.)
3. Run the following commands to store the current netdata.conf file inside the /etc/netdata directory:

# cd /etc/netdata/
# curl -o netdata.conf http://localhost:19999/netdata.conf
  1. Open the configuration file in the editor to modify the hostname parameter:
nano.exe netdata.conf
  1. Locate the line starting with # hostname = YOUR_CURRENT_HOST.
  • Remove the # at the beginning to uncomment the line.
  • Replace YOUR_CURRENT_HOST with your desired hostname, like so:
hostname = NEW_HOST_NAME  
  • After editing, save the file by pressing CTRL + X, then Y, and finally ENTER.
  1. Restart the Netdata Windows service to apply the changes.

If you have any further questions or need assistance, please don’t hesitate to reach out.

Best regards,

Thiago

Thanks so much! this solved tons of related issue :smile: