[英]DataDog Agent Upgrade on Azure Cloud Service
I'm running an Azure Cloud Service with a WebRole. 我正在运行带有WebRole的Azure云服务。
We run the DataDog Agent on each of our server instances, by running a startup task that executes a .cmd file. 通过运行执行.cmd文件的启动任务,我们在每个服务器实例上运行DataDog代理。
Previously we have been using the latest version of DataDog Agent 5, and installing it using this - 以前,我们一直在使用最新版本的DataDog Agent 5,并使用此版本进行安装-
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 - 现在,我们尝试使用此版本升级到DataDog Agent 6的最新版本,该版本无法将实例安装并注册为DataDogs仪表板中的可用主机-
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. URL当然在每种情况下都是不同的。
If the Windows OS is D drive, the setting is installed in D:\\ProgramData\\Datadog
. 如果Windows操作系统是D驱动器,则此设置安装在D:\\ProgramData\\Datadog
。 Copying it to C:\\ProgramData\\Datadog
will work, but I submitted an improvement request to Datadog Support. 将其复制到C:\\ProgramData\\Datadog
,但是我向Datadog支持提交了改进请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.