pm2-elasticsearch-logger-with-ssl
v1.0.2
Published
Send PM2 logs to Elasticsearch
Readme
pm2-elasticsearch-logger
Module that sends logs of processes controlled by PM2 to Elasticsearch 📒🔍
Install
pm2 install pm2-elasticsearch-logger-with-ssl
Configuration
Set options with the command
pm2 set pm2-elasticsearch-logger-with-ssl:<option> <value>
PM2 will automatically restart the module after changing an option.
Options
| option | | default |
| ------ | --------- | ------- |
| elasticUrl | URL of Elasticsearch API | http://localhost:9200 or https://login:[email protected]: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() |
CA crt file location /etc/ssl/ mv ca.crt /etc/ssl/)
Configuring SSL, TLS, and HTTPS to secure Elasticsearch
(https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash)
Todo, Ideas
- Configurable document attributes
- Create mapping for
@timestamponly if neccessary, control by config option
Contributing
Pull Requests welcome!
License
MIT (c) 2019 Sebastian Raff
