Ruby on Rails Logs

Ruby on Rails is an open source framework for web development in Ruby. It automatically creates and maintains basic text logs for each environment, such as development, staging, and production. Despite this categorization, identifying the source of an issue isn't easy. OpManager Nexus natively supports Ruby on Rails logs and starts managing them as soon as you upload them in a defined format. Learn more about log management with OpManager Nexus.

Getting started

  1. Log in to your OpManager Nexus account.
  2. Download and install the OpManager Nexus Server Monitoring agent (Windows | Linux). 
  3. Go to Admin > AppLogs > Log Profile and Add Log Profile.

Log file path

By default, OpManager Nexus sources Ruby on Rails logs from the folder path mentioned below. If you have logs in a different folder, you can add that folder's file path for monitoring when creating a log profile.

{Rails_Application_Root}/logs/production.log

Log pattern

$Severity$, [$DateTime:date$ #$ProcessId:number$] $LogLevel$ -- : [$UniqueId$] $Message$

This is the default log pattern defined by OpManager Nexus for parsing Ruby on Rails production environment logs.

Sample log

I, [2018-07-27T03:17:11.518077 #13828] INFO -- : [f0c840c5-b0f9-4dc9-a4ac-66f18bc94f39] Processing by Api::V7::TasksController#notification_counts as JSON

The above sample log can be separated into six fields, each of which will take its respective value as the log is being uploaded to OpManager Nexus.

Field name Filed value
Severity I
Date Time 2018-07-27T03:17:11.518077
Process ID 13828
Log Level INFO
Unique ID f0c840c5-b0f9-4dc9-a4ac-66f18bc94f39
Message Processing by Api::V7::TasksController#notification_counts as JSON
Note

To monitor Ruby on Rails logs for a development environment, create a custom log type.

Shortlink has been copied!