Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Disabled Agent but no config disabling it

agent_config
nodejs
agent
apm
nodeagent

#1

I have the following newrelic.js configuration file:

'use strict'
/**
 * New Relic agent configuration.
 *
 * See lib/config/default.js in the agent distribution for a more complete
 * description of configuration variables and their potential values.
 */
exports.config = {
  /**
   * Array of application names.
   */
  app_name: ['API'],
  agent_enabled: true,
  /**
   * Your New Relic license key.
   */
  license_key: '****************************************',
  logging: {
    /**
     * Level at which to log. 'trace' is most useful to New Relic when diagnosing
     * issues with the agent, 'info' and higher will impose the least overhead on
     * production applications.
     */
    level: 'trace'
  }
}

However, I get the following logs in my newrelic_agent.log file:

{"v":0,"level":30,"name":"newrelic","hostname":"loadtest-api-02","pid":20942,"time":"2018-01-31T04:11:20.274Z","msg":"Using New Relic for Node.js. Agent version: 2.6.1; Node version: v4.8.6."}
{"v":0,"level":30,"name":"newrelic","hostname":"loadtest-api-02","pid":20942,"time":"2018-01-31T04:11:20.275Z","msg":"Module not enabled in configuration; not starting."}

I have set the environment variable NEW_RELIC_ENABLED to true but I am also not running in a PaaS environment I don’t think that it is necessary. I have also checked my server configuration but it is set to enabled as well


#2

@snm-sensibill Thanks for your post. The Node agent is enabled by default. Regarding the environment variable, the fact that you’re not in a PaaS shouldn’t matter.

It seems there may be an environment variable set somewhere overriding the default behavior. Can you try running env | grep NEW_RELIC_? Can you elaborate on how you set NEW_RELIC_ENABLED?


#3

AM I supposed to run env | grep NEW_RELIC_ ? on server. if yes I tried running it but did not get any output. Could you please elaborate this process.


#4

Hi @dasra.khadka, ye you would run this on your application server. It is basically looking for anything in your code that contains NEW_RELIC_, for example you have set the environment variable NEW_RELIC_ENABLED so this will show up in the results. It will also show any other variable that may be overriding the True Value.

Hope that explains :slight_smile:


#5

thank you rdouglas. I had a typo in config file which was the reason for this and I resolved it now.