1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/monit/README.md

56 lines
1005 B
Markdown
Raw Normal View History

2015-07-02 12:59:58 +02:00
monit
=====
2015-07-27 16:17:09 +02:00
![](https://badge.imagelayers.io/vimagick/monit:latest.svg)
2015-07-02 14:00:29 +02:00
2016-10-30 08:39:47 +02:00
[Monit][1] is a utility for managing and monitoring processes, programs, files,
2015-07-02 12:59:58 +02:00
directories and filesystems on a Unix system.
2015-07-02 14:00:29 +02:00
## directory tree
```
~/fig/monit/
├── docker-compose.yml
2016-10-30 08:39:47 +02:00
└── data/
2015-07-02 14:00:29 +02:00
├── conf.d/
│   ├── network.cfg
│   ├── setting.cfg
│   └── system.cfg
└── monitrc
```
2015-07-05 05:04:02 +02:00
> Make sure config file endswith `.cfg`.
2015-07-02 12:59:58 +02:00
## docker-compose.yml
2016-10-30 08:39:47 +02:00
```yaml
2022-01-21 05:59:53 +02:00
version: "3.8"
services:
monit:
image: vimagick/monit
volumes:
- ./data:/etc/monit
pid: host
net: host
restart: unless-stopped
2015-07-02 12:59:58 +02:00
```
2015-07-02 13:27:37 +02:00
> The control file `/etc/monit/monitrc` must have permissions no more than
> `-rwx------ (0700)`
2016-10-30 08:39:47 +02:00
## Server Setup
2015-07-02 12:59:58 +02:00
2016-10-30 08:39:47 +02:00
```bash
2015-07-02 12:59:58 +02:00
$ cd ~/fig/monit/
$ docker-compose up -d
2015-07-02 15:39:10 +02:00
$ docker exec monit_monit_1 monit status
2015-07-02 12:59:58 +02:00
```
2016-10-30 08:39:47 +02:00
## Client Setup
2015-07-02 12:59:58 +02:00
2016-10-30 08:39:47 +02:00
```bash
2015-07-02 14:53:28 +02:00
$ firefox http://admin:monit@server:2812
2015-07-02 12:59:58 +02:00
```
2016-10-30 08:39:47 +02:00
[1]: https://www.mmonit.com/monit/documentation/monit.html