Skip to content

Instantly share code, notes, and snippets.

@bspindler
Created November 9, 2015 22:50
Show Gist options
  • Save bspindler/8380fc71a4328cc998e4 to your computer and use it in GitHub Desktop.
Save bspindler/8380fc71a4328cc998e4 to your computer and use it in GitHub Desktop.
e24a5c8f584c38001ead4767a5cc352a
@bspindler
Copy link
Author

Monitoring Ruby & Rails w/Netuitive walkthrough
When installing the netuitive ruby agent
Installing netuitived

  1. install the netuitived gem using the command "sudo gem install 'netuitived'" (gem can also be found here: https://rubygems.org/gems/net uitived)
  2. change the config/agent.yml file in the netuitived install directory
    a. required changes to this file are the apiId field and the elementName field.
    b. the address and port for the druby server (fields netuitivedPort and netuitivedAddr) may also need to be changed depending on
    your needs.
  3. Run the command "ruby -e 'require "netuitived"' to start the netuitived server
    Installing the netuitive_ruby_api manually
  4. install the netuitive_ruby_api gem using the command "sudo gem install 'netuitive_ruby_api'" (gem can also be found here: https://rubyge ms.org/gems/netuitive_ruby_api)
  5. change the config/agent.yml file in the netuitive_ruby_api install directory
    a. make sure that the netuitivedAddr and netuitivedPort fields match the ones in netuitived
  6. Your code will need to be modified to use the netuitive_ruby_api gem to send data to netuitived. a. examples:
    i. NetuitiveRubyAPI::netuitivedServer.addSample("#{controller}.#{action}.request.total_duration", event.duration) ii. NetuitiveRubyAPI::netuitivedServer.aggregateMetric("action_controller.write_fragment", 1)
    Installing the netuitive_ruby_api and netuitive_rails_agent using bundle
  7. add the following lines to the Gemfile in your rails server directory a. gem 'netuitive_ruby_api'
    b. gem 'netuitive_rails_agent'
  8. run the command "bundle install" to install the gems
  9. change the config/agent.yml file in the netuitive_ruby_api install directory (if unsure where this is run the command "bundle show
    netuitive_ruby_api" to find it)
    a. make sure that the netuitivedAddr and netuitivedPort fields match the ones in netuitived
  10. restart the rails server
    Related articles
    Monitoring Ruby & Rails w/Netuitive walkthrough
    Deploying to the AWS Dev Environment
    How to create a Widget
    How to Run a Smoke Test on All Remote Collector Keys for All Integrations
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment