I want to log some specific events and data to New Relic instead of using the locally hosted log.
How can I acheive this easily and also send JSON payload data?
I have been able to setup the based “MessagingEvent” but I wanted to something a little more advanced.
Or enable the logging via the installed NodeJS agent. But after running the command provided within the APM->Logs.
curl -Ls https://raw.githubusercontent.com/newrelic/newrelic-cli/master/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=XXXXX-XXXXXXXXXXXXXXXXXXXXXXX NEW_RELIC_ACCOUNT_ID=XXXXXX /usr/local/bin/newrelic install
I get the following
“We encountered an error during the installation: we couldn’t install the Node Agent Installer. Make sure Node is installed and running on this host and rerun the newrelic-cli command. If this problem persists please visit the documentation and support page for additional help here: https://one.newrelic.com/-/06vjAeZLKjP”
I find this odd, because I already have it an agent running. However, that API key is different to what is supplied as per the above example.
Please provide information on your environment, and any further information you believe is relevant, such as the below:
- APM Agent Language - NodeJS
- APM Agent Version - v6.12.0
- Operating System - Ubuntu
- Operating System Version - 16.04.6 LTS
- Frameworks your app is using - NodeJS
- A link to the application in the New Relic UI.