Nginx Log Monitoring

Nguyen Huu Su 2021-12-7 Product Less than 1 minute

# Nginx Log Monitoring

# Requirements

  • Nodejs 8.10x

# Getting Started

  • Clone project and run test
$ git clone https://git_url_clone <project_dir>
$ cd <project_dir>
$ npm install
$ npm run test
1
2
3
4
  • Copy sh/env.example.sh to sh/env.sh.
$ cd <project_dir>
$ cp env.example.sh env.sh
1
2
  • Edit file env.sh by yourself and run command below to initialization environment variable.
Name Description
NGINX_LOG_FILE Path to nginx log file
MYSQL_LOG_FILE Path to mysql log file
ENV env name. ex: stg, pro, dev,...
MANAGERS Chatwork IDs. ex: [To:xxx]
CW_ROOM_ID Chatwork room ID
CW_API_URL Chatwork API URL
CW_BOT_TOKEN Chatwork API KEY
$ cd <project_dir>
$ source sh/env.sh
1
2
  • Run project
$ cd <project_dir>
$ node src/index.js
1
2
Last update: December 7, 2021 18:58