Class: Appsignal::CLI::Diagnose Private
- Defined in:
- lib/appsignal/cli/diagnose.rb,
lib/appsignal/cli/diagnose/paths.rb,
lib/appsignal/cli/diagnose/utils.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Command line tool to run diagnostics on your project.
This command line tool is useful when testing AppSignal on a system and validating the local configuration. It outputs useful information to debug issues and it checks if AppSignal agent is able to run on the machine’s architecture and communicate with the AppSignal servers.
This diagnostic tool outputs the following:
-
if AppSignal can run on the host system.
-
if the configuration is valid and active.
-
if the Push API key is present and valid (internet connection required).
-
if the required system paths exist and are writable.
-
outputs AppSignal version information.
-
outputs information about the host system and Ruby.
-
outputs last lines from the available log files.
## Exit codes
-
Exits with status code ‘0` if the diagnose command has finished.
-
Exits with status code ‘1` if the diagnose command failed to finished.
Defined Under Namespace
Modules: Data Classes: Paths, Utils
Constant Summary collapse
- DIAGNOSE_ENDPOINT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"https://appsignal.com/diag"
Class Method Summary collapse
- .run(options = {}) ⇒ void private
Methods included from Data
current_section, data, data_section, save
Class Method Details
.run(options = {}) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/appsignal/cli/diagnose.rb', line 79 def run( = {}) # Do not start AppSignal on `Appsignal.start` and run the extension # and agent in diagnose mode. ENV["_APPSIGNAL_DIAGNOSE"] = "true" self.coloring = .delete(:color) { true } $stdout.sync = true header print_empty_line library_information data[:installation] = fetch_installation_report print_installation_report print_empty_line host_information print_empty_line configure_appsignal() run_agent_diagnose_mode print_empty_line print_config_section print_empty_line check_api_key print_empty_line data[:process] = process_user paths_report = Paths.new data[:paths] = paths_report.report print_paths_section(paths_report) transmit_report_to_appsignal if send_report_to_appsignal?() end |