Logging


Logging Nodejs apps with ELK: Elasticsearch, Logstash, and Kibana


Inside morgan, winston


https://www.youtube.com/watch?v=nnpcTyHZvS8

https://github.com/rekibnikufesin/nodejs-logging-elk


How to run

$ docker-compose up


**Possible need to update **

  "scripts": {
    "start": "node ./bin/www",
    "dev": "npm run migrate && npm run seed && nodemon --inspect=0.0.0.0:9229 ./bin/www",
    "migrate": "knex migrate:latest",
    "seed": "knex seed:run"
  },


Should works

http://localhost:3000/

F5 F5 F5 F5 F5


// Possible can kill app if will not receive data
http://localhost:3000/users


// Restart container with application
$ docker stop expressjs && docker start expressjs


// Check indices
http://localhost:9200/_cat/indices

Kibana
http://localhost:5601/


Kibana -> Index Patterns -> "logstash-2021.07.06-000001" -> Next


I don't want to user the Time Filter

Create index pattern


Kibana -> Discover