Installs and configure a monit on various linux systems.
Ansible Collections
ansible-galaxy collection install bodsch.core
or
ansible-galaxy collection install --requirements-file collections.yml
- ArchLinux
- Debian based
- Debian 11 / 12
- Ubuntu 20.04 / 22.04
RedHat-based systems are no longer officially supported! May work, but does not have to.
monit_daemon:
cycle: 120
delay: 240
monit_log_destination: /var/log/monit.log
monit_lib_folder: /var/lib/monit
monit_state_file: "{{ monit_lib_folder }}/state"
monit_id_file: "{{ monit_lib_folder }}/id"
monit_services: []
monit_service_delete_unlisted: true
monit_eventqueue:
enabled: false
base_directory: /var/monit
slots: 100
monit_mail:
enabled: false
server_host: localhost
server_port: 25
monit_alert:
alert_addresses: []
mail_format: {}
monit_webinterface:
enabled: false
bind: 127.0.0.1
port: 2812
Configurations examples
monit_services:
- type: 'process'
name: sshd
target: '/run/sshd.pid'
start: '/etc/init.d/sshd start'
stop: '/etc/init.d/sshd stop'
restart: '/etc/init.d/sshd restart'
rules:
- if failed port 22 protocol ssh then restart
curl -u foo:bar "localhost:2812/_status?format=json&level=full"
Please read Contribution
The master
Branch is my Working Horse includes the "latest, hot shit" and can be complete broken!
If you want to use something stable, please use a Tagged Version!
- Bodo Schulz
FREE SOFTWARE, HELL YEAH!