Git Product home page Git Product logo

newrelic's People

Contributors

acondrat avatar agarfu avatar akadoya avatar alexkokkinos avatar astlock avatar bai avatar bencaron avatar biinari avatar blakesmith avatar bphinney avatar brunzer avatar dipthegeezer avatar dje avatar djoos avatar grantdlr avatar jeffbyrnes avatar josegonzalez avatar jujugrrr avatar lauripiisang avatar lmunro avatar martinb3 avatar mool avatar nathanielmichael avatar niven01 avatar nsdavidson avatar ramonskie avatar rcolanero avatar sonnysideup avatar swapnil-jaiswal avatar willejs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newrelic's Issues

java-agent installation/attributes

java-agent recipe is set to install upon the presence of a node['newrelic']['java-agent']['execute_install'] attribute and this attribute is set to true by default in the recipe attributes. There are two problems with this. First, the java-agent is reinstalled every time chef-client is run on an instance, even if it has already been installed. This creates duplicate run lines in catalina.sh for tomcat each time chef-client is run. Second, there is no way to set the attribute to prevent installation, without altering the default recipe attributes. A user can't override and set the attribute to false, because the presence of the attribute alone will cause the installation routine to run. In newrelic/recipes/java-agent.rb, line 85 should be only_if { node['newrelic']['java-agent']['execute_install'] == "true" }

This will allow the attribute to be changed to "false" and will prevent installation. The installation routine provided by newrelic is faulty in that it you repeatedly run the install command, it will create additional lines and does not recognize that it has already been installed. My solution is to not use newrelic's installation routine.

CentOS 7 - License key not in config file and other issues

I'm having several issues using this cookbook on CentOS 7.
chef-client v 11.12.8
cookbook 1.0.6

I'm attempting to install just the server monitor agent on a CentOS 7 server.

First issue I noticed is that setting a value in attributes/default.rb for default['newrelic']['license'] alone did not result in the key being placed in the /etc/newrelic/nrsysmond.cfg.

I seemed to only get the key set when I also set it explicitly on the line which sets default['newrelic']['server_monitoring']['license']

Once past this, CentOS 7 no longer uses the "service" command for init.d and has switched to systemctl. There appears to be a facility in place to translate service commands to systemctl commands, but it's failing here.

I'm new to Chef, but I suspect this is a problem with Chef not knowing about CentOS 7's shift to using systemctl. Correct me if I'm wrong.

================================================================================
Error executing action `start` on resource 'service[newrelic-sysmond]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service newrelic-sysmond start ----
STDOUT: Starting newrelic-sysmond (via systemctl):  [FAILED]
STDERR: Job for newrelic-sysmond.service failed. See 'systemctl status newrelic-sysmond.service' and 'journalctl -xn' for details.
---- End output of /sbin/service newrelic-sysmond start ----
Ran /sbin/service newrelic-sysmond start returned 1


Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/newrelic/recipes/server-monitor-agent.rb

 40:   service node['newrelic']['server-monitor-agent']['service_name'] do
 41:     supports :status => true, :start => true, :stop => true, :restart => true
 42:     action node['newrelic']['server-monitor-agent']['service_actions']
 43:   end
 44: when 'windows'



Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/newrelic/recipes/server-monitor-agent.rb:40:in `from_file'

service("newrelic-sysmond") do
  action [:enable, :start]
  supports {:status=>true, :start=>true, :stop=>true, :restart=>true}
  retries 0
  retry_delay 2
  guard_interpreter :default
  service_name "newrelic-sysmond"
  enabled true
  pattern "newrelic-sysmond"
  cookbook_name "newrelic"
  recipe_name "server-monitor-agent"
end




Running handlers:
[2014-07-29T13:34:36-04:00] ERROR: Running exception handlers
Running handlers complete

[2014-07-29T13:34:36-04:00] ERROR: Exception handlers complete
[2014-07-29T13:34:36-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 132.81009578 seconds
[2014-07-29T13:34:36-04:00] ERROR: service[newrelic-sysmond] (newrelic::server-monitor-agent line 40) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service newrelic-sysmond start ----
STDOUT: Starting newrelic-sysmond (via systemctl):  [FAILED]
STDERR: Job for newrelic-sysmond.service failed. See 'systemctl status newrelic-sysmond.service' and 'journalctl -xn' for details.
---- End output of /sbin/service newrelic-sysmond start ----
Ran /sbin/service newrelic-sysmond start returned 1
[2014-07-29T13:34:36-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Thanks.

newrelic-install Not Executed During php_agent Recipe

Hey David,

I recently upgraded to 2.0.0 and realized that application monitoring mysteriously stopped. System monitoring seems unaffected. I'm using the "agent" startup_mode, so the newrelic daemon should be started upon restart of my php-fpm process. Here's what I got when I sshed into an affected server and tried restarting php-fpm manually:

dan@webserver13:/var/log/newrelic$ sudo service php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm [24-Sep-2014 23:23:13] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/newrelic.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/newrelic.so: cannot open shared object file: No such file or directory in Unknown on line 0
 done
dan@webserver13:/var/log/newrelic$ sudo service php-fpm status
php-fpm (pid 4186) is running...
dan@webserver13:/var/log/newrelic$ cd /usr/local/lib/php/extensions/no-debug-non-zts-20121212/
dan@webserver13:/usr/local/lib/php/extensions/no-debug-non-zts-20121212$ ls
memcache.so  opcache.a  opcache.so

So it looks like the newrelic.so file isn't being installed in the correct place. I believe this is a task executed by the newrelic-install command, which is apparently included correctly in the php_agent recipe:

# install/update latest php agent
package 'newrelic-php5' do
  action node['newrelic']['php_agent']['agent_action']
  notifies :run, 'execute[newrelic-install]', :immediately
end

# run newrelic-install
execute 'newrelic-install' do
  command 'newrelic-install install'
  if node['newrelic']['php_agent']['install_silently']
    environment(
      'NR_INSTALL_SILENT' => '1'
    )
  end
  action :nothing
  if node['newrelic']['php_agent']['web_server']['service_name']
    notifies :restart, "service[#{node['newrelic']['php_agent']['web_server']['service_name']}]", :delayed
  end
end

Hmmm, looks good. But inspecting the log from the chef setup run that executes the php_agent recipe, I've noticed that newrelic-install is never actually sent the :run action. Here's the relevant part of the log:

[2014-09-24T23:16:56+00:00] INFO: Processing package[wget] action install (newrelic::repository line 10)
[2014-09-24T23:16:56+00:00] INFO: Processing remote_file[/var/lib/aws/opsworks/cache.stage2/548C16BF.gpg] action create (newrelic::repository line 20)
[2014-09-24T23:16:56+00:00] INFO: remote_file[/var/lib/aws/opsworks/cache.stage2/548C16BF.gpg] created file /var/lib/aws/opsworks/cache.stage2/548C16BF.gpg
[2014-09-24T23:16:56+00:00] INFO: remote_file[/var/lib/aws/opsworks/cache.stage2/548C16BF.gpg] updated file contents /var/lib/aws/opsworks/cache.stage2/548C16BF.gpg
[2014-09-24T23:16:56+00:00] INFO: Processing execute[newrelic-add-apt-key] action run (newrelic::repository line 25)
[2014-09-24T23:16:56+00:00] INFO: execute[newrelic-add-apt-key] ran successfully
[2014-09-24T23:16:56+00:00] INFO: Processing remote_file[/etc/apt/sources.list.d/newrelic.list] action create_if_missing (newrelic::repository line 30)
[2014-09-24T23:16:56+00:00] INFO: Processing execute[newrelic-apt-get-update] action nothing (newrelic::repository line 39)
[2014-09-24T23:16:56+00:00] INFO: Processing package[newrelic-php5-broken] action remove (newrelic::php_agent line 14)
[2014-09-24T23:16:56+00:00] INFO: Processing package[newrelic-php5] action install (newrelic::php_agent line 23)
[2014-09-24T23:16:56+00:00] INFO: Processing execute[newrelic-install] action nothing (newrelic::php_agent line 29)
[2014-09-24T23:16:56+00:00] INFO: Processing service[newrelic-daemon] action nothing (newrelic::php_agent line 42)
[2014-09-24T23:16:56+00:00] INFO: Processing template[/etc/php5/conf.d/newrelic.ini] action create (newrelic::php_agent line 48)
[2014-09-24T23:16:57+00:00] INFO: template[/etc/php5/conf.d/newrelic.ini] backed up to /root/.chef/local-mode-cache/backup/etc/php5/conf.d/newrelic.ini.chef-20140924231657.089918
[2014-09-24T23:16:57+00:00] INFO: template[/etc/php5/conf.d/newrelic.ini] updated file contents /etc/php5/conf.d/newrelic.ini
[2014-09-24T23:16:57+00:00] INFO: Processing service[newrelic-daemon] action disable (newrelic::php_agent line 105)
[2014-09-24T23:16:57+00:00] INFO: Processing service[newrelic-daemon] action stop (newrelic::php_agent line 105)
[2014-09-24T23:16:57+00:00] INFO: Processing execute[newrelic-backup-cfg] action run (newrelic::php_agent line 110)
[2014-09-24T23:16:57+00:00] INFO: Processing execute[newrelic-backup-key] action run (newrelic::php_agent line 116)

So, the newrelic-php5 package is correctly installed, and the execute[newrelic-install] resource is declared, but there is no mention of notifying that resource of a :run action, neither immediately nor delayed.

After sshing back into the affected instance, manually running NR_INSTALL_SILENT sudo newrelic-install install, and restarting php-fpm, the issue is indeed fixed.

Any ideas as to why execute[newrelic-install] never receives the :run? How can I fix this?

As always, thanks for your hard work in maintaining this cookbook! 😄

Windows support broke - lets fix it.

The attribute: default['newrelic']['service_name'] = "newrelic-sysmond"
As set in: attributes/server-monitor.rb

and as used by the following code in recipes/server-monitor.rb:
service node['newrelic']['service_name'] do
supports :status => true, :start => true, :stop => true, :restart => true
action [:enable, :start] #starts the service if it's not running and enables it to start at system boot time
end

Does not work on Windows because there the service_name attribute should be NewRelic.ServerMonitor.Service and secondly the installation of the software on Windows already creates/starts the service causing an error in the chef run:

2013-09-17T14:20:04+00:00] ERROR: Win32::Service::Error: service[NewRelic.ServerMonitor.Service](newrelic::server-monitor line 57) had an error: Win32::Service::Error: An instance of the service is already running.

I propose to fix this by running the service resource within the platform case block.

Secondly should the service_name variable ever be used in future on windows, I will additionaly set a platform case block in the attributes file.

Patches to do this will be forthcoming.

php-agent broken after 4a86bf6

commit 4a86bf6 changed default package action from upgrade to install, this break the package installation because it tries to install version '3.0.5.95' defined in the resource used to remove an old problematic version

if two resource have the same name chef clones the attributes of the first one to the second, not very intuitive but its the way chef currently works

it worked with upgrade because probably it ignores the version attribute, but its broken with install because it tries to install that specific version defined in the previous resource with the remove action,
so the 2 resources to remove old version and install/upgrade the package should have different names

Chef run breaking on newrelic-sysmond

When firing off a client run on a server, I am encountering an error when the cookbook is trying to start the newrelic-sysmod service.

Output:

================================================================================
    Error executing action `start` on resource 'service[newrelic-sysmond]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /etc/init.d/newrelic-sysmond start ----
    STDOUT: Starting New Relic Server Monitor: newrelic-sysmond FAILED
    STDERR: 
    ---- End output of /etc/init.d/newrelic-sysmond start ----
    Ran /etc/init.d/newrelic-sysmond start returned 1

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/newrelic/recipes/server_monitor_agent.rb

     40:   service node['newrelic']['server_monitor_agent']['service_name'] do
     41:     supports :status => true, :start => true, :stop => true, :restart => true
     42:     action node['newrelic']['server_monitor_agent']['service_actions']
     43:   end
     44: when 'windows'

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/newrelic/recipes/server_monitor_agent.rb:40:in `from_file'

    service("newrelic-sysmond") do
      action [:enable, :start]
      supports {:status=>true, :start=>true, :stop=>true, :restart=>true}
      retries 0
      retry_delay 2
      guard_interpreter :default
      service_name "newrelic-sysmond"
      enabled true
      pattern "newrelic-sysmond"
      cookbook_name "newrelic"
      recipe_name "server_monitor_agent"
    end

This is being run on Ubuntu 14.04
Chef-Client: 11.16.0
Cookbook: 2.0.0

This is quite similar to #98, but that was version 1.x.

Any help muchly appreciated.

Unable to start service

Hi there -

Using the New Relic cookbook out of the box and running into the following errors when running chef-client update on RHEL6.

  • service[newrelic-sysmond] action enable (up to date)

    * service[newrelic-sysmond] action start

    Error executing action start on resource 'service[newrelic-sysmond]'

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service newrelic-sysmond start ----
STDOUT: Starting newrelic-sysmond: [FAILED]
STDERR:
---- End output of /sbin/service newrelic-sysmond start ----
Ran /sbin/service newrelic-sysmond start returned 1

Resource Declaration:

In /var/chef/cache/cookbooks/newrelic/recipes/server-monitor.rb

35: service node['newrelic']['service_name'] do
36: supports :status => true, :start => true, :stop => true, :restart => true
37: action [:enable, :start] #starts the service if it's not running and enables it to start at system boot time
38: end
39: when "windows"

Compiled Resource:

Declared in /var/chef/cache/cookbooks/newrelic/recipes/server-monitor.rb:35:in `from_file'

service("newrelic-sysmond") do
action [:enable, :start]
supports {:status=>true, :start=>true, :stop=>true, :restart=>true}
retries 0
retry_delay 2
service_name "newrelic-sysmond"
enabled true
pattern "newrelic-sysmond"
startup_type :automatic
cookbook_name "newrelic"
recipe_name "server-monitor"
end

* service[newrelic-sysmond] action restart

Error executing action restart on resource 'service[newrelic-sysmond]'

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service newrelic-sysmond restart ----
STDOUT: Stopping newrelic-sysmond: [ OK ]
Starting newrelic-sysmond: [FAILED]
STDERR:
---- End output of /sbin/service newrelic-sysmond restart ----
Ran /sbin/service newrelic-sysmond restart returned 1

Resource Declaration:

In /var/chef/cache/cookbooks/newrelic/recipes/server-monitor.rb

35: service node['newrelic']['service_name'] do
36: supports :status => true, :start => true, :stop => true, :restart => true
37: action [:enable, :start] #starts the service if it's not running and enables it to start at system boot time
38: end
39: when "windows"

Compiled Resource:

Declared in /var/chef/cache/cookbooks/newrelic/recipes/server-monitor.rb:35:in `from_file'

service("newrelic-sysmond") do
action [:enable, :start]
supports {:status=>true, :start=>true, :stop=>true, :restart=>true}
retries 0
retry_delay 2
service_name "newrelic-sysmond"
enabled true
pattern "newrelic-sysmond"
startup_type :automatic
cookbook_name "newrelic"
recipe_name "server-monitor"
end

OpsWorks - newrelic::php-agent exception

I'm testing this cookbook on AWS OpsWorks. The recipe newrelic::default works perfect, but the recipe newrelic::php-agent throws the following error:

FATAL: Chef::Exceptions::RecipeNotFound: ruby_block[Compile Custom OpsWorks Run List] 
(opsworks_custom_cookbooks::execute line 3) had an error: 
Chef::Exceptions::RecipeNotFound: could not find recipe default for cookbook php

Using Chef 11.4
I'm setting both node[newrelic][server_monitoring][license] and node[newrelic][application_monitoring][license] with the proper license keys.

Any idea what is going on?

Tag versioned releases

While it's possible to go look at the Chef Community website for the releases, it's rather difficult to compare one release against the other to see the diff & know what's changed.

This would be markedly easier if the releases were tagged and the tags pushed here to GitHub.

apache reload on every run

Hi!

On every chef-client run, the cookbook is sending apache a reload event. This is inconvenient because apc (the bytecode cache) flushes on the reload.

The root cause for this seems to be that the newrelic daemon is also getting stopped on every run. My understanding is that this should not happen unless there is some change in the installation.

I am probably doing something wrong on my end, but so far I cannot think what it would be. Let me know if I can be of any help.

Versions:
Ubuntu 12.04.2
Chef-client 10.24.0

Not upgrading package on Ubuntu through APT

We're running the latest New Relic Chef cookbook (1.0.5) but it does not look like it's upgrading the existing New Relic packages on the affected nodes.

We get the warning "The following apps' agents require a security update for their Postgres explain plan support:..." when logging-in to NR, and the nodes listed are those that received New Relic through Chef the longest time ago.

If I run "apt-get install newrelic-sysmond" directly, APT offers to upgrade the NR package.

We are running Ubuntu 12.04.2 LTS.

We are invoking the NR chef cookbook from our own cookbook. Here's the snippet from our default.rb file:

include_recipe 'newrelic::repository'
include_recipe 'newrelic::server-monitor-agent'
include_recipe 'newrelic::python-agent'

Make agent dependencies "recommends" again?

Please see commentary on bf16a84, as well. In at least my case, the depends "ms_dotnet4" dependency in metadata.rb is too strong. I have no .NET resources that need managing, yet to use (and thus contribute) to this cookbook, I also have to make the ms_dotnet4 cookbook available. I realize that I don't need to add it or the newrelic::dotnet recipe to my runlist, but the cookbook still needs that dependency satisfied to run successfully. Maybe change the depends back to recommends...?

Java Agent installation jar path

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/newrelic/recipes/java-agent.rb

 81: execute 'newrelic-install' do
 82:   command "sudo java -jar #{node['newrelic']['java-agent']['install_dir']}/newrelic.jar install"
 83:   only_if { node['newrelic']['java-agent']['execute_install'] }
 84: end

the above block contains a hardcoded filename "/newrelic.jar" which is different than the default value of the downloaded file (eg: "newrelic-agent-2.21.3.jar")

installation could use a wildcard:

sudo java -jar /opt/tomcat/newrelic/newrelic-agent-*.jar install

or change the download approach where remote_file is concatenated with the default value default['newrelic']['java-agent']['jar_file'] = 'newrelic-agent-2.21.3.jar' but the execution of the installation is hardcoded (could use the same default config).

Option group's value #<Chef::Node::Attribute:0x00000002e3efe8> does not match regular expression [/^([-a-zA-Z0-9_.\\ ]+)$/, /^\d+$/]

While upgrading from 0.5.0 to 0.5.2, Chef threw the following error:

Recipe Compile Error in /opt/sailpoint/chef/cookbooks/newrelic/recipes/default.rb

Chef::Exceptions::ValidationFailed

Option group's value #Chef::Node::Attribute:0x00000002e3efe8 does not match regular expression [/^([-a-zA-Z0-9_.\ ]+)$/, /^\d+$/]

Cookbook Trace:

/opt/sailpoint/chef/cookbooks/newrelic/recipes/server-monitor.rb:19:in block in from_file' /opt/sailpoint/chef/cookbooks/newrelic/recipes/server-monitor.rb:16:infrom_file'
/opt/sailpoint/chef/cookbooks/newrelic/recipes/default.rb:9:in `from_file'

Relevant File Content:

/opt/sailpoint/chef/cookbooks/newrelic/recipes/server-monitor.rb:

12: action :install
13: end
14:
15: #configure your New Relic license key
16: template "#{node['newrelic']['config_path']}/nrsysmond.cfg" do
17: source "nrsysmond.cfg.erb"
18: owner "root"
19>> group node['newrelic']['config_file_group']
20: mode "640"
21: variables(
22: :license => node['newrelic']['server_monitoring']['license'],
23: :logfile => node['newrelic']['server_monitoring']['logfile'],
24: :loglevel => node['newrelic']['server_monitoring']['loglevel'],
25: :proxy => node['newrelic']['server_monitoring']['proxy'],
26: :ssl => node['newrelic']['server_monitoring']['ssl'],
27: :ssl_ca_path => node['newrelic']['server_monitoring']['ssl_ca_path'],
28: :ssl_ca_bundle => node['newrelic']['server_monitoring']['ssl_ca_bundle'],

Add an option to not start server-monitor

When I test cookbooks with vagrant I need service to not be started because it connects to production account and newrelic generates alerts(they are scary for ops ;-) ) when VM goes down.

Sampling

Please consider implementing a mechanism for configuring NR on a sampling of hosts. Consider if I have 100-300 autoscaling EC2 nodes, but only enough license-capacity for 20 PHP monitors. It'd be useful if I could have an attribute '20', and chef would auto-assign 20 nodes, say within the current role+environment, and configure the probes on them.

The auto-assignment could be done something like searching for nodes that match the current node+environment, sorted by node name, and determine if the current nodes position in that list is <= the number of licenses.

BUG: Cannot install just php-agent due to repository recipe not being run

The individual item recipes should be standalone. It appears that the cookbook relies on the default recipe running to run the repository recipe.

However, the default recipe also installs the server monitor, which may not be desired.

To remedy this, the default recipe should be removed and any agent recipes should include the repository recipe.

Show Usage For Deployment

Is it possible to in the read me show exactly how to use the deployment command within our own cookbooks.

Don't try to install if there are no license keys.

I am using this cookbook, but not all of my servers will have license keys added.

If I don't add a license key, the chef run fails:

STDOUT: Starting New Relic Server Monitor: newrelic-sysmond FAILED

It would be nice if the recipe was just skipped if there is no key... but then again maybe you want it to fail...

I suppose I could skip including the recipe if there is no key, but I thought I'd pass along my thoughts to you anyway!

Old attribute used in in java-agent Recipe

The execute "newrelic-install" resource uses old the node['newrelic']['install_dir'] attribute not default['newrelic']['java-agent']['install_dir']. Line 62-64 in java-agent recipe

No version specified, and no candidate version available for newrelic-sysmond

I'm trying to NewRelic PHP monitoring to an EC2 box on Amazon's OpsWorks platform using this Chef recipe and it's failing with the following:

[Mon, 26 Aug 2013 18:30:16 +0000] INFO: Installing package[newrelic-repo] version 5-3
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: Executing rpm  -U /opt/aws/opsworks/releases/20130806085134_135/conf/../newrelic-repo-5-3.noarch.rpm
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: ---- Begin output of rpm  -U /opt/aws/opsworks/releases/20130806085134_135/conf/../newrelic-repo-5-3.noarch.rpm ----
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: STDOUT: 
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: STDERR: warning: /opt/aws/opsworks/releases/20130806085134_135/conf/../newrelic-repo-5-3.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 548c16bf: NOKEY
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: ---- End output of rpm  -U /opt/aws/opsworks/releases/20130806085134_135/conf/../newrelic-repo-5-3.noarch.rpm ----
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: Ran rpm  -U /opt/aws/opsworks/releases/20130806085134_135/conf/../newrelic-repo-5-3.noarch.rpm returned 0
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: Processing package[newrelic-sysmond] on php-search-5.localdomain
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: Checking yum info for newrelic-sysmond
[Mon, 26 Aug 2013 18:30:16 +0000] DEBUG: newrelic-sysmond: Installed version:  Candidate version: 
[Mon, 26 Aug 2013 18:30:16 +0000] ERROR: package[newrelic-sysmond] (/opt/aws/opsworks/current/site-cookbooks/newrelic/recipes/server-monitor.rb:11:in `from_file') had an error:
No version specified, and no candidate version available for newrelic-sysmond
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/provider/package.rb:50:in `action_install'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource.rb:406:in `send'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource.rb:406:in `run_action'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/runner.rb:53:in `run_action'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/runner.rb:89:in `converge'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/runner.rb:89:in `each'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/runner.rb:89:in `converge'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/runner.rb:84:in `converge'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/client.rb:268:in `converge'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/client.rb:158:in `run'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/application/solo.rb:190:in `run_application'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/application/solo.rb:181:in `loop'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/application/solo.rb:181:in `run_application'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/../lib/chef/application.rb:62:in `run'
/opt/aws/opsworks/releases/20130806085134_135/vendor/bundle/ruby/1.8/gems/chef-0.9.15.5/bin/chef-solo:25
/opt/aws/opsworks/current/bin/chef-solo:16:in `load'
/opt/aws/opsworks/current/bin/chef-solo:16

As you can see the NewRelic repo seems to get added just fine and in fact when I try to install it manually, Yum shows it as added. However, I can't seem to get past this stage. I've seen other issues logged on this topic but most of them seemed to be related to custom modifications to the Chef recipe or unsupported platform. I've not modified the recipe at all and am installing it on a stock 64-bit Amazon Linux machine.

Any help would be much appreciated.

Versions 1.0.3 and 0.5.8 killed with signal 9 on Chef 11.10.4

Using AWS Opsworks to try to configure the newrelic php agent. Last few lines of the Chef log below:

[2014-04-10T17:56:55+00:00] INFO: Processing package[wget] action install (newrelic::repository line 10)
[2014-04-10T17:56:55+00:00] INFO: Processing remote_file[/var/lib/aws/opsworks/cache/newrelic-gpg-key] action create_if_missing (newrelic::repository line 21)
[2014-04-10T17:56:55+00:00] INFO: remote_file[/var/lib/aws/opsworks/cache/newrelic-gpg-key] created file /var/lib/aws/opsworks/cache/newrelic-gpg-key
[2014-04-10T17:56:55+00:00] INFO: remote_file[/var/lib/aws/opsworks/cache/newrelic-gpg-key] updated file contents /var/lib/aws/opsworks/cache/newrelic-gpg-key
[2014-04-10T17:56:55+00:00] INFO: remote_file[/var/lib/aws/opsworks/cache/newrelic-gpg-key] sending run action to execute[newrelic-add-apt-key] (immediate)
[2014-04-10T17:56:55+00:00] INFO: Processing execute[newrelic-add-apt-key] action run (newrelic::repository line 28)
[2014-04-10T17:56:55+00:00] INFO: execute[newrelic-add-apt-key] ran successfully
[2014-04-10T17:56:55+00:00] INFO: execute[newrelic-add-apt-key] sending run action to execute[newrelic-apt-get-update] (immediate)
[2014-04-10T17:56:55+00:00] INFO: Processing execute[newrelic-apt-get-update] action run (newrelic::repository line 45)
[2014-04-10T17:57:02+00:00] INFO: execute[newrelic-apt-get-update] ran successfully
[2014-04-10T17:57:02+00:00] INFO: Processing execute[newrelic-add-apt-key] action nothing (newrelic::repository line 28)
[2014-04-10T17:57:02+00:00] INFO: Processing remote_file[/etc/apt/sources.list.d/newrelic.list] action create_if_missing (newrelic::repository line 35)
[2014-04-10T17:57:02+00:00] INFO: remote_file[/etc/apt/sources.list.d/newrelic.list] created file /etc/apt/sources.list.d/newrelic.list
[2014-04-10T17:57:02+00:00] INFO: remote_file[/etc/apt/sources.list.d/newrelic.list] updated file contents /etc/apt/sources.list.d/newrelic.list
[2014-04-10T17:57:02+00:00] INFO: remote_file[/etc/apt/sources.list.d/newrelic.list] owner changed to 0
[2014-04-10T17:57:02+00:00] INFO: remote_file[/etc/apt/sources.list.d/newrelic.list] group changed to 0
[2014-04-10T17:57:02+00:00] INFO: remote_file[/etc/apt/sources.list.d/newrelic.list] mode changed to 644
[2014-04-10T17:57:02+00:00] INFO: remote_file[/etc/apt/sources.list.d/newrelic.list] sending run action to execute[newrelic-apt-get-update] (immediate)
[2014-04-10T17:57:02+00:00] INFO: Processing execute[newrelic-apt-get-update] action run (newrelic::repository line 45)
[2014-04-10T17:57:12+00:00] INFO: execute[newrelic-apt-get-update] ran successfully
[2014-04-10T17:57:12+00:00] INFO: Processing execute[newrelic-apt-get-update] action nothing (newrelic::repository line 45)
[2014-04-10T17:57:12+00:00] INFO: Processing package[newrelic-sysmond] action install (newrelic::server-monitor line 10)
[2014-04-10T17:57:14+00:00] INFO: Processing template[/etc/newrelic/nrsysmond.cfg] action create (newrelic::server-monitor line 15)
[2014-04-10T17:57:14+00:00] INFO: template[/etc/newrelic/nrsysmond.cfg] backed up to /root/.chef/local-mode-cache/backup/etc/newrelic/nrsysmond.cfg.chef-20140410175714.979213
[2014-04-10T17:57:14+00:00] INFO: template[/etc/newrelic/nrsysmond.cfg] updated file contents /etc/newrelic/nrsysmond.cfg
[2014-04-10T17:57:14+00:00] INFO: Processing service[newrelic-sysmond] action enable (newrelic::server-monitor line 36)
[2014-04-10T17:57:15+00:00] INFO: Processing service[newrelic-sysmond] action start (newrelic::server-monitor line 36)
[2014-04-10T17:57:16+00:00] INFO: service[newrelic-sysmond] started
[2014-04-10T17:57:16+00:00] INFO: Processing service[php-fpm] action restart (skillshare::restart_application line 10)
[2014-04-10T17:57:17+00:00] INFO: service[php-fpm] restarted
[2014-04-10T17:57:17+00:00] INFO: Processing service[nginx] action restart (skillshare::restart_application line 14)
[2014-04-10T17:57:19+00:00] INFO: service[nginx] restarted
[2014-04-10T17:57:19+00:00] INFO: Processing package[newrelic-php5] action remove (newrelic::php-agent line 12)
[2014-04-10T17:57:19+00:00] INFO: Processing package[newrelic-php5] action upgrade (newrelic::php-agent line 18)
[2014-04-10T17:57:24+00:00] INFO: package[newrelic-php5] upgraded from uninstalled to 4.7.5.43
[2014-04-10T17:57:24+00:00] INFO: package[newrelic-php5] sending run action to execute[newrelic-install] (immediate)
[2014-04-10T17:57:24+00:00] INFO: Processing execute[newrelic-install] action run (newrelic::php-agent line 24)
[2014-04-10T17:58:16+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process terminated by signal 9 (KILL)

Using Chef 11.10.4 on Opsworks, I get this message under both version 1.0.3 and 0.5.8. When I ssh into the instance itself, and try to run the newrelic-install install command that the Chef run apparently fails on, it presents me with an interactive prompt:

dan@billow:~$ sudo newrelic-install install
New Relic PHP Agent Installation (interactive mode)
===================================================


In order for the New Relic agent to function correctly it requires a license
key. Please enter that key now. If you do not have your license key handy you
can add it to your INI file(s) later. Please be aware that the license key you
specify here will be installed in the default INI files, and will be the key
used for any virtual host or directory / application that does not override
the key on a per-host or per-directory basis. This is only relevant if you run
a multi-tenant site. Please contact http://support.newrelic.com
if you run such a site and have any questions.

If you are upgrading from a previous version please leave this blank. Please
also note that the key you enter here will not replace any existing key in
your INI file(s). It applies only to newly created INI files or INI files that
have not been modified by this script before.

   Enter New Relic license key (or leave blank):

It then waits for me (or the chef runner) to input the license key. In this bug report, it's proposed that the underlying operating system's memory manager is killing the idle chef process while it waits for user input -- could the same thing be happening here? Why is the newrelic-install install command running interactively in a chef script?

This is running on Ubuntu 12.04 LTS, as is the default for Opsworks stacks.

Error executing action `install` on resource 'package[newrelic-sysmond]'

Hello,
I am seeing the following error when trying to use new-relic with ubuntu 12.04/Chef 11.6.0, on a t1.micro. I had success on m1.small, not sure if it is memory related.

Thanks

[2013-07-25T18:55:13+00:00] INFO: Processing package[wget] action install (newrelic::repository line 10)
[2013-07-25T18:55:13+00:00] INFO: Processing execute[newrelic-add-gpg-key] action run (newrelic::repository line 20)
[2013-07-25T18:55:13+00:00] INFO: Processing remote_file[/etc/apt/sources.list.d/newrelic.list] action create_if_missing (newrelic::repository line 27)
[2013-07-25T18:55:13+00:00] INFO: Processing execute[newrelic-apt-get-update] action nothing (newrelic::repository line 37)
[2013-07-25T18:55:13+00:00] INFO: Processing package[newrelic-sysmond] action install (newrelic::server-monitor line 11)

Error executing action install on resource 'package[newrelic-sysmond]'

Chef::Exceptions::Package

No version specified, and no candidate version available for newrelic-sysmond

Resource Declaration:

In /opt/sailpoint/chef/cookbooks/newrelic/recipes/server-monitor.rb

11: package "newrelic-sysmond" do
12: action :install
13: end
14:

Compiled Resource:

Declared in /opt/sailpoint/chef/cookbooks/newrelic/recipes/server-monitor.rb:11:in `from_file'

package("newrelic-sysmond") do
action [:install]
retries 0
retry_delay 2
package_name "newrelic-sysmond"
cookbook_name :newrelic
recipe_name "server-monitor"
end

[2013-07-25T18:55:14+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-07-25T18:55:14+00:00] ERROR: Running exception handlers
[2013-07-25T18:55:14+00:00] ERROR: Exception handlers complete
[2013-07-25T18:55:14+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-07-25T18:55:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Fails to install on raspbian (package name?)

  1. Get a raspberry pi w/rasbian
  2. Add in the newrelic install recipe
  3. Cook it
    bundle exec knife solo cook pi@pi

Expected:
Either it warns that you don't have the right access/OS, or installs as per https://newrelic.com/docs/server/server-monitor-installation-other-linux

Actual:
Recipe: newrelic::install

  • package[wget] action install (up to date)

[2013-06-23T09:09:39+00:00] FATAL: Chef::Exceptions::Package: package[newrelic-sysmond](newrelic::server-monitor line 9) had an error: Chef::Exceptions::Package: No version specified, and no candidate version available for newrelic-sysmond
ERROR: RuntimeError: chef-solo failed. See output above.

... presumably because the prior step, to wget the apt repo, failed silently or was not right for the platform.

Cookbook runs break on newrelic-sysmond

Jul  2 17:40:30  chef.log: Configuration file `/etc/newrelic/nrsysmond.cfg'
Jul  2 17:40:30  chef.log: ==> Modified (by you or by a script) since installation.
Jul  2 17:40:30  chef.log: ==> Package distributor has shipped an updated version.
Jul  2 17:40:30  chef.log:   What would you like to do about it ?  Your options are:
Jul  2 17:40:30  chef.log:    Y or I  : install the package maintainer's version
Jul  2 17:40:30  chef.log:    N or O  : keep your currently-installed version
Jul  2 17:40:30  chef.log:      D     : show the differences between the versions
Jul  2 17:40:30  chef.log:      Z     : start a shell to examine the situation
Jul  2 17:40:30  chef.log: The default action is to keep your current version.
Jul  2 17:40:30  chef.log: *** nrsysmond.cfg (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing newrelic-sysmond (--configure):
Jul  2 17:40:30  chef.log: EOF on stdin at conffile prompt
Jul  2 17:40:30  chef.log: No apport report written because MaxReports is reached already
Jul  2 17:40:30  chef.log: Errors were encountered while processing:
Jul  2 17:40:30  chef.log: newrelic-sysmond
Jul  2 17:40:30  chef.log: E: Sub-process /usr/bin/dpkg returned an error code (1)
Jul  2 17:40:30  chef.log: ---- End output of "bash"  "/tmp/chef-script20140702-8991-12dsl1g" ----
Jul  2 17:40:30  chef.log: Ran "bash"  "/tmp/chef-script20140702-8991-12dsl1g" returned 1

ChefSpec

  • Improve current basic tests
  • Add additional tests

newrelic_deployment does nothing when called via notifies

if node[:my_app].attribute?(:newrelic)
  bash 'dummy-notify-chef-run' do
    notifies :notify, 'newrelic_deployment[chef-run]', :delayed
  end
end

newrelic_deployment 'chef-run' do
  api_key node[:my_app][:newrelic][:api_key]
  app_id node[:my_app][:newrelic][:app_id]
  description 'chef-client executed'
  revision `basename $(readlink #{node[:my_app][:build_path]}/current)`
  user 'chef-client'
  action :nothing
end

For some reason, this does nothing. The delayed notify is set and at the end newrelic_deployment[chef-run] is called but it does nothing.

Support PHP5.5 and Apache 2.4

This cookbook seems to not currently support PHP5.5 and Apache 2.4.

The new versions changed the paths where things are located and it seems that the cookbook does not support it.

package[newrelic-php5] fresh install fails due to resource cloning

From testing for a fresh install with install_action set to install or upgrade:
(Ubuntu 12.04 / Chef 11.14.2 / newrelic cookbook 1.2.1)

[2014-08-13T14:08:24+01:00] WARN: Cloning resource attributes for package[newrelic-php5] from prior resource (CHEF-3694)
[2014-08-13T14:08:24+01:00] WARN: Previous package[newrelic-php5]: /var/chef/cache/cookbooks/newrelic/recipes/php-agent.rb:14:in `from_file'
[2014-08-13T14:08:24+01:00] WARN: Current  package[newrelic-php5]: /var/chef/cache/cookbooks/newrelic/recipes/php-agent.rb:20:in `from_file'
[2014-08-13T14:08:24+01:00] WARN: Cloning resource attributes for service[newrelic-daemon] from prior resource (CHEF-3694)
[2014-08-13T14:08:24+01:00] WARN: Previous service[newrelic-daemon]: /var/chef/cache/cookbooks/newrelic/recipes/php-agent.rb:39:in `from_file'
[2014-08-13T14:08:24+01:00] WARN: Current  service[newrelic-daemon]: /var/chef/cache/cookbooks/newrelic/recipes/php-agent.rb:102:in `from_file'

Resource cloning due to defining package[newrelic-php5] twice results in the version attribute being defined for the single resulting package[newrelic-php5] resource after the compile phase of the chef-client run.

Recipe: newrelic::php-agent
  * package[newrelic-php5] action remove (up to date)
  * package[newrelic-php5] action install

    ================================================================================
    Error executing action `install` on resource 'package[newrelic-php5]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '100'
    ---- Begin output of apt-get -q -y install newrelic-php5=3.0.5.95 ----
    STDOUT: Reading package lists...
    Building dependency tree...
    Reading state information...
    STDERR: E: Version ‘3.0.5.95’ for ‘newrelic-php5’ was not found
    ---- End output of apt-get -q -y install newrelic-php5=3.0.5.95 ----
    Ran apt-get -q -y install newrelic-php5=3.0.5.95 returned 100

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/newrelic/recipes/php-agent.rb

     20: package 'newrelic-php5' do
     21:   action node['newrelic']['php-agent']['agent_action']
     22:   notifies :run, 'execute[newrelic-install]', :immediately
     23: end
     24:

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/newrelic/recipes/php-agent.rb:20:in `from_file'

    package("newrelic-php5") do
      action [:install]
      retries 0
      retry_delay 2
      guard_interpreter :default
      package_name "newrelic-php5"
      version "3.0.5.95"
      timeout 900
      cookbook_name "newrelic"
      recipe_name "php-agent"
    end

It removes newrelic-php5=3.0.5.95 and then tries to install newrelic-php5=3.0.5.95 which is not desired and not available in the repo anyhow and the run fails.
Because the version is specified and the package is not installed, the action is changed from :upgrade :install.
Docs: http://docs.getchef.com/resource_package.html
https://github.com/opscode/chef/blob/b47efe760596c030d1ad3bbaa053102c5436bade/lib/chef/provider/package.rb#L43

By having unique names for the two resources, resource cloning (attribute inheritance?) is avoided and things work.

HTH

Use a different format for config file templates

In the interest of being more flexible and easier to keep up-to-date with any changes to the software, what are your thoughts commenting out everything in the skeleton config files and adding something like this to the bottom of each?
https://github.com/opscode-cookbooks/php/blob/master/templates/default/php.ini.erb#L1898-L1900

Then you simply put the defaults into the appropriate attribute hash itself, and you have all the same defaults, but fully tunable and with everything in the place where chef expects, rather than situations like this where the default is hardcoded when the attribute hasn't been set:
https://github.com/escapestudios/chef-newrelic/blob/master/templates/default/newrelic.ini.php.erb#L256-L260

This would likely need to be a major version bump so that all the attribute namespace can shift around appropriately. Thoughts?

Regardless, thanks for hearing me out! :)

Doesn't work out of the box for me

anaxgorous posted the following as a newrelic community cookbook comment (http://community.opscode.com/cookbooks/newrelic/comments):

"Doesn't work out of the box for me: [2012-11-19T20:16:14+00:00] INFO: Processing package[newrelic-sysmond] action install (newrelic::server-monitor line 9) ================================================================================ Error executing action install on resource 'package[newrelic-sysmond]' ================================================================================ Chef::Exceptions::Package ------------------------- Version 1.2.0.257 of newrelic-sysmond not found. Did you specify both version and release? (version-release, e.g. 1.84-10.fc6) Resource Declaration: --------------------- # In /var/chef/cache/cookbooks/newrelic/recipes/server-monitor.rb 9: package "newrelic-sysmond" do 10: action :install 11: version "1.2.0.257" 12: end 13: Compiled Resource: ------------------ # Declared in /var/chef/cache/cookbooks/newrelic/recipes/server-monitor.rb:9:in `from_file' package("newrelic-sysmond") do recipe_name "server-monitor" version "1.2.0.257" cookbook_name "newrelic" retry_delay 2 action [:install] package_name "newrelic-sysmond" retries 0 end"

No sane default for php agent config_file

ArgumentError
-------------
You must supply a name when declaring a template resource


Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/newrelic/recipes/php_agent.rb:48:in `from_file'


Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/newrelic/recipes/php_agent.rb:

41:  
42:  service 'newrelic-daemon' do
43:    supports :status => true, :start => true, :stop => true, :restart => true
44:  end
45:  
46:  # configure New Relic INI file and set the daemon related options (documented at /usr/lib/newrelic-php5/scripts/newrelic.ini.template)
47:  # and restart the web server in order to pick up the new settings
48>> template node['newrelic']['php_agent']['config_file'] do
49:    source 'agent/php/newrelic.ini.erb'
50:    owner 'root'
51:    group 'root'
52:    mode 0644
53:    variables(
54:      :enabled => node['newrelic']['application_monitoring']['enabled'],
55:      :license => license,
56:      :logfile => node['newrelic']['application_monitoring']['logfile'],
57:      :loglevel => node['newrelic']['application_monitoring']['loglevel'],

setting proxy attribute for meet me plugin creates incorrect config

When you set a proxy for the meet me plugin the configuration file fails to load:

STDERR: Error in the configuration file:

> while scanning a simple key
>   in "<string>", line 9, column 3:
>       proxy = http://qy1prdproxy01.ppr ... 
>       ^
> could not found expected ':'
>   in "<string>", line 11, column 1:
>     #services: 
>     ^

Configuration should be a valid YAML file.

And you can see in the config that it is setting the proxy = rather than proxy: .

Do not stop newrelic-daemon if using agent mode

I will not always be restarting my web server with each Chef run. The logic in php-agent.rb for when the startup mode is agent is killing the newrelic-daemon on every Chef client run.

This is obviously wrong and makes a poor assumption that I will always be restarting apache with each run.

New Relic-plugins

Sorry for the "group issue" :-), but I'd like to get some feedback you as you've been actively contributing to this cookbook...

A while ago the installation of the MeetMe-plugin was included in the New Relic-cookbook, but there are obviously plenty of other plugins available for the New Relic platform... Do you think New Relic-cookbook should expand to provide an easy installation of plugins or do you think this should just be left over to other cookbooks?

Thanks in advance for your opinion!

Kind regards,
David

@drywheat @gleseur @NathanielMichael @Rud5G @Drecomm @sarkis @eric-tucker @oblador @hhoover @nchaffee @ge1st @bennybauer @onema @cstewart87 @vitaliel @b0d0nne11 @akolesen @aarongeiser @bassrock @jeffbyrnes @pmcjury @RobWu @Benny @bencaron @pmcjury @josegonzalez @atrullmdsol @sethcall @rcolanero @dje @aaronjensen @cgriego

newrelic_deployment resource ignores action :nothing

This is needed functionality as I want to use notifies to conditionally call the newrelic_deployment.

Right now, I'm forced to write conditionals around including a separate recipe to log a deployment.

All resources should respect action :nothing. No exceptions.

appname vs app_name in templates/default/agent/newrelic.yml.erb

I tried to use the newrelic_yml resource as so:

newrelic_yml "my_app_path/newrelic.yml" do
  agent_type 'ruby'
  app_name 'my_app_name'
end

but the application is missing a name in the New Relic console " (Staging)"

I noticed that newrelic.yml.erb is using @appname in the template and not @app_name as it appears the LWRP specifies. Is that right? It doesn't seem to be using the app_name parameter that I pass to the LWRP.

Incompatible with apt cookbook

If you combine the apt::default recipe and the newrelic::install recipe on the same server (in that order since the apt recipe is meant to be run before any packages are installed), then the newrelic::install recipe fails to run apt-get update after the newrelic.list file is installed because the execute[apt-get-update] resource declared in the newrelic::install recipe exactly matches the execute[apt-get-update resource that appears in the apt::default, so chef doesn't execute it a 2nd time because it already has executed in Chef's eyes. This can be remedied by either using the apt cookbook's apt_repository LWRP or disambiguating the execute resource in the newrelic::install recipe.

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.