Hacking SecurityLinux

Log.io Monitor Server Logs

Log.io Logs

Log.io Monitor Server Logs

 

Log.iomonitoring server logs in your browser Powered by node.js + socket.io  Harvesters watch log files for changes, send new log messages to the server via TCP, which broadcasts to web clients via socket.io.

 

Log.io uses a stateless TCP API to receive log messages, Writing a third party harvester is easy. Open a TCP connection to the server and begin writing properly formatted messages to the socket.

 

Install Log.io Server & Harvester :
  1. Install via npmnpm install -g log.io –user “ubuntu”
  2. Run serverlog.io-server
  3. Configure harvesternano ~/.log.io/harvester.conf
  4. Run harvesterlog.io-harvester
  5. Browse to http://localhost:28778

 

Configure Log.io:

cd .log.io
ls

You should see the three configuration files:

harvester.conf
log_server.conf
web_server.conf

nano harvester.conf

Change the file as shown below:

exports.config = {
  nodeName: "Webserver",
  logStreams: {
    apache: [
      "/var/log/apache2/access.log",
      "/var/log/apache2/error.log"
    ]

  },
  server: {
    host: '0.0.0.0',
    port: 28777
  }
}

Save and close the file when you are finished, then edit log_server.conf file. You can specify listening IP address in this file.

 

nano log_server.conf

Change the file as shown below

exports.config = {
  host: '0.0.0.0',
  port: 28777
}

 

nano web_server.conf

Change the file as shown below:

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'
  },
  */
  /*
  // Restrict access to websocket (socket.io)
  // Uses socket.io 'origins' syntax
  restrictSocket: '*:*',
  */
  /*
  // Restrict access to http server (express)
  restrictHTTP: [
    "192.168.29.39",
    "10.0.*"
  ]
  ]
  */
}

Save and close the file, when you are finished. Then start Log.io service by running the following command:

log.io-server &
log.io-harvester &

 

Access Log.io Web Interface:

Log.io server is now running and listening on port 28778, to access Log.io web interface

 

Log.io links

Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Close