Giter Site home page Giter Site logo

fikrimuhal / ecs-logs-collector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws/amazon-ecs-logs-collector

0.0 2.0 0.0 28 KB

The script will be used to collect general os logs as well as Docker and ecs-agent logs, it also support to enable debug mode for docker and ecs-agent in Amazon Linux.

License: Apache License 2.0

Shell 100.00%

ecs-logs-collector's Introduction

ECS Logs Collector

This project was created to collect Amazon ECS log files and OS logs for troubleshooting Amazon ECS customer support cases.

The following functions are supported:

  • Supported OS: Amazon Linux, Red Hat Enterprise Linux 7, Debian 8
  • Collect normal OS logs
  • Collect normal OS settings
  • Collect Docker logs
  • Collect Amazon ECS agent Logs
  • Enable debug mode for Docker and the Amazon ECS agent (only available for Amazon Linux)
  • Create a tar zip file in the same folder as the script

Usage

Run this project as the root user:

# wget https://raw.githubusercontent.com/awslabs/ecs-logs-collector/master/ecs-logs-collector.sh
# bash ecs-logs-collector.sh

##Example output The project can be used in normal or debug mode (for Amazon Linux only).

Example output in normal mode

The following output shows this project running in normal mode:

# bash ecs-logs-collector.sh
Trying to check if it's running as root... ok
Trying to check disk space usage... ok
Trying to collect system info... Amazon Linux AMI release 2016.03
ok
Trying to collect common system logs... ok
Trying to get mountpoints and volumes info... ok
Trying to get selinux status... ok
Trying to get iptables list... ok
Trying to get packages list... ok
Trying to get system active services list... ok
Trying to get docker info message... ok
Trying to collect ecs logs... ok
Trying to get docker inspect outputs of the containers... ok
Trying to collect docker logs... Trying to pack gathered info... ok

Example output in debug mode

The following output shows this project running with debug mode. Note that running in debug mode restarts Docker and the Amazon ECS agent.

# bash ecs-logs-collector.sh --mode=debug
Trying to check if it's running as root... ok
Trying to check disk space usage... ok
Trying to collect system info... Amazon Linux AMI release 2016.03
ok
Trying to collect common system logs... ok
Trying to get mountpoints and volumes info... ok
Trying to get selinux status... ok
Trying to get iptables list... ok
Trying to get packages list... ok
Trying to get system active services list... ok
Trying to get docker info message... ok
Trying to collect ecs logs... ok
Trying to get docker inspect outputs of the containers... ok
Trying to collect docker logs... Trying to enable docker de[  OK  ]... Trying to restart Docker daemon to enable debug mode... Stopping docker:
Starting docker:	.                                  [  OK  ]
ok
Trying to enable ecs agent debug mode... Trying to restart ECS agent to enable debug mode... stop: Unknown instance:
ecs start/running, process 13188
ok
Trying to pack gathered info... ok

Contributing

Please create a new GitHub issue for any feature requests, bugs, or documentation improvements.

Where possible, submit a pull request for the change.

License

Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

http://aws.amazon.com/apache2.0/

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ecs-logs-collector's People

Contributors

slacksec avatar witsoej avatar ovalba avatar

Watchers

James Cloos avatar Ilgaz Şumnulu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.