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

(Tried to squash commits a bit this time)

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.

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

Thanks!
Jeremy