mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:36 +02:00
add monit
This commit is contained in:
parent
a5fd9fefcd
commit
a98eb0ccd9
16
monit/Dockerfile
Normal file
16
monit/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Dockerfile for monit
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
MAINTAINER kev <noreply@datageek.info>
|
||||
|
||||
RUN apk add -U monit \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
COPY monit /etc/monit
|
||||
|
||||
VOLUME /etc/monit /var/lib/monit
|
||||
EXPOSE 2812
|
||||
|
||||
CMD ["monit", "-I", "-c", "/etc/monit/monitrc"]
|
31
monit/README.md
Normal file
31
monit/README.md
Normal file
@ -0,0 +1,31 @@
|
||||
monit
|
||||
=====
|
||||
|
||||
`Monit` is a utility for managing and monitoring processes, programs, files,
|
||||
directories and filesystems on a Unix system.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```
|
||||
monit:
|
||||
image: vimagick/monit
|
||||
volumes:
|
||||
- monit:/etc/monit
|
||||
pid: host
|
||||
net: host
|
||||
restart: always
|
||||
```
|
||||
|
||||
## server
|
||||
|
||||
```
|
||||
$ cd ~/fig/monit/
|
||||
$ docker-compose up -d
|
||||
$ docker exec monit_monit_1 monit status
|
||||
```
|
||||
|
||||
## client
|
||||
|
||||
```
|
||||
$ firefox http://server:2812
|
||||
```
|
7
monit/docker-compose.yml
Normal file
7
monit/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
monit:
|
||||
image: vimagick/monit
|
||||
volumes:
|
||||
- monit:/etc/monit
|
||||
pid: host
|
||||
net: host
|
||||
restart: always
|
3
monit/monit/conf.d/settings.cfg
Normal file
3
monit/monit/conf.d/settings.cfg
Normal file
@ -0,0 +1,3 @@
|
||||
set httpd port 2812 and
|
||||
use address 0.0.0.0/0
|
||||
allow admin:monit
|
10
monit/monit/monitrc
Normal file
10
monit/monit/monitrc
Normal file
@ -0,0 +1,10 @@
|
||||
###############################################################################
|
||||
## Monit control file
|
||||
###############################################################################
|
||||
|
||||
set daemon 30
|
||||
set logfile /dev/stdout
|
||||
set pidfile /var/run/monit.pid
|
||||
set idfile /var/lib/monit/monit.id
|
||||
set statefile /var/lib/monit/monit.state
|
||||
include /etc/monit/conf.d/*
|
Loading…
Reference in New Issue
Block a user