Comments (28)
Hi @gbish & @joe-devries-sp,
I'll have a deeper look into this particular issue and will get back to you as soon as possible...
Kind regards,
David
from newrelic.
Hmmm, I get the issue replicated... Any chance you could help out?
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true
platforms:
- name: ubuntu-14.04
driver_config:
box: opscode-ubuntu-14.04
box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box
suites:
- name: default
run_list:
- recipe[newrelic::default]
attributes:
newrelic:
server_monitoring:
license: '*SNIP*'
...runs without any issue.
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
Hi David, sorry for the delay.
When I get a spare moment, I will try running it on a fresh box, and see what I can get from that.
from newrelic.
No problem @gbish!
The tests I ran on a clean box were all successful, so the issue only manifests itself on update. Could you by any chance let me know the original version (less important) and the new version of newrelic sysmond? Then I'll try to simulate that and see how we can get round the issue!
Thanks in advance!
David
from newrelic.
@djoos I've managed to get it working on a new box, and updating has also worked. I think I was being a bit of a plum and neglected to use the php_agent
recipe. So that is all fine now.
However, when it generates the newrelic.ini
file, it seems to be ignoring my license key attribute and just inserts an empty string. Oddly though, it picks up the other attributes I am setting, such as app_name
and framework
.
Furthermore a seemingly unmodified template is being put into /etc/php5/mods-available
, which is then symlinked into /etc/php5/fpm/conf.d
which is where I have set the config_file
attribute to point to.
If this is the wrong place for this, I will make another issue.
Thanks for your help,
Gareth
from newrelic.
Hi @gbish,
thanks for your feedback!
Re: newrelic.ini
Have you used the ['newrelic']['application_monitoring']['license'] attribute or are you only setting ['newrelic']['license']? (there's a bug there that might be potentially the issue)
Re: config_file
What do you mean with "a seemingly unmodified template" exactly? ;-) Is it taking into account the attributes you've set, or in case you haven't set any specific ones, it will generate the .ini with default attribute values... FYI: here's the template
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
Hi @djoos, after fixing the license attribute as you suggested, it now seems to work. It is now showing up in the /etc/php5/fpm/conf.d/newrelic.ini
, which is great.
The second issue, which I might not have described brilliantly, still occurs though.
So config_file
was me short-handing node['newrelic']['php_agent']['config_file']
.
My attribute is set as so: node.default['newrelic']['php_agent']['config_file'] = /etc/php5/fpm/conf.d/newrelic.ini'
Now this creates the file at the desired location just fine, with all the other attributes I have set, including the problematic license key.
However, within /etc/php5/fpm/conf.d
there is a symlinked file 20-newrelic.ini
which is linked to ../../mods-available/newrelic.ini
, or in other words /etc/php5/mods-available/newrelic.ini
, which appears to be an unmodified template.
This doesn't seem to be breaking anything right now, but when deploying, it throws a bunch of warnings in the Capistrano output.
Cheers,
Gareth
from newrelic.
Hi @gbish,
I'm actually not sure what is generating that symlinked file... Would you mind checking the /etc/php5/mods-available/newrelic.ini file for the following header:
; ###################
; # Generated by Chef
; ###################
...just to figure out whether it is actually being generated by the cookbook or not. #confused
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
Hi @djoos
Really sorry for the delay. I have checked that file, and it does not have the header you described.
I saw you are on the list for the Chef meetup at Skills Matter tonight, so I will see you there if you are still attending, and we can discuss it further!
from newrelic.
Hi @gbish,
just a quick one to let you know that I haven't forgotten about this one!
I'm going to try and replicate @bassrock's setup and then get in touch with New Relic support...
Kind regards,
David
from newrelic.
Thanks @djoos, don't bust a gut on it though, enjoy your weekend :D
from newrelic.
:-D
I did open a support ticket, just to see whether there is actually any way to suppress the default behaviour of creating the newrelic.ini upon newrelic-install...
I'll keep you updated - have a good one!
David
from newrelic.
FYI, Just ran into this again. Any update?
from newrelic.
Hi guys,
I actually haven't been able to replicate the issue myself and haven't had the time to dig deeper into it.
Would you be able to confirm whether you all get 1 newrelic.ini generated by Chef (just check the first few lines of the file) and 1 (default) newrelic.ini auto-generated by New Relic's PHP agent itself?
If so, we either need to refactor the php agent recipe (see below for more info) to install New Relic without using the NR script (Installing New Relic manually (no script)) or "track down" any non-chef newrelic.ini's and delete them as part of the recipe... After contacting NR support that seemed to be the only ways to make sure no newrelic.ini is generated by the NR PHP agent itself.
It would be great to get your feedback and thoughts on which way to advance on getting a solution implemented.
Thanks in advance!
David
from newrelic.
Sorry, it was in production and had to be fixed quickly, so I didn't have time to capture any of that info. Next time it happens I will.
from newrelic.
@djoos yes that is correct one gets generated by chef and one by the new relic installer. The new relic installer also doesn't seem to follow the php5enmod
from newrelic.
@joe-devries-sp no problem - I hope we can come to a solution based upon everyone's input here...
@bassrock thanks for your feedback! It seems the way of "installing New Relic manually" is going to be the way forward rather than making use of the NR PHP agent script in the recipe...
from newrelic.
@djoos another quick solution would be to remove the extra newrelic.ini file since we know where it ends up. But future compatibility may be harder if it changes.
from newrelic.
@bassrock Happy to implement a short term fix until we come up with a more proper solution...
"since we know where it ends up"
That is /etc/php5/mods-available/newrelic.ini, right?
Kind regards,
David
from newrelic.
Mine ended up in:
/etc/php5/apache2/conf.d/newrelic.ini
while i still had one symlinked at
/etc/php5/apache2/conf.d/20-newrelic.ini
from newrelic.
Ok, let's see what the others get back with so we can be sure which .ini to delete as a quick fix ;-)
Thanks in advance!
from newrelic.
This thread seemed to have stopped :-)
Any chance someone could give the following quick fix a try to see whether it works?
What about adding an attribute in the php_agent recipe - 'redundant_config_file' which performs a delete on that file in the recipe when set?
Just curious what you think about that quick ('n dirty) fix...
Thanks in advance for your feedback!
Kind regards,
David
P.S. @gbish: the issue with the license - I'll release a new version of the cookbook shortly which makes it possible to just use ['newrelic']['license']... (see initial posts in this thread) HTH!
from newrelic.
Thanks for the update @djoos!
from newrelic.
I wonder if this issue is fixed by #139.
from newrelic.
Hi @martinb3,
you're right - your fix did also fix the initial newrelic-sysmond issue in this thread. However, afterwards (03/10) we ended up digressing from the original issue (related to the additional config file) and that one is still open.
Ideally we should have started a new issue for that though...
Hope this helps!
Kind regards,
David
from newrelic.
Everyone happy if we implement something like outlined in #143? I'd just suggest to set the actual path via attributes...
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
@djoos that works for me.
from newrelic.
I've just released the discussed fix in version 2.5.2 of the cookbook.
Thanks in advance for your feedback!
Kind regards,
David
from newrelic.
Related Issues (20)
- Newrelic dot APM agent doesnot upgrade HOT 4
- doesn't support strip_command_line parameter HOT 2
- Every node attribute used a default value to a property needs a `lazy { }` around it. HOT 6
- Cannot overwrite windows newrelic-infra agent source HOT 1
- Cloning resource attributes for service[newrelic-daemon] from prior resource HOT 1
- [agent_dotnet] Add support for enabling distributed tracing on the newrelic.config.erb template HOT 1
- Error executing action `enable` on resource 'newrelic_agent_infrastructure[Install]' is failing on debian7
- Default value of 'windows_checksum' in newrelic/resources/agent_infrastructure.rb does not match computed checksum HOT 1
- Recipe newrelic::java_agent fails install with the `Error executing action run on resource execute[newrelic_install_newrelic.jar]` HOT 2
- hello-world
- Hi world HOT 1
- Distributed Tracing feature in PHP Agent cookbook doesn't work
- add max_procs for newrelic_infra.yml
- Saleem A. H
- Compile Error on server_monitor.rb HOT 2
- "platform?" bug after ugprading newrelic version HOT 2
- Adding add event_queue_depth attribute to newrelic-infra.yml file is not there
- Cookbook failed on chef-client 17.8.25 HOT 2
- Hello World
- Please add Ubuntu 22.04 support, Ubuntu 20.04 fails with malformed repository line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newrelic.