monitode
v2.6.8
Published
resource monitor for nodejs
Downloads
30
Maintainers
Readme
monitode
Resource monitor for nodejs using a full stack of MEAN.
Installation
Install through NPM
npm install monitode
or
git clone git://github.com/hex7c0/monitode.git
API
inside nodejs project
var monitode = require('monitode')();
inside expressjs project
var monitode = require('monitode');
var app = require('express')();
app.use(monitode({
password : 'psw'
}));
inside expressjs project with logger-request
var monitode = require('monitode');
var app = require('express')();
var logger = require('logger-request');
var file = __dirname + '/monitode.log'
app.use(logger({
filename : file,
}));
app.use(monitor({
log : file,
}));
Monidote informations are stored inside GLOBAL Object. One istance for environment.
GLOBAL.monitode;
monitode(options)
options
output
- Boolean If enabled, show output to shell console (default "false")os
- Boolean If enabled, show os (netstat, iostat) statistics to web console/database/email (default "false") NOT FOR WINtickle
- Boolean If enabled, usingtickle
inside dynamic datas (default "disabled")app
- Object If enabled, using Express object forexpress-sitemap
inside static datas (default "disabled")http
- Object Setting up a web console usingbasic-authentication
enabled
- Boolean If disabled, don't run web console (default "enabled")port
- Integer Which port accept connection of web console (default "30000")user
- String User for web basic access authentication (default "admin")password
- String Password for web basic access authentication (default "password")agent
- String Browser User Agent for web authentication (default "all accepted")realm
- String Realm for web authentication (default "Monitode")file
- String Path of htpasswd file (default "disabled")hash
- String Type of hash inside your htpasswd file (default "md5")dir
- String Absolute path of web files directory (default "/public")
related to https://github.com/hex7c0/basic-authentication
https
- Object Setting up a web console over TLS/SSL usingbasic-authentication
key
- String Path to TLS/SSL key (default "disabled")cert
- String Path to TLS/SSL certificate (default "disabled")port
- Integer Which port accept connection of web console over TLS/SSL (default "30003")user
- String User for web basic access authentication over TLS/SSL (default "admin")password
- String Password for web basic access authentication over TLS/SSL (default "password")agent
- String Browser User Agent for web authentication over TLS/SSL (default "all accepted")realm
- String Realm for web authentication over TLS/SSL (default "Monitode")file
- String Path of htpasswd file (default "disabled")hash
- String Type of hash inside your htpasswd file (default "md5")dir
- String Absolute path of web files directory (default "/public")
related to https://github.com/hex7c0/basic-authentication
logger
- Object Setting up a permanent file which save your storylog
- String Path to log file, usinglogger-request
(default "disabled") Parsing information stored inside log, and show it to web console or file/databasefile
- String Path to file (default "disabled") Save stats at regular intervals to filetimeout
- Float Timeout (second) for file write (default "5")
related to https://github.com/hex7c0/logger-request
db
- Object Setting up a connectiont to database which save your storymongo
- String URI for MongoDb connection (default "disabled") Save stats at regular intervals to databasecouch
- String URI for CouchDb connection (default "disabled") Save stats at regular intervals to databasedatabase
- String Name of your database (default "monitode")timeout
- Float Timeout (second) for database query (default "20")
related to https://github.com/mongodb/node-mongodb-native and https://github.com/dscape/nano
mail
- Object Setting up SMTPprovider
- String Checknodemailer
for available email provider (default "disabled")user
- String User for email authentication (default "admin")password
- String Password for email authentication (default "password")to
- Array Write here your destination emails (default "empty")subject
- String Email subject (default "password")timeout
- Float Timeout (second) for email send (default "60")status
- Object Setting up a check of status of any number of websites and save status to fileenabled
- Boolean If disabled, don't run check status (default "disabled")sites
- Array Write here your list of checking websites (default "empty")port
- Array Write here your list of websites port (default "empty")method
- String A string specifying the HTTP request method (default "GET")agent
- String User Agent for sending request (default "monitode crawl")file
- String Where save information of connection (default "status")timeout
- Float Timeout (second) for email send (default "120")
Examples
Take a look at my examples
Or look at pdf file