在Azure云服务上升级DataDog代理

时间:2018-08-06 12:05:42

标签: azure azure-cloud-services datadog

我正在通过WebRole运行Azure云服务。

我们通过运行执行.cmd文件的启动任务,在每个服务器实例上运行DataDog代理。

以前,我们一直在使用最新版本的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

现在,我们正尝试使用此版本升级到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

URL当然在每种情况下都是不同的。

1 个答案:

答案 0 :(得分:0)

如果Windows操作系统是D驱动器,则此设置安装在"devDependencies": { "babel-core": "6.26.3" }, "uninstall": { "wepback-command": "*" } 中。 将其复制到D:\ProgramData\Datadog即可,但是我向Datadog支持提交了改进请求。