-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
52 lines (44 loc) · 1.21 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var pmx = require('pmx');
var clientFactory = require('./lib/clientFactory');
var stats = require('./lib/stats');
var actions = require('./lib/actions');
pmx.initModule({
pid: pmx.resolvePidPaths(['/var/run/docker.pid']),
widget: {
type: 'generic',
logo: 'https://raw.githubusercontent.com/docker/docker/master/docs/static_files/docker-logo-compressed.png',
// 0 = main element
// 1 = secondary
// 2 = main border
// 3 = secondary border
theme: ['#22B8EB', '#134A6A', 'white', 'white'],
el: {
probes: true,
actions: true
},
block: {
actions: true,
issues: true,
cpu: false,
mem: false,
meta: false,
main_probes: [
'Docker Version',
'Docker API Version',
'Container Name',
'Container Status',
'Container CPU Usage',
'Container Memory Usage',
'Container Network eth0 input',
'Container Network eth0 output'
]
}
// Status
// Green / Yellow / Red
}
}, function (err, conf) {
var refresh_rate = process.env.PM2_DOCKER_REFRESH_RATE || conf.refresh_rate;
var client = clientFactory.build(conf);
stats.init(client, refresh_rate);
actions.init(client);
});