Skip to content

Send logs of processes controlled by PM2 to Elasticsearch πŸ“’πŸ”

License

Notifications You must be signed in to change notification settings

hobbyquaker/pm2-elasticsearch-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pm2-elasticsearch-logger

npm version dependencies Status Build Status XO code style License

Module that sends logs of processes controlled by PM2 to Elasticsearch πŸ“’πŸ”

Install

pm2 install 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()

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

About

Send logs of processes controlled by PM2 to Elasticsearch πŸ“’πŸ”

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published