Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update help text for log drains #376

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ Commands:
aptible environment:list # List all environments
aptible environment:rename OLD_HANDLE NEW_HANDLE # Rename an environment handle. In order for the new environment handle to appear in log drain/metric destinations, you must restart the apps/databases in this environment.
aptible help [COMMAND] # Describe available commands or one specific command
aptible log_drain:create:datadog HANDLE --url DATADOG_URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Datadog Log Drain
aptible log_drain:create:elasticsearch HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create an Elasticsearch Log Drain
aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a HTTPS Drain
aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a LogDNA Log Drain
aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Papertrail Log Drain
aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Sumologic Drain
aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps true/false] [--drain_databases true/false] [--drain_ephemeral_sessions true/false] [--drain_proxies true/false] # Create a Papertrail Log Drain
aptible log_drain:create:datadog HANDLE --url DATADOG_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Datadog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
aptible log_drain:create:elasticsearch HANDLE --db DATABASE_HANDLE --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create an Elasticsearch Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a HTTPS Drain
aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a LogDNA/Mezmo Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Papertrail Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Sumologic Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Syslog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
aptible log_drain:list # List all Log Drains
aptible login # Log in to Aptible
Expand Down
33 changes: 23 additions & 10 deletions lib/aptible/cli/subcommands/log_drain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ def self.included(thor)
include Helpers::Telemetry

drain_flags = '--environment ENVIRONMENT ' \
'[--drain-apps true/false] ' \
'[--drain_databases true/false] ' \
'[--drain_ephemeral_sessions true/false] ' \
'[--drain_proxies true/false]'
'[--drain-apps|--no-drain-apps] ' \
'[--drain-databases|--no-drain-databases] ' \
'[--drain-ephemeral-sessions|' \
+'--no-drain-ephemeral-sessions] ' \
'[--drain_proxies|--no-drain-proxies]'

def self.drain_options
option :drain_apps, default: true, type: :boolean
Expand Down Expand Up @@ -54,7 +55,9 @@ def self.drain_options
desc 'log_drain:create:elasticsearch HANDLE '\
'--db DATABASE_HANDLE ' \
+ drain_flags,
'Create an Elasticsearch Log Drain'
'Create an Elasticsearch Log Drain. By default, App, ' \
+'Database, Ephemeral Session, and Proxy logs will be sent ' \
+'to your chosen destination.'
drain_options
option :db, type: :string
option :pipeline, type: :string
Expand All @@ -81,7 +84,9 @@ def self.drain_options
desc 'log_drain:create:datadog HANDLE ' \
'--url DATADOG_URL ' \
+ drain_flags,
'Create a Datadog Log Drain'
'Create a Datadog Log Drain. By default, App, Database, ' \
+ 'Ephemeral Session, and Proxy logs will be sent ' \
+ 'to your chosen destination.'
drain_options
option :url, type: :string
define_method 'log_drain:create:datadog' do |handle|
Expand All @@ -107,7 +112,9 @@ def self.drain_options
desc 'log_drain:create:sumologic HANDLE ' \
'--url SUMOLOGIC_URL ' \
+ drain_flags,
'Create a Sumologic Drain'
'Create a Sumologic Drain. By default, App, Database, ' \
+ 'Ephemeral Session, and Proxy logs will be sent ' \
+ 'to your chosen destination.'
option :url, type: :string
drain_options
define_method 'log_drain:create:sumologic' do |handle|
Expand All @@ -118,7 +125,9 @@ def self.drain_options
desc 'log_drain:create:logdna HANDLE ' \
'--url LOGDNA_URL ' \
+ drain_flags,
'Create a LogDNA Log Drain'
'Create a LogDNA/Mezmo Log Drain. By default, App, ' \
+ 'Database, Ephemeral Session, and Proxy logs ' \
+ 'will be sent to your chosen destination.'
option :url, type: :string
drain_options
define_method 'log_drain:create:logdna' do |handle|
Expand All @@ -132,7 +141,9 @@ def self.drain_options
desc 'log_drain:create:papertrail HANDLE ' \
'--host PAPERTRAIL_HOST --port PAPERTRAIL_PORT ' \
+ drain_flags,
'Create a Papertrail Log Drain'
'Create a Papertrail Log Drain. By default, App, Database, ' \
+ 'Ephemeral Session, and Proxy logs will be sent ' \
+ 'to your chosen destination.'
option :host, type: :string
option :port, type: :string
drain_options
Expand All @@ -145,7 +156,9 @@ def self.drain_options
'--host SYSLOG_HOST --port SYSLOG_PORT ' \
'[--token TOKEN] ' \
+ drain_flags,
'Create a Papertrail Log Drain'
'Create a Syslog Log Drain. By default, App, Database, ' \
+ 'Ephemeral Session, and Proxy logs will be sent ' \
+ 'to your chosen destination.'
option :host, type: :string
option :port, type: :string
option :token, type: :string
Expand Down