https://github.com/awslabs/aws-ec2rescue-linux

Amazon Web Services Elastic Compute Cloud (EC2) Rescue for Linux is a python-based tool that allows for the automatic diagnosis of common problems found on EC2 Linux instances.

https://github.com/awslabs/aws-ec2rescue-linux

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Amazon Web Services Elastic Compute Cloud (EC2) Rescue for Linux is a python-based tool that allows for the automatic diagnosis of common problems found on EC2 Linux instances.

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: apache-2.0
  • Language: Python
  • Default Branch: develop
  • Size: 8.1 MB
Statistics
  • Stars: 183
  • Watchers: 18
  • Forks: 55
  • Open Issues: 4
  • Releases: 10
Created almost 9 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License

README.md

Gitter chat Build Status

Amazon Elastic Compute Cloud (EC2) Rescue for Linux

What is it?

Amazon Elastic Compute Cloud (EC2) Rescue for Linux (ec2rl) is a framework for executing diagnostic and troubleshooting modules to analyze and remediate issues on Linux instances on AWS.

The Latest Version

Builds

Two builds of the latest version are provided: 1. The standard build only includes the EC2 Rescue for Linux code and requires the system meet the Prerequisites. 2. The bundled build includes a minimal copy of Python. It is intended for use on systems that do not meet the Python version prerequisite. Please see the FAQ for limitations associated with this build.

Downloads

| Build | Download | sha256 hash | GPG signature | |:---:|:---:|:---:|:---:| | Standard | Link | Link | Link | | Bundled | Link | Link | Link |

Our GPG public key can be downloaded from here.

Integrity Verification

File integrity can be verified in two ways. The examples below demonstrate verifying the standard build.

sha256 hash

Example: commandline [ec2-user@localhost ~]$ wget -q https://s3.amazonaws.com/ec2rescuelinux/ec2rl.tgz.sha256 [ec2-user@localhost ~]$ sha256sum -c ec2rl.tgz.sha256 ec2rl.tgz: OK

Detached GPG signature with GPG public key

Example: commandline [ec2-user@localhost ~]$ wget -q https://s3.amazonaws.com/ec2rescuelinux/ec2rl.tgz.sig [ec2-user@localhost ~]$ wget -q https://s3.amazonaws.com/ec2rescuelinux/ec2rl.key [ec2-user@localhost ~]$ gpg2 --import ec2rl.key [ec2-user@localhost ~]$ gpg2 --verify ec2rl.tgz.sig ... gpg: Good signature from "ec2autodiag@amazon.com <EC2 Rescue for Linux>" ...

Documentation

Available in docs/ subdirectory

Prerequisites

Python 2.7.9+ / 3.2+

Installation

No ec2rl specific installation required. Unpack the tarball and run the tool.

Usage

``` ec2rl: A framework for executing diagnostic and troubleshooting modules for analyzing issues on Linux instances on AWS.

USAGE: ec2rl [subcommand] [parameters]

COMMANDS: The following are the accepted subcommands: menu-config - use a text-based menu system to create a configuration file, configuration.cfg save-config - use the provided arguments to create a configuration file, configuration.cfg run - executes modules list - list available modules for platform upload - upload a tarball of a directory to S3 using either a presigned URL or an AWS-support provided URL help - print long help version - print version and license information version-check - check program version against the latest upstream version software-check - check for software required by modules that is not installed on the system and give install details bug-report - print version information relevant for inclusion in a bug report ```

Additional usage information is available in the usage guide in docs/USAGE.md and the help subcommand output.

Examples

ec2rl can be run with no options or special configuration. commandline ec2rl run

Some modules require sudo/root. Utilizing sudo is required in order to run these modules if executing ec2rl as a regular user. commandline sudo ec2rl run

Some modules require arguments for their usage. For example, most performance metric collection modules require times (number of samples to take) and period (length of sample).

commandline sudo ec2rl run --times=3 --period=5

Some modules may negatively impact system performance. These modules require the perfimpact argument to run.

commandline sudo ec2rl run --times=3 --period=5 --perfimpact=true

Some modules detect an issue and can also remediate the issue. These modules require the remediate argument to perform the remediation actions.

commandline sudo ec2rl run --remediate

Module Development

Modules are YAML files containing either a BASH or a Python script as well as the necessary metadata. Examples are available in mod.d and the module development guide found in docs/MODULE.md

FAQ

Why does EC2 Rescue For Linux not have the ability to run and upload in a single command?

It is recommended the resulting data be reviewed prior to being uploaded in order to ensure that no confidential information is included.

Why does EC2 Rescue For Linux require Python 2.7.9+? What about Python 2.7.x, x < 9?

SSL SNI (Server Name Indication) is required for the ec2rl's upload functionality, however, this wasn't added to Python 2.7 until 2.7.9. See PEP 466 for more information regarding the SSL changes in Python 2.7.9.

What are the limitations of the bundled build?

SSL and curses functionality may not work depending upon the versions of these libraries on the system. This impacts three subcommands: 1. The "menu-config" subcommand may not function. 2. The "upload" subcommand may not function. 3. The "version-check" subcommand may not function.

I'm trying to use the menu on a system running SUSE, but it does not work.

Python's curses module is normally built into its standard library, however, it is sometimes separated and included as a separate package. You will need to install it with the operating system's package manager. The package name in SUSE Linux Enterprise Server 12 is "python-curses".

Licensing

Please see the file called LICENSE.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Watch event: 4
  • Delete event: 2
  • Push event: 4
  • Pull request event: 4
  • Fork event: 2
  • Create event: 2
Last Year
  • Watch event: 4
  • Delete event: 2
  • Push event: 4
  • Pull request event: 4
  • Fork event: 2
  • Create event: 2

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 17
  • Total pull requests: 78
  • Average time to close issues: about 1 year
  • Average time to close pull requests: about 1 month
  • Total issue authors: 9
  • Total pull request authors: 11
  • Average comments per issue: 1.41
  • Average comments per pull request: 0.85
  • Merged pull requests: 70
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 0
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 months
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • gregbdunn (9)
  • ozgursc (1)
  • skyzyx (1)
  • ishantanu (1)
  • ketanbhut (1)
  • tipuq (1)
  • shivkumr (1)
  • Drudenhaus (1)
  • brycemosk (1)
  • azec-pdx (1)
Pull Request Authors
  • gregbdunn (46)
  • Drudenhaus (18)
  • dependabot[bot] (9)
  • pyeole (3)
  • ketanbhut (1)
  • robets (1)
  • thimslugga (1)
  • bluPhy (1)
  • brycemosk (1)
  • stivesso (1)
  • ghost (1)
Top Labels
Issue Labels
enhancement (11) bug (2) request for comment (2) low priority (2) question (1) help wanted (1)
Pull Request Labels
enhancement (17) dependencies (9) documentation (5) bug (4)

Dependencies

requirements_test.txt pypi
  • backports.shutil_get_terminal_size >=1.0.0 test
  • configparser ==4.0.2 test
  • contextlib2 >=0.5.4 test
  • coverage >=4.3.4 test
  • jinja2 ==2.11.3 test
  • markupsafe ==1.1.1 test
  • mock >=1.3.0 test
  • mock <4.0.0 test
  • moto ==0.4.31 test
  • requests >=2.9.0 test
  • responses >=0.5.1,<0.10.3 test
  • setuptools >=44,<45 test
  • setuptools-scm ==5.0.0 test
  • werkzeug ==1.0.1 test
  • wheel ==0.36.1 test
requirements.txt pypi
mod.d/environment.yaml conda