Kastan
Kastan
RRailway
Created by Kastan on 11/2/2023 in #✋|help
NewRelic monitoring (Infrastructure Agent and Python Agent)
I'm attempting to setup NewRelic to monitor my python (Flask) app on Railway. How should I properly install NewRelic in Railway? NewRelic is reporting that the install was "unsuported", but I appear to comply with their requirements: https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/get-started/requirements-infrastructure-agent/. Here's my railway.json:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"phases": {
"install": {
"cmds": [
"python -m venv --copies /opt/venv && . /opt/venv/bin/activate",
"pip install -r requirements.txt",
"curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=$NEW_RELIC_API_KEY NEW_RELIC_ACCOUNT_ID=4209060 /usr/local/bin/newrelic install -n logs-integration -y"
],
"aptPkgs": [
"ffmpeg"
]
},
"setup": {
"aptPkgs": [
"libcap-dev"
],
"nixPkgs": [
"python310",
"gcc"
]
}
}
}
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 1
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"phases": {
"install": {
"cmds": [
"python -m venv --copies /opt/venv && . /opt/venv/bin/activate",
"pip install -r requirements.txt",
"curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=$NEW_RELIC_API_KEY NEW_RELIC_ACCOUNT_ID=4209060 /usr/local/bin/newrelic install -n logs-integration -y"
],
"aptPkgs": [
"ffmpeg"
]
},
"setup": {
"aptPkgs": [
"libcap-dev"
],
"nixPkgs": [
"python310",
"gcc"
]
}
}
}
},
"deploy": {
"numReplicas": 1,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 1
}
}
Relevant build logs:
#13 0.796 Installing New Relic CLI v0.75.1
#13 1.224 Installing to /usr/local/bin
#13 2.517 _ _ ____ _ _
#13 2.517 | \ | | _____ __ | _ \ ___| (_) ___
#13 2.517 | \| |/ _ \ \ /\ / / | |_) / _ | | |/ __|
#13 2.517 | |\ | __/\ V V / | _ | __| | | (__
#13 2.517 |_| \_|\___| \_/\_/ |_| \_\___|_|_|\___|
#13 16.27 Installation Summary
#13 16.27 ⊘ Infrastructure Agent (unsupported)
#13 16.27 ⊘ Logs Integration (unsupported)
#13 16.27
#13 16.27 Installation incomplete. Follow the instructions at the URL below to complete the installation process.
#13 16.27 ⮕ https://onenr.io/0BQ1zvDBAwx
#13 0.796 Installing New Relic CLI v0.75.1
#13 1.224 Installing to /usr/local/bin
#13 2.517 _ _ ____ _ _
#13 2.517 | \ | | _____ __ | _ \ ___| (_) ___
#13 2.517 | \| |/ _ \ \ /\ / / | |_) / _ | | |/ __|
#13 2.517 | |\ | __/\ V V / | _ | __| | | (__
#13 2.517 |_| \_|\___| \_/\_/ |_| \_\___|_|_|\___|
#13 16.27 Installation Summary
#13 16.27 ⊘ Infrastructure Agent (unsupported)
#13 16.27 ⊘ Logs Integration (unsupported)
#13 16.27
#13 16.27 Installation incomplete. Follow the instructions at the URL below to complete the installation process.
#13 16.27 ⮕ https://onenr.io/0BQ1zvDBAwx
5 replies