Ruby on Rails SolarWinds uses cookies on its websites to make your online experience easier and better. By using our website, you consent to our use of cookies. For more information on cookies, see our Cookie Policy. Continue Visit SolarWinds.com Documentation Contact Us Customer Portal Toggle navigation Academy SOLARWINDS ACADEMY CLASSES GUIDED CURRICULUM ELEARNING CERTIFICATION SOLARWINDS ACADEMY The SolarWinds Academy offers education resources to learn more about your product. The curriculum provides a comprehensive understanding of our portfolio of products through virtual classrooms, eLearning videos, and professional certification. See What's Offered AVAILABLE RESOURCES Virtual Classrooms Calendar eLearning Video Index SolarWinds Certified Professional Program VIRTUAL CLASSROOMS Attend virtual classes on your product and a wide array of topics with live instructor sessions or watch on-demand videos to help you get the most out of your purchase. Find a Class Open Sessions and Popular Classes General Office Hours Orion Platform Network Performance Monitor NetFlow Traffic Analyzer See All IP Address Manager Network Configuration Manager Server & Application Monitor Virtualization Manager GUIDED CURRICULUM Whether learning a newly-purchased SolarWinds product or finding information to optimize the software you already own, we have guided product training paths that help get customers up to speed quickly. View Suggested Paths ELEARNING On-demand videos on installation, optimization, and troubleshooting. See All Videos Popular Videos Upgrading Isn't as Daunting as You May Think Upgrading Your Orion Platform Deployment Using Microsoft Azure Upgrading From the Orion Platform 2016.1 to 2019.4 Don't Let the Gotchas Get You How to Install NPM and Other Orion Platform Products Upgrading the Orion Platform See All Videos Navigating the Web Console Prepare a SAM Installation Installing Server & Application Monitor How to Install SEM on VMware Customer Success with the SolarWinds Support Community New job, New to SolarWinds? SOLARWINDS CERTIFIED PROFESSIONAL PROGRAM Become a SolarWinds Certified Professional to demonstrate you have the technical expertise to effectively set up, use, and maintain SolarWinds’ products. Learn More STUDY AIDS Access Rights Manager Architecture and Design Database Performance Analyzer Diagnostics NetFlow Traffic Analyzer Network Configuration Manager Network Performance Monitor Server & Application Monitor ONBOARDING & UPGRADING NEW TO SOLARWINDS ORION ASSISTANCE PROGRAM UPGRADE RESOURCE CENTER SUPPORT OFFERINGS SMARTSTART WHAT’S NEW UPGRADE RESOURCE CENTER See helpful resources, answers to frequently asked questions, available assistance options, and product-specific details to make your upgrade go quickly and smoothly. Visit the Upgrade Resource Center PRODUCT-SPECIFIC UPGRADE RESOURCES Network Performance Monitor NetFlow Traffic Analyzer Network Configuration Manager Server & Application Monitor Storage Resource Monitor Virtualization Manager Web Performance Monitor Log Analyzer ORION ASSISTANCE PROGRAM This program connects you with professional consulting resources who are experienced with the Orion Platform and its products. These services are provided at no additional charge for customers who were/are running one of the Orion Platform versions affected by SUNBURST or SUPERNOVA. Learn More SUPPORT OFFERINGS Our Customer Support plans provide assistance to install, upgrade, and troubleshoot your product. Choose what best fits your environment and organization, and let us help you get the most out of your purchase. We support all our products, 24/7/365. Learn more AVAILABLE PROGRAMS Professional Premier Premier Enterprise SMARTSTART Our SmartStart programs help you install and configure or upgrade your product. Get assistance from SolarWinds’ technical support experts with our Onboarding and Upgrading options. We also offer a self-led program for Network Performance Monitor (NPM) and Server & Application Monitor (SAM) if you need help doing it yourself. Learn more AVAILABLE PROGRAMS SmartStart for Onboarding SmartStart for Upgrading SmartStart Self-Led for NPM and SAM WHAT’S NEW AT SOLARWINDS Find the latest release notes, system requirements, and links to upgrade your product. Learn More NEW TO SOLARWINDS You just bought your first product. Now what? Find out more about how to get the most out of your purchase. From installation and configuration to training and support, we've got you covered. Learn More Support Offerings PREMIER SUPPORT SMARTSTART WORKING WITH SUPPORT PREMIER SUPPORT We offer paid Customer Support programs to assist you with installation, upgrading and troubleshooting. Choose what best fits your environment and budget to get the most out of your software. Get priority call queuing and escalation to an advanced team of support specialist. AVAILABLE PROGRAMS Premier Support Premier Enterprise Support SMARTSTART Our SmartStart paid programs are intended help you install and configure or upgrade your product. You’ll be assisted by SolarWinds’ technical support experts who are dedicated to quickly and efficiently help you with getting up and running or moving to the latest version of your product. AVAILABLE PROGRAMS SmartStart for Onboarding SmartStart for Upgrading Working with Support WORKING WITH SUPPORT A glossary of support availability, tips, contact info, and customer success resources. We're here to help. Learn More PRODUCTS NETWORK MANAGEMENT SYSTEMS MANAGEMENT DATABASE MANAGEMENT IT SECURITY IT SERVICE MANAGEMENT APPLICATION MANAGEMENT DOCUMENTATION NETWORK MANAGEMENT Orion Platform Network Performance Monitor NetFlow Traffic Analyzer IP Address Manager Network Configuration Manager Engineer's Toolset View All Network Management Products Network Topology Mapper User Device Tracker VoIP Network Quality Manager Log Analyzer Enterprise Operations Console Your SolarWinds products come with a secret weapon. Award-winning, instructor-led classes, eLearning videos, and certifications. Find a Class SYSTEMS MANAGEMENT Server & Application Monitor Virtualization Manager Storage Resource Monitor Web Performance Monitor Server Configuration Monitor Backup View All Systems Management Products Your SolarWinds products come with a secret weapon. Award-winning, instructor-led classes, eLearning videos, and certifications. Find a Class IT SECURITY Security Event Manager Access Rights Manager Serv-U Managed File Transfer Server Serv-U FTP Server Patch Manager Identity Monitor View All IT Security Products Your SolarWinds products come with a secret weapon. Award-winning, instructor-led classes, eLearning videos, and certifications. Find a Class DATABASE MANAGEMENT Database Performance Analyzer Database Performance Monitor View All Database Management Products Your SolarWinds products come with a secret weapon. Award-winning, instructor-led classes, eLearning videos, and certifications. Find a Class IT SERVICE MANAGEMENT Dameware Remote Everywhere Dameware Remote Support Dameware Mini Remote Control Service Desk Web Help Desk View All IT Service Management Products Kiwi Syslog Server Kiwi CatTools ipMonitor Mobile Admin Your SolarWinds products come with a secret weapon. Award-winning, instructor-led classes, eLearning videos, and certifications. Find a Class APPLICATION MANAGEMENT AppOptics Pingdom Papertrail Loggly View All Application Management Products Your SolarWinds products come with a secret weapon. Award-winning, instructor-led classes, eLearning videos, and certifications. Find a Class COMMUNITY THWACK® ORANGE MATTER LOGICALREAD THWACK® Over 150,000 users—get help, be heard, improve your product skills Visit THWACK AVAILABLE PROGRAMS SolarWinds Lab THWACK Tuesday Tips (TTT) THWACKcamp™ 2020 On-demand Orange Matter Practical advice on managing IT infrastructure from up-and-coming industry voices and well-known tech leaders View Orange Matter LogicalRead Blog Articles, code, and a community of database experts Read the Blog SUBMIT A TICKET Academy SOLARWINDS ACADEMY See What's Offered Virtual Classrooms Calendar eLearning Video Index SolarWinds Certified Professional Program CLASSES Find a Class General Office Hours Orion Platform Network Performance Monitor NetFlow Traffic Analyzer See All IP Address Manager Network Configuration Manager Server & Application Monitor Virtualization Manager GUIDED CURRICULUM View Suggested Paths ELEARNING See All Videos Upgrading Isn't as Daunting as You May Think Upgrading Your Orion Platform Deployment Using Microsoft Azure Upgrading From the Orion Platform 2016.1 to 2019.4 Don't Let the Gotchas Get You How to Install NPM and Other Orion Platform Products Upgrading the Orion Platform See All Videos Navigating the Web Console Prepare a SAM Installation Installing Server & Application Monitor How to Install SEM on VMware Customer Success with the SolarWinds Support Community New job, New to SolarWinds? CERTIFICATION Learn More Access Rights Manager Architecture and Design Database Performance Analyzer Diagnostics NetFlow Traffic Analyzer Network Configuration Manager Network Performance Monitor Server & Application Monitor ONBOARDING & UPGRADING NEW TO SOLARWINDS Learn More ORION ASSISTANCE PROGRAM Learn More UPGRADE RESOURCE CENTER Visit the Upgrade Resource Center Network Performance Monitor NetFlow Traffic Analyzer Network Configuration Manager Server & Application Monitor Storage Resource Monitor Virtualization Manager Web Performance Monitor Log Analyzer SUPPORT OFFERINGS Learn More Professional Premier Premier Enterprise SMARTSTART Learn more SmartStart for Onboarding SmartStart for Upgrading SmartStart Self-Led for NPM and SAM WHAT’S NEW Learn More Support Offerings PREMIER SUPPORT Premier Support Premier Enterprise Support SMARTSTART SmartStart for Onboarding SmartStart for Upgrading Working with Support WORKING WITH SUPPORT Learn More PRODUCTS NETWORK MANAGEMENT Orion Platform Network Performance Monitor NetFlow Traffic Analyzer IP Address Manager Network Configuration Manager Engineer's Toolset View All Network Management Products Network Topology Mapper User Device Tracker VoIP Network Quality Manager Log Analyzer Enterprise Operations Console SYSTEMS MANAGEMENT Server & Application Monitor Virtualization Manager Storage Resource Monitor Web Performance Monitor Server Configuration Monitor Backup View All Systems Management Products IT SECURITY Security Event Manager Access Rights Manager Serv-U Managed File Transfer Server Serv-U FTP Server Patch Manager Identity Monitor View All IT Security Products DATABASE MANAGEMENT Database Performance Analyzer Database Performance Monitor View All Database Management Products IT SERVICE MANAGEMENT Dameware Remote Everywhere Dameware Remote Support Dameware Mini Remote Control Service Desk Web Help Desk View All IT Service Management Products Kiwi Syslog Server Kiwi CatTools ipMonitor Mobile Admin APPLICATION MANAGEMENT AppOptics Pingdom Papertrail Loggly View All Application Management Products DOCUMENTATION COMMUNITY THWACK® Visit THWACK ORANGE MATTER View Orange Matter LOGICALREAD Read the Blog SUBMIT A TICKET Documentation forPapertrail Ruby on Rails To send Ruby on Rails request logs, either: use Papertrail's tiny remote_syslog2 daemon to read an existing log file (like production.log), or change Rails' environment config to use the remote_syslog_logger gem. We recommend remote_syslog2 because it works for other text files (like nginx and MySQL), has no impact on the Rails app, and is easy to set up. Also see Controlling Verbosity. Send log file with remote_syslog2 Install remote_syslog2 Download the current release. To extract it and copy the binary into a system path, run: Copy $ tar xzf ./remote_syslog*.tar.gz $ cd remote_syslog $ sudo cp ./remote_syslog /usr/local/bin RPM and Debian packages are also available. Configure Paths to log file(s) can be specified on the command-line, or save log_files.yml.example as /etc/log_files.yml. Edit it to define: path to your Rails log file (such as production.log) and any other log file(s) that remote_syslog2 should watch. the destination host and port provided under log destinations. If no destination port was provided, set host to logs.papertrailapp.com and remove the port config line to use the default port (514). The remote_syslog2 README has complete documentation and more examples. Start Start the daemon: Copy $ sudo remote_syslog Logs should appear in Papertrail within a few seconds of being written to the on-disk log file. Problem? See Troubleshooting. remote_syslog requires read permission on the log files it is monitoring. Auto-start remote_syslog2 can be automated to start at boot using init scripts (examples) or your preferred daemon invocation method, such as monit or god. See remote_syslog --help or the full README on GitHub. Troubleshooting See remote_syslog2 troubleshooting. Send events with the remote_syslog_logger gem Install Remote Syslog Logger The easiest way to install remote_syslog_logger is with Bundler. Add remote_syslog_logger to your Gemfile. If you are not using a Gemfile, run: Copy $ gem install remote_syslog_logger Configure Rails environment Change the environment configuration file to log via remote_syslog_logger. This is almost always in config/environment.rb (to affect all environments) or config/environments/.rb, such as config/environments/production.rb (to affect only a specific environment). Add this line: Copy config.logger = RemoteSyslogLogger.new('logsN.papertrailapp.com', XXXXX) You can also specify a program name other than the default rails: Copy config.logger = RemoteSyslogLogger.new('logsN.papertrailapp.com', XXXXX, :program => "rails-#{RAILS_ENV}") where logsN and XXXXX are the name and port number shown under log destinations. Alternatively, to point the logs to your local system, use localhost instead of logsN.papertrailapp.com, 514 for the port, and ensure that the system’s syslog daemon is bound to 127.0.0.1. A basic rsyslog config would consist of the following lines in /etc/rsyslog.conf: Copy $ModLoad imudp $UDPServerRun 514 Verify configuration To send a test message, start script/console in an environment which has the syslog config above (for example, RAILS_ENV=production script/console). Run: Copy RAILS_DEFAULT_LOGGER.error "Salutations!" The message should appear on the system's message history within 1 minute. Verbosity For more information on improving the signal:noise ratio, see the dedicated help article here. Lograge We recommend using lograge in lieu of Rails’ standard logging. Add lograge to your Gemfile and smile. Log user ID, customer ID, and more Use lograge to include other attributes in log messages, like a user ID or request ID. The README has more. Here’s a simple example which captures 3 attributes: Copy class ApplicationController < ActionController::Base   before_filter :append_info_to_payload   def append_info_to_payload(payload)     super     payload[:user_id] = current_user.try(:id)     payload[:host] = request.host     payload[:source_ip] = request.remote_ip   end end The 3 attributes are logged in production.rb: with this block: Copy config.lograge.custom_options = lambda do |event|   event.payload end The payload hash populated during the request above is automatically available as event.payload. payload automatically contains the params hash as params. Here's another production.rb example which only logs the request params: Copy config.lograge.custom_options = lambda do |event|   params = event.payload[:params].reject do |k|     ['controller', 'action'].include? k   end   { "params" => params } end Troubleshooting Colors and/or ANSI character codes appear in my log messages By default, Rails generates colorized log messages for non-production environments and monochromatic logs in production. Papertrail renders any ANSI color codes it receives (see More colorful logging with ANSI color codes), so you can decide whether to enable this for any environment. To enable or disable ANSI logging, change this option in your environment configuration file (such as config/environment.rb or config/environments/staging.rb). The example below disables colorized logging. Rails >= 3.x: Copy config.colorize_logging = false Rails 2.x: Copy config.active_record.colorize_logging = false See: http://guides.rubyonrails.org/configuring.html#rails-general-configuration The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. We’re Geekbuilt.® Developed by network and systems engineers who know what it takes to manage today's dynamic IT environments, SolarWinds has a deep connection to the IT community. The result? IT management products that are effective, accessible, and easy to use. COMPANY INVESTORS CAREER CENTER RESOURCE CENTER EMAIL PREFERENCE CENTER FOR CUSTOMERS FOR GOVERNMENT GDPR RESOURCE CENTER SOLARWINDS TRUST CENTER Legal Documents Privacy California Privacy Rights Security Information Documentation & Uninstall Information Sitemap © 2021 SolarWinds Worldwide, LLC. All rights reserved.