System log monitor

Source: Internet
Author: User


Server config:


Yum-y install gcc-c ++

Wget http://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz

Tar-zxvf node-v0.8.14.tar.gz-C/usr/src/

Cd/usr/src/node-v0.8.14/

./Configure & make install & echo OK



# Wget https://npmjs.org/install.sh & sh install. sh


Install log. io (including log server and log harvester)

# Npm config set unsafe-perm true; echo $?

# Npm install-g -- prefix =/usr/local log. io; echo $?


# Vim/root/. log. io/web_server.conf # start authentication


Exports. config = {

Host: '0. 0.0.0 ',

Port: 28778,



// Enable HTTP Basic Authentication

Auth :{

User: "admin ",

Pass: "1234"

},



/*

// Enable HTTPS/SSL

Ssl :{

Key: '/path/to/privatekey. Pem ',

Cert: '/path/to/certificate. Pem'

},

*/








# Start log. io

# Log. io-server start &

# Netstat-nputl | grep node

Tcp 0 0 0.0.0.0: 28777 0.0.0.0: * LISTEN 18901/node

Tcp 0 0 0.0.0.0: 28778 0.0.0.0: * LISTEN 18901/node




Client config:

Vim/root/. log. io/harvester. conf

Exports. config = {

NodeName: "nodeB", # nodename

LogStreams :{

Nginx_access: [# log name

"/Var/log/nginx/access. log", # dir

],

Nginx_error: [# log name

"/Var/log/nginx/error. log" # dir

    ]

},

Server :{

Host: '10. 10.0.2 ', # Server IP

Port: 28777 # Server default

  }

  

Access: server, x. x: 28778


Blog by: http://8824130.blog.51cto.com/8814130/1573421

This article is from the "linux network service building" blog!

System log monitor

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.