Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/pm2-web.js"
}
]
}
102 changes: 40 additions & 62 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,102 +1,80 @@
// pm2-web configuration file
{

// Web server settings
"www": {
"host": "localhost",
"address": "0.0.0.0",
"port": 9000,

"authentication": {
// set to true to enable basic http auth
"enabled": false,

// basic http auth credentials
"username": "a_user_name",
"password": "a_password"
},

"ssl": {
// set this to true to listen over https
"enabled": false,

// if true, a http server will be started on www:port that upgrades all connections to https

"upgrade": true,

// the port the https server will listen on

"port": 9001,

// your SSL certificate details - see ./certs/generate_certificate.sh if you don't have one

"passphrase": "the certificate passphrase",
"key": "/path/to/key/file",
"certificate": "/path/to/certificate/file"
}
},

// Web socket settings

"ws": {

// Incoming log/exeption events arrive in real time and are batched before begin sent to
// the browser. This is how frequently they are sent to the UI in ms. If your processes
// log excessively, you may wish to increase this number.



"frequency": 500
},

// To monitor multiple hosts, add extra entries to this array
"pm2": [{
"host": "localhost",
"rpc": "~/.pm2/rpc.sock",
"events": "~/.pm2/pub.sock"

// To debug remote processes, run node-inspector on the remote host and add the port
// it's listnening on here:
//, inspector: 8080
}],

// How often to poll hosts for system usage data (in ms)

"pm2": [
{
"host": "localhost",
"rpc": "~/.pm2/rpc.sock",
"events": "~/.pm2/pub.sock"



}
],

"updateFrequency": 5000,

// If true, processes will be killed without notifying them first

"forceHardReload": false,

// Log settings

"logs": {

// The max number of log entries per process that will be shown in the browser

"max": 1000
},

// Settings for removing hosts that have gone away

"hostPurge": {

// How often to see if hosts have gone away (in ms)

"frequency": 10000,

// Hosts not having returned system data within this
// time period will be removed from display (in ms)


"cutoff": 60000
},

// Graph settings

"graph": {

// Max number of points to plot on the graph

"datapoints": 1000,

// Graph data will be compressed over time. Distribution is the % distribution going back in time.
// e.g. [40, 25, 10, 10, 5] means the last 24 hours will hold 40% of graph:datapoints, the 24
// hours prior to that will hold 25%, the 24 hours prior to that will hold 10% and so on. You
// may add as many entries to this array as you wish but they must add up to 100.




"distribution": [
40, 25, 10, 10, 5
40,
25,
10,
10,
5
]
},

"mdns": {
// Set this to true to start a Bonjour/ZeroConf/MDNS advert for pm2-web
// N.B. Linux and Windows need Avahi and Bonjour installed respectively for this to work


"enabled": false,

"name": "pm2"
}
}
}
102 changes: 102 additions & 0 deletions config.json.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@

{

// Web server settings
"www": {
"host": "localhost",
"address": "0.0.0.0",
"port": 9000,

"authentication": {
// set to true to enable basic http auth
"enabled": false,

// basic http auth credentials
"username": "a_user_name",
"password": "a_password"
},

"ssl": {
// set this to true to listen over https
"enabled": false,

// if true, a http server will be started on www:port that upgrades all connections to https
"upgrade": true,

// the port the https server will listen on
"port": 9001,

// your SSL certificate details - see ./certs/generate_certificate.sh if you don't have one
"passphrase": "the certificate passphrase",
"key": "/path/to/key/file",
"certificate": "/path/to/certificate/file"
}
},

// Web socket settings
"ws": {

// Incoming log/exeption events arrive in real time and are batched before begin sent to
// the browser. This is how frequently they are sent to the UI in ms. If your processes
// log excessively, you may wish to increase this number.
"frequency": 500
},

// To monitor multiple hosts, add extra entries to this array
"pm2": [{
"host": "localhost",
"rpc": "~/.pm2/rpc.sock",
"events": "~/.pm2/pub.sock"

// To debug remote processes, run node-inspector on the remote host and add the port
// it's listnening on here:
//, inspector: 8080
}],

// How often to poll hosts for system usage data (in ms)
"updateFrequency": 5000,

// If true, processes will be killed without notifying them first
"forceHardReload": false,

// Log settings
"logs": {

// The max number of log entries per process that will be shown in the browser
"max": 1000
},

// Settings for removing hosts that have gone away
"hostPurge": {

// How often to see if hosts have gone away (in ms)
"frequency": 10000,

// Hosts not having returned system data within this
// time period will be removed from display (in ms)
"cutoff": 60000
},

// Graph settings
"graph": {

// Max number of points to plot on the graph
"datapoints": 1000,

// Graph data will be compressed over time. Distribution is the % distribution going back in time.
// e.g. [40, 25, 10, 10, 5] means the last 24 hours will hold 40% of graph:datapoints, the 24
// hours prior to that will hold 25%, the 24 hours prior to that will hold 10% and so on. You
// may add as many entries to this array as you wish but they must add up to 100.
"distribution": [
40, 25, 10, 10, 5
]
},

"mdns": {
// Set this to true to start a Bonjour/ZeroConf/MDNS advert for pm2-web
// N.B. Linux and Windows need Avahi and Bonjour installed respectively for this to work
"enabled": false,

"name": "pm2"
}
}
Loading