smartagent-logger
TypeScript icon, indicating that this package has built-in type declarations

2.0.7 • Public • Published

requirements

add this code to your custom field in serverless

custom:
    ...
    stage: ${opt:stage, self:provider.stage}
    esLogs:
        endpoint: search-smartagent-monitoring-logs-xjyu2rqhj3wecill7g7tfwhx7e.eu-west-2.es.amazonaws.com
        index: logs-${self:custom.stage}
        filterPattern: '[timestamp=*Z, request_id="*-*", level=ERROR || level=WARN || level=INFO || level=DEBUG , event ]'
        tags:
            stage: ${self:custom.stage}

and this to your plugin list:

    - serverless-es-logs

add an IAM Policy to your stack to allow the ES Logs function to post logs to ES in a seperate account

provider:
    name: aws
    runtime: nodejs12.x
    region: eu-west-2
    stage: ${opt:stage, 'dev'}
    iamRoleStatements:
    - Effect: 'Allow'
      Action:
        - es:ESHttpPost
      Resource: arn:aws:es:eu-west-2:071616078950:domain/smartagent-monitoring-logs/*

Readme

Keywords

none

Package Sidebar

Install

npm i smartagent-logger

Weekly Downloads

1

Version

2.0.7

License

ISC

Unpacked Size

19.9 kB

Total Files

24

Last publish

Collaborators

  • mission_labs