i Remote monitoring application use UPTIME – All things in moderation

Remote monitoring application use UPTIME

Hi guys!
In this article, we will learn about remote monitoring application. The tool I will introduce in this article is UPTIME.

What is uptime?
UPTIME is a remote monitoring application using Node.js, MongoDB, and Twitter Bootstrap.

– Monitor thousands of websites (powered by Node.js asynchronous programming)
– Tweak frequency of monitoring on a per-check basis, up to the second
– Check the presence of a pattern in the response body
– Receive notifications whenever a check goes down
+ On screen (powered by socket.io)
+ By email
+ On the console
– Record availability statistics for further reporting (powered by MongoDB)
– Detailed uptime reports with animated charts (powered by Flotr2)
– Monitor availability, responsiveness, average response time, and total uptime/downtime
– Get details about failed checks (HTTP error code, etc.)
– Group checks by tags and get reports by tag
– Familiar web interface (powered by Twitter Bootstrap 2.0)
– Complete API for integration with third-party monitoring services
– Powerful plugin system to ease extension and customization
– Easy installation and zero administration

Installing Uptime
To install from GitHub, clone the repository and install dependencies using npm:
Install NodeJS:

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_6.x | bash -
sudo apt-get install -y nodejs
sudo apt-get install npm

Download Uptime:

$ git clone git://github.com/fzaninotto/uptime.git
$ cd uptime
$ npm install

Install Mongodb:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
sudo echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-10gen

Configure MongoDB access for node-uptime

cd /opt/node-uptime
sudo nano config/default.yaml
    server:   localhost
    database: uptime
    user:     username
    password:    passsword
    connectionString: mongodb://localhost/uptime

Uptime uses node-config to allow YAML configuration and environment support. Here is the default configuration, taken from config/default.yaml:

cd /config
sudo nano default.yaml
url:        'http://localhost:8082'

  server:   localhost
  database: uptime
  user:     root 
  connectionString:       # alternative to setting server, database, user and password separately

  name:                   origin
  apiUrl:                 'http://localhost:8082/api' # must be accessible without a proxy
  pollingInterval:        10000      # ten seconds
  timeout:                5000       # five seconds
  userAgent:              NodeUptime/2.0 (https://github.com/fzaninotto/uptime)

  updateInterval:         60000      # one minute
  qosAggregationInterval: 600000     # ten minutes
  pingHistory:            8035200000 # three months

autoStartMonitor: true

  - ./plugins/console
  - ./plugins/patternMatcher
  - ./plugins/httpOptions
  # - ./plugins/email

Lastly, start the application with:

$ node app

You can run background Uptime with comand:

(setsid node app &)

By default, the web UI runs on port 8082, so just browse to:



Source: github.com

Leave a Reply