Giter Site home page Giter Site logo

Comments (28)

djoos avatar djoos commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

gbish avatar gbish commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

gbish avatar gbish commented on August 16, 2024

@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.

djoos avatar djoos commented on August 16, 2024

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.

gbish avatar gbish commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

gbish avatar gbish commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

gbish avatar gbish commented on August 16, 2024

Thanks @djoos, don't bust a gut on it though, enjoy your weekend :D

from newrelic.

djoos avatar djoos commented on August 16, 2024

:-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.

joe-devries-sp avatar joe-devries-sp commented on August 16, 2024

FYI, Just ran into this again. Any update?

from newrelic.

djoos avatar djoos commented on August 16, 2024

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.

joe-devries-sp avatar joe-devries-sp commented on August 16, 2024

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.

bassrock avatar bassrock commented on August 16, 2024

@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.

djoos avatar djoos commented on August 16, 2024

@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.

bassrock avatar bassrock commented on August 16, 2024

@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.

djoos avatar djoos commented on August 16, 2024

@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.

bassrock avatar bassrock commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

gbish avatar gbish commented on August 16, 2024

Thanks for the update @djoos!

from newrelic.

martinb3 avatar martinb3 commented on August 16, 2024

I wonder if this issue is fixed by #139.

from newrelic.

djoos avatar djoos commented on August 16, 2024

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.

djoos avatar djoos commented on August 16, 2024

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.

bassrock avatar bassrock commented on August 16, 2024

@djoos that works for me.

from newrelic.

djoos avatar djoos commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.