@worawut/pm2-elasticsearch-logger

1.0.7 • Public • Published

pm2-elasticsearch-logger

npm version dependencies Status Build Status XO code style License

Module that sends logs of processes controlled by PM2 to Elasticsearch 📒🔍 fork form https://github.com/hobbyquaker/pm2-elasticsearch-logger

Install

pm2 install @worawut/pm2-elasticsearch-logger

Configuration

Set options with the command

pm2 set pm2-elasticsearch-logger:<option> <value>

PM2 will automatically restart the module after changing an option.

Options

option default
elasticUrl URL of Elasticsearch API http://localhost:9200
insecure allow https connections to servers with invalid certificate false
index Elasticsearch index to use pm2
type Document type to use pm2
host host attribute of the document os.hostname()
apiKey api key for access to your elasticsearch

Todo, Ideas

  • Configurable document attributes
  • Create mapping for @timestamp only if neccessary, control by config option

Contributing

Pull Requests welcome!

License

MIT (c) 2019 Sebastian Raff

Readme

Keywords

Package Sidebar

Install

npm i @worawut/pm2-elasticsearch-logger

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

7.35 kB

Total Files

5

Last publish

Collaborators

  • worawut