如何在亚马逊上安装新的 Relic linux

How to install new relic on amazon linux

我已经将 newrelic 文件解压缩到亚马逊 linux 并且同时拥有 installer.sh 和 config_defaults.sh

我在可以调用的参数存储中有许可证密钥

我使用以下命令安装 newrelic

sudo ./installer.sh GENERATE_CONFIG=true LICENSE_KEY=$APIKEY
sudo systemctl start newrelic-infra # to start the service

其中 APPIKEY 来自参数存储。 但是当我这样做时 sudo systemctl 启动 newrelic-infra

我收到错误消息

level=error msg="can't load configuration file" component="New Relic Infrastructure Agent" error="no license key, please add it to agent's config file or NRIA_LICENSE_KEY environment variable"

如何让代理识别许可证密钥?

您似乎正在按照手动或辅助 tarball 安装流程在 Amazon Linux 2 主机上安装基础架构代理。请注意,并非所有功能和集成都适用于该设置。

New Relic 在 Web 界面中提供 linux 包和逐步安装(请参阅 New Relic One Web 中的“添加更多数据”)。

Amazon Linux 2 的标准安装步骤是:

echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /etc/newrelic-infra.yml && \

sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo && \

sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' && \

sudo yum install newrelic-infra -y

这里是 documentation 对不同安装方案的解释。
您可以在 Explorers Hub.

上获得社区的额外支持