1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00
dockerfiles/monit/README.md

56 lines
1005 B
Markdown
Raw Normal View History

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