Skip to content

Commit f4d0c04

Browse files
committed
Extend documentation
1 parent af553f0 commit f4d0c04

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,52 @@ The server will answer with the following HTTP status codes:
1616
* 503 Internal Server error: If the system is in any other state
1717
* 500 Service Unavailable: If the HTTP server got an error while requesting the system state
1818
* 410 Gone: If it cannot connect to the systemd bus
19+
20+
## What is the purpose of this?
21+
22+
This is a "poor mans" monitoring solution.
23+
24+
It has been created to expose the overall system state to monitoring
25+
solutions such as [Pingdom](https://www.pingdom.com/) or
26+
[StatusCake](https://www.statuscake.com/).
27+
28+
## Docker image
29+
30+
There is a [Docker image at Docker
31+
Hub](https://hub.docker.com/r/arnested/systemd-state/).
32+
33+
## The status is not protected by HTTPS or authentication
34+
35+
You are right. It is exposed on HTTP without any authentication. I
36+
have chosen the same stance as Prometheus on this. See [Prometheus'
37+
FAQ](https://prometheus.io/docs/introduction/faq/#why-don-t-the-prometheus-server-components-support-tls-or-authentication-can-i-add-those).
38+
39+
Personally I have placed systemd-state behind
40+
[Træfik](https://traefik.io) with basic authentication.
41+
42+
## Example docker-compose configuration with traefik
43+
44+
Exposing the status on https://example.com/_systemd:
45+
46+
```yml
47+
version: "2"
48+
49+
services:
50+
systemd:
51+
image: arnested/systemd-state
52+
volumes:
53+
- '/run/systemd/private:/run/systemd/private:ro'
54+
restart: always
55+
labels:
56+
- 'traefik.frontend.auth.basic=foo:$$apr1$$WCYo2XY2$$7PDdo922necZuGkMAeTI70'
57+
- "traefik.port=80"
58+
- "traefik.enable=true"
59+
- "traefik.frontend.rule=Host:example.com;Path:/_systemd"
60+
networks:
61+
- web
62+
63+
networks:
64+
web:
65+
external:
66+
name: traefik_webgateway
67+
```

0 commit comments

Comments
 (0)