1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:15 +02:00
dockerfiles/monit/README.md
2022-01-21 11:59:53 +08:00

56 lines
1005 B
Markdown

monit
=====
![](https://badge.imagelayers.io/vimagick/monit:latest.svg)
[Monit][1] is a utility for managing and monitoring processes, programs, files,
directories and filesystems on a Unix system.
## directory tree
```
~/fig/monit/
├── docker-compose.yml
└── data/
├── conf.d/
│   ├── network.cfg
│   ├── setting.cfg
│   └── system.cfg
└── monitrc
```
> Make sure config file endswith `.cfg`.
## docker-compose.yml
```yaml
version: "3.8"
services:
monit:
image: vimagick/monit
volumes:
- ./data:/etc/monit
pid: host
net: host
restart: unless-stopped
```
> The control file `/etc/monit/monitrc` must have permissions no more than
> `-rwx------ (0700)`
## Server Setup
```bash
$ cd ~/fig/monit/
$ docker-compose up -d
$ docker exec monit_monit_1 monit status
```
## Client Setup
```bash
$ firefox http://admin:monit@server:2812
```
[1]: https://www.mmonit.com/monit/documentation/monit.html