0
Answered
Auto deploy Windows Agent on Amazon Web Services - Ec2
Hi there,
We have taken a free trial of Anturis as it fits exactly what we are looking for from a monitoring solution. We have a mixture of Linux and Windows machines, the Linux machines run the auto install command on boot no problem however there does not seem to be an auto or silent install option for Windows Server.
We setup base Amazon Machine Images for the Windows machines that we need, so I installed the Windows agent on the base image in the hope that it would spin up and I could just add the monitor for the new machine in the Anturis Infrastructure UI.
However in the list of available servers the latest machine seems to replace the previous one? The issue is the agent_uuid not being unique as it takes this from the first install on the original base image.
I have managed to add additional machines by running agent-config.exe --set and specifying the parameters after this with the agent_uuid incremented instead of uninstalling and re-installing on each machine.
As we scale up and down often do you have any solutions to this preferably as little manual setup as possible, any auto install scripts or advice on a batch file / powershell script to run on boot to set the parameters to be unique?
Cheers,
Colin.
We have taken a free trial of Anturis as it fits exactly what we are looking for from a monitoring solution. We have a mixture of Linux and Windows machines, the Linux machines run the auto install command on boot no problem however there does not seem to be an auto or silent install option for Windows Server.
We setup base Amazon Machine Images for the Windows machines that we need, so I installed the Windows agent on the base image in the hope that it would spin up and I could just add the monitor for the new machine in the Anturis Infrastructure UI.
However in the list of available servers the latest machine seems to replace the previous one? The issue is the agent_uuid not being unique as it takes this from the first install on the original base image.
I have managed to add additional machines by running agent-config.exe --set and specifying the parameters after this with the agent_uuid incremented instead of uninstalling and re-installing on each machine.
As we scale up and down often do you have any solutions to this preferably as little manual setup as possible, any auto install scripts or advice on a batch file / powershell script to run on boot to set the parameters to be unique?
Cheers,
Colin.
Customer support service by UserEcho
Thank you for the very good question. Indeed it is possible - as you correctly guessed, you'll just need to change uuid. I'm writing detailed instructions for you in my next comment.
1. Place anturis-agent.msi into the image.
2. Run the following commands on the first start:
a) silent installation - NB: should run under administrator
start /wait msiexec /i anturis-agent.msi /quiet /l log.txt
b) go to installation folder
cd "c:\Program Files (x86)\Anturis\Anturis Monitoring"
c) set credentials
agent-config -s -un="MyAccountName" -up="MyAccountPassword"
d) connect the agent to Anturis server - after this step the agent will appear in the list of agents
agent-config -c
e) [optional] create a server box on the dashboard with two monitors - NB: when you copy VMs you should change their hostname in order for this command to run successfully (otherwise it will attempt to create 2nd box with the same name)
agent-config -cmd --provision --template=generic_server --drive_path="C:" --cpu_load_err="90" --drive_space_err="5.0"
That's it. Please let me know how it worked for you.
Only issue we have is that enabling the option to set a new host name on a base image adds 5 minutes to the machine spin up time as it boots up, configures then reboots with a new host name. Have conigured your steps in a powershell script so looking at other options of when to run the script not on startup.
Thansk for your help.
Cheers,
Colin.
Just to clarify, you may run all the stuff at any time, not necessarily on startup. And only step 2-e requires a new hostname.