cloudfoundry/cf-release — pull request #254 by jrbudnack (2013-12-24 07:12:44+00:00)
Title: Newrelic check

Hello all,

I was trying out this new release, and was receiving the following error on the cloud controller:
** [NewRelic][12/24/13 03:34:10 +0000 b4bfdbc4-213a-4cbb-83d9-3a097c4c58ec (18981)] ERROR : Unable to read configuration file : Is a directory - /var/vcap/data/packages/cloud_controller_ng/32.1-dev.1/cloud_controller_ng
...
** [NewRelic][12/24/13 03:38:46 +0000 b4bfdbc4-213a-4cbb-83d9-3a097c4c58ec (20908)] INFO : To prevent agent startup add a NEWRELIC_ENABLE=false environment variable or modify the "development" section of your newrelic.yml.

In digging deeper, I realized that I don't have a "newrelic" section under the cloud controller properties. Consequently, the newrelic agent was starting without the NRCONFIG environment variable being pointed to the newrelic.yml file. If this is a feature that is "disabled by default", then this is probably an edge case to be handled.

In this pull request, if "ccng.newrelic" is not set in the properties, then another environment variable will be set: NEWRELIC_ENABLE=false. It seems to have cleared up this error, at least with the limited couple of runs I've performed.

(My apologies for multiple pull request attempts - was trying to get it right.)

Anyway, please let me know if this seems like a reasonable solution, or if I should approach this differently.

Thanks!
Jeremy