Giter Club home page Giter Club logo

newrelic-ng's People

Contributors

andytson avatar chr4 avatar eratosthene avatar jeffbyrnes avatar opetrushka-zendesk avatar

Stargazers

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

Watchers

 avatar  avatar

newrelic-ng's Issues

nrsysmond suite fails due to invalid license key, but only on some platforms

I am seeing failures from nrsysmond-default test suite which appear to be related to the TESTKEY_NRSYSMOND key being invalid. For some reason I can consistently reproduce this on certain platforms (e.g. centos-59, ubuntu-1204), but I believe it is actually a timing issue and not particular to the platforms in question.

External startup mode broken, uses the .ini file as the .cfg file

If you try to use the external startup mode for the php-agent by setting the attribute
default['newrelic-ng']['app_monitoring']['php-agent']['startup_mode'] = 'external'

The newrelic-daemon would fail to start with the message
"Starting New Relic Daemon: newrelic-daemoninvalid configuration: config: syntax error, expected keyword or comment, got '['"

I think this refactor commit (4a3ed31) by @jeffbyrnes has taken the assumption the .cfg and .ini config files should be the same.
While the 2 contain the same config, the different format is a killer for this.

As much as I wish the 2 configs where the same, it seems they are not, and the daemon isn't able to parse the ini file if it's put as the .cfg file as shown by the daemon error.
Can also see it in the template files:
https://github.com/chr4-cookbooks/newrelic-ng/blob/master/templates/default/newrelic.cfg.erb
https://github.com/chr4-cookbooks/newrelic-ng/blob/master/templates/default/newrelic.ini.php.erb

I think the place of the issue and the fix reside around these 2 lines:
https://github.com/chr4-cookbooks/newrelic-ng/blob/master/providers/php_agent.rb#L60
https://github.com/chr4-cookbooks/newrelic-ng/blob/master/providers/php_agent.rb#L86

Either one of them should change to another variable name that contains the other template or some more fancy condition/and or dynamic format/header..

kitchen test generic-agent-default-centos-64 fails

     * package[ruby-mode] action install[2013-09-08T15:39:17+00:00] INFO: Processing package[ruby-mode] action install (ruby::1.9.1 line 73)

       * No version specified, and no candidate version available for ruby-mode

   ================================================================================
   Error executing action `install` on resource 'package[ruby-mode]'
   ================================================================================


   Chef::Exceptions::Package
   -------------------------
   No version specified, and no candidate version available for ruby-mode


   Resource Declaration:
   ---------------------
   # In /tmp/kitchen-chef-solo/cookbooks/ruby/definitions/ruby_packages.rb

    73:       package pkg do
    74:         action params[:action]
    75:       end
    76:     end



   Compiled Resource:
   ------------------
   # Declared in /tmp/kitchen-chef-solo/cookbooks/ruby/definitions/ruby_packages.rb:73:in `block (2 levels) in from_file'

   package("ruby-mode") do
     params {:action=>:install, :name=>"1.9.1"}
     action [:install]
     retries 0
     retry_delay 2
     package_name "ruby-mode"
     cookbook_name :ruby
     recipe_name "1.9.1"
   end

nrsysmond-default-centos-59 test fails

newrelic-sysmond service cannot start, because no valid license_key is found.
The recipe works though, but I couldn't find a valid newrelic testkey to make the test work.

Ruby not available for newrelic user

Thanks for putting together the newrelic-ng cookbook.

I'm having some trouble with the generic agent. As I understand the output below, the newrelic_nginx_agent.daemon is being started as newrelic user, but the ruby installation is not available. I have ruby installed with rbenv, which I believe does not make it available globally.

Would you say this is a bug in the script or my setup? Any tips on how to get it sorted?

Thanks!

* service[newrelic_plugin_nginx_status_agent] action start
================================================================================
Error executing action `start` on resource 'service[newrelic_plugin_nginx_status_agent]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '127'
---- Begin output of su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon start' ----
STDOUT: 
STDERR: /usr/bin/env: ruby: No such file or directory
---- End output of su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon start' ----
Ran su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon start' returned 127


Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-1/newrelic-ng/providers/generic_agent.rb

 88:   service "newrelic_plugin_#{new_resource.plugin_name}" do
 89:     provider        Chef::Provider::Service::Simple
 90:     supports        status: true
 91:     start_command   "su #{new_resource.owner} -c '#{daemon} start'"
 92:     stop_command    "su #{new_resource.owner} -c '#{daemon} stop'"
 93:     restart_command "su #{new_resource.owner} -c '#{daemon} restart'"
 94: 
 95:     # status always returns 0, so we're grepping for pid as a workaround
 96:     status_command  "su #{new_resource.owner} -c '#{daemon} status |grep -q pid'"
 97: 
 98:     subscribes      :restart, "template[#{config_file}]"
 99:     action          :start
100:   end
101: end



Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-1/newrelic-ng/providers/generic_agent.rb:88:in `configure_agent'

service("newrelic_plugin_nginx_status_agent") do
  provider Chef::Provider::Service::Simple
  action [:start]
  supports {:status=>true}
  retries 0
  retry_delay 2
  service_name "newrelic_plugin_nginx_status_agent"
  pattern "newrelic_plugin_nginx_status_agent"
  start_command "su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon start'"
  stop_command "su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon stop'"
  status_command "su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon status |grep -q pid'"
  restart_command "su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon restart'"
  startup_type :automatic
  cookbook_name :"newrelic-ng"
end

default recipe is broken

Chef::Exceptions::RecipeNotFound

could not find recipe server-monitoring-default for cookbook newrelic-ng

Should not depend on php & python

I realize these are necessary for their respective monitors, but they should be recommends rather than depends as their dependencies shouldn't be installed if we're just using the ruby agent.

generic_plugin tests fail on centos

[root@generic-agent-default-centos-59 vagrant]# su newrelic -c '/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon start'
/opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon:5:in `require': no such file to load -- rubygems (LoadError)
    from /opt/newrelic-agents/nginx_status_agent/newrelic_nginx_agent.daemon:5

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.