I'm running an Azure Cloud Service with a WebRole.
We run the DataDog Agent on each of our server instances, by running a startup task that executes a .cmd file.
Previously we have been using the latest version of DataDog Agent 5, and installing it using this -
start /w cmd
set log=datadog-install.log
set api_key=%1
sc query | findstr DatadogAgent
if ERRORLEVEL 1 (
echo "Datadog Agent service not detected" >> %log%
echo "Starting the installation" >> %log%
if exist ddagent.msi (
echo "Already has the installer" >> %log%
) else (
echo "Fetching the Agent Installer" >> %log%
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://s3.amazonaws.com/ddagent-windows-stable/ddagent-cli.msi', 'ddagent.msi')"
)
echo "Starting the installer" >>%log%
msiexec.exe /qn /i ddagent.msi APIKEY=%api_key% /L+ %log%
) else (
echo "Agent already exists, skipping install" >>%log%
)
echo "Finished Install" >>%log%
exit 0
Now we are trying to upgrade to the latest version of DataDog Agent 6 using this, which is failing to install and register the instance as an available host in DataDogs dashboard -
start /w cmd
set log=datadog-install.log
set api_key=%1
sc query | findstr DatadogAgent
if ERRORLEVEL 1 (
echo "Datadog Agent service not detected" >> %log%
echo "Starting the installation" >> %log%
if exist ddagent.msi (
echo "Already has the installer" >> %log%
) else (
echo "Fetching the Agent Installer" >> %log%
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://s3.amazonaws.com/ddagent-windows-stable/datadog-agent-6-latest.amd64.msi', 'ddagent.msi')"
)
echo "Starting the installer" >>%log%
msiexec.exe /qn /i ddagent.msi APIKEY=%api_key% /L+ %log%
) else (
echo "Agent already exists, skipping install" >>%log%
)
echo "Finished Install" >>%log%
exit 0
The URL is of course different in each case.
If the Windows OS is D drive, the setting is installed in D:\ProgramData\Datadog
.
Copying it to C:\ProgramData\Datadog
will work, but I submitted an improvement request to Datadog Support.