RubyAgent
A Ruby security agent to instrument Ruby web applications. Additional docs can be found here
Installation
Add this line to your Gemfile to install the gem directly from RubyGems
$ gem 'tcell_agent'
or to use a local version directly,
$ gem 'tcell_agent', :path => '<path-to-gem-repo'
and to install the gem,
$ bundle install
Usage
Download the config file from the tCell dashboard and move it to the config
directory of the application.
$ cp ~/Downloads/tcell_agent.config config/
When the server is started, tCell will be running. The log files will be created in the tcell
directory of the project.
Alternatively, Rails initializers can be used instead of adding the tcell_agent.config
file. The values for the fields can be found in tcell_agent.config
. Here's a sample config/initializers/tcell.rb
:
if defined?(TCellAgent)
TCellAgent.configure do |config|
config.app_id = "---APP_ID---"
config.api_key = "---API_KEY---"
config.agent_log_dir = "---path-to-logs-dir---"
config.agent_home_dir = "--path-to-tcell-dir---"
config.tcell_api_url = ""
config.tcell_input_url = ""
config.allow_payloads = true
end
end
Troubleshooting
Log level can be customized in tcell_agent.config
by adding a block such as:
"logging_options": {
"enabled": true,
"level": "INFO"
}