1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-12 11:14:57 +02:00
dockerfiles/monit/README.md

54 lines
958 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
2015-07-02 12:59:58 +02:00
monit:
image: vimagick/monit
volumes:
2016-10-30 08:39:47 +02:00
- ./data:/etc/monit
2015-07-02 12:59:58 +02:00
pid: host
net: host
restart: always
```
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