blob: 807c1f7899aaa766cc0b160f53c20d779b55cfbf (
plain)
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
|
# Monitorcito
A tiny monitor that gives you the status of a handful of systemd services.
## Configuration
This project uses environment variables to change configuration.
* `MONITORCITO_SERVICES`: A comma separated list of services. Required.
* `MONITORCITO_PORT`: A comma separated list of services. Defaults to 1991.
Set `NODE_DEBUG=monitorcito` if you want to log any output. Otherwise it will
be silent.
## How to run
Set the appropriate environment variables and run `bin/monitorcito`.
## The Frontend
Monitorcito includes a public directory, this is a frontend that queries
the service and refreshes every 5 seconds. The service assumes the API
is running in `/api`.
Here's an example of how to set it up with nginx.
```
upstream monitorcito {
server localhost:1991;
keepalive 64;
}
server {
listen 80;
root /home/deploy/src/monitorcito/public;
index index.html;
server_name monitor.unlimited.pizza;
location /api {
proxy_redirect off;
proxy_pass http://monitorcito;
}
}
```
|