Skip to content
share library_books

Store logs in AWS Elasticsearch Service

Output Plugin: Amazon Elasticsearch Service

Writes Logagent output to Amazon Elasticsearch Service (using AWS signed HTTP headers).

Configuration

input: 
  stdin: true
  files: 
    - /var/log/myapp.log

output:
  aws-es: 
    module: output-aws-elasticsearch
    url: https://my-url.es.amazonaws.com
    index: mylogs
    type: myLogType
    # use configuration file, generated by AWS Elasticsearch
    awsConfigFile: ./aws_config.json
    # Elasticsearch client logging options
    log:
      - type: 'stdio'
        # empty array to suppress ES node client logs
        levels: []
        # or configure log level individually 
        # levels:
        #   - 'error' 
        #   - 'warning'
        #   - 'info'

Start logagent

logagent --config output-file.yaml