Skip to content

Commit

Permalink
Create samples
Browse files Browse the repository at this point in the history
  • Loading branch information
diogopms committed Feb 5, 2020
1 parent 0ee16fa commit cfd0d0e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.11.3
FROM alpine:3.8

LABEL maintainer="Diogo Serrano <info@diogoserrano.com>"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Monit - Docker/Kubernetes - UNIX Systems Management

Run Monit inside docker.
Run Monit inside docker ([Examples/Samples](./samples/README.md) )

[![Monit](https://mmonit.com/monit/img/logo.png)](https://mmonit.com/monit/)

Expand Down
27 changes: 27 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Need help?

## Normal mode

```sh
docker run -it \
-p 2812:2812 \
-v $(pwd)/monitrc:/etc/monitrc \
-e "SLACK_URL=<SLACK_URL>" \
-e "PUSH_OVER_TOKEN=<PUSH_OVER_TOKEN>" \
-e "PUSH_OVER_USER=<PUSH_OVER_USER>" \
-e "DEBUG=1" \
diogopms/monit-docker-kubernetes
```

## Debug

```sh
docker run -it \
-p 2812:2812 \
-v $(pwd)/monitrc:/etc/monitrc \
-e "SLACK_URL=<SLACK_URL>" \
-e "PUSH_OVER_TOKEN=<PUSH_OVER_TOKEN>" \
-e "PUSH_OVER_USER=<PUSH_OVER_USER>" \
-e "DEBUG=0" \
diogopms/monit-docker-kubernetes
```
17 changes: 17 additions & 0 deletions samples/monitrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set daemon 15
set log syslog
set httpd port 2812 and allow admin:monit

check host google.com with address google.com
every 1 cycles
if failed
port 443 protocol https
request /
status = 200
content = "google"
for 2 cycles
then exec "/bin/slack"
else if succeeded then exec "/bin/slack"
then exec "/bin/pushover"
else if succeeded then exec "/bin/pushover"
EOF

0 comments on commit cfd0d0e

Please sign in to comment.