Compare commits
3 commits
a28eb9596d
...
3af76ddeec
Author | SHA1 | Date | |
---|---|---|---|
|
3af76ddeec | ||
|
8cdc7138fe | ||
|
1eae4208e8 |
4 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,7 @@ COPY --from=build /usr/share/zoneinfo/UTC /etc/localtime
|
||||||
|
|
||||||
# Create directories
|
# Create directories
|
||||||
RUN install -dm 2750 -o root -g root /etc/monit.d
|
RUN install -dm 2750 -o root -g root /etc/monit.d
|
||||||
|
RUN install -dm 2750 -o root -g root /etc/monit.d/external/
|
||||||
RUN install -dm 2750 -o root -g root /var/lib/monit
|
RUN install -dm 2750 -o root -g root /var/lib/monit
|
||||||
|
|
||||||
# Install config
|
# Install config
|
||||||
|
|
1
monitrc
1
monitrc
|
@ -18,3 +18,4 @@ check program zeroconf
|
||||||
if status = 0 then unmonitor
|
if status = 0 then unmonitor
|
||||||
|
|
||||||
include /etc/monit.d/*.conf
|
include /etc/monit.d/*.conf
|
||||||
|
include /etc/monit.d/external/*.conf
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
set mmonit http://@@MMONIT@@/collector
|
set mmonit http://@@MMONIT@@/collector
|
||||||
set mailserver postfix port 25 using hostname @@HOSTNAME@@
|
set mailserver @@POSTFIX@@ port 25 using hostname @@HOSTNAME@@
|
||||||
|
|
||||||
set alert @@EMAIL@@
|
set alert @@EMAIL@@
|
||||||
|
|
||||||
|
@ -11,6 +11,6 @@ set mail-format {
|
||||||
|
|
||||||
set httpd port 2812
|
set httpd port 2812
|
||||||
allow localhost
|
allow localhost
|
||||||
allow 172.0.0.0/8
|
allow 10.13.12.0/24
|
||||||
allow "fd00:acab::/32"
|
allow "fd00:acab::/32"
|
||||||
allow @@CREDENTIALS@@
|
allow @@CREDENTIALS@@
|
||||||
|
|
|
@ -13,6 +13,7 @@ sed -re "s/@@EMAIL@@/${EMAIL}/" \
|
||||||
-e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \
|
-e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \
|
||||||
-e "s/@@MMONIT@@/${MMONIT}/" \
|
-e "s/@@MMONIT@@/${MMONIT}/" \
|
||||||
-e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \
|
-e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \
|
||||||
|
-e "s/@@POSTFIX@@/${POSTFIX:-postfix}/" \
|
||||||
/etc/zeroconf.conf > /etc/monit.d/zeroconf.conf
|
/etc/zeroconf.conf > /etc/monit.d/zeroconf.conf
|
||||||
|
|
||||||
monit -t
|
monit -t
|
||||||
|
|
Loading…
Reference in a new issue