pm2-logger-elasticsearch
v3.0.7
Published
Send PM2 logs to Elasticsearch
Downloads
4
Maintainers
Readme
pm2-logger-elasticsearch
Module that sends logs of processes controlled by PM2 to Elasticsearch/Opensearch 📒🔍
Install
pm2 install pm2-logger-elasticsearch
Configuration
Set options with the command
pm2 set pm2-logger-elasticsearch:<option> <value>
PM2 will automatically restart the module after changing an option.
Options
| option | | default |
| ------ | --------- | ------- |
| elasticUrl | URL of Elasticsearch/Opensearch API | http://localhost:9200
|
| insecure | allow https connections to servers with invalid certificate | false
|
| index | Elasticsearch/Opensearch 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