Git Product home page Git Product logo

ansible-aws-cloudwatch-agent-config's Introduction

ansible-aws-cloudwatch-agent-config

Configure amazon-cloudwatch-agent to stream logfiles to Cloudwatch dashboard.

Requirements

Role Variable

 - name: aws_cwa_config_name
   desc: name of the configuration file

 - name: aws_cwa_logfiles
   desc: list of log configuration settings to be placed into a single config file:
   
   - name: file_path
     desc: Specifies the path of the log file to upload to CloudWatch Logs.
   
   - name: log_group_name
     desc: Specifies what to use as the log group name in CloudWatch Logs.
     
   - name: log_stream_name
     desc: Optional. Specifies what to use as the log stream name in CloudWatch Logs.
     default: {hostname}
  
   - name: timestamp_format
     desc: Optional. Specifies the timestamp format, using plaintext and special symbols that start with %. If you omit this field, the current time is used
     
   - name: timezone
     desc:  Optional. Specifies the time zone to use when putting timestamps on log events. The valid values are UTC and Local.
     default: Local
   
   - name: multi_line_start_pattern
     desc: Optional. Specifies the pattern for identifying the start of a log message. A log message is made of a line that matches the pattern and any subsequent lines that don't match the pattern. 
     
   - name: encoding
     desc: Optional. Specified the encoding of the log file so that it can be read correctly. If you specify an incorrect coding, there might be data loss because characters that can't be decoded are replaced with other characters.
     default: utf-8

defaults

- name: aws_cwa_dest_path
  desc: Destination path where amazon-cloudwatch-agent installed
  value: /opt/aws/amazon-cloudwatch-agent

- name: aws_cwa_logfile_path
  desc: Path where amazon-cloudwatch-agent write the log
  value: /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log

Dependencies

None

Example Playbook

- hosts: servers
  roles:
    - role: ansible-aws-cloudwatch-agent-config
      aws_cwa_config_name: "tsi-cwa-config"
      aws_cwa_logfiles:
         - file_path: "/var/log/syslog"
           log_group_name: "/tvlk/test/syslog.log"
           timestamp_format: "%b %d %H:%M:%S"
           timezone: "UTC"

ansible-aws-cloudwatch-agent-config's People

Contributors

hieronym avatar

Watchers

 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.