Dmitriy Rabotjagov d0e8674f92 Basic implementation of masakari-monitors
With this change masakari-monitors will be installed on hosts
which are in group masakari-monitor (supposed to be nova compute hosts)

hostmonitor depends on pacemaker with corosync, which are implemented by
https://github.com/mit-scripts/ansible-pacemaker-corosync

Masakari api/engine config was simplified and unneccesary defaults
were removed from it.

Role now uses default ``systemd_service`` role for systemctl configuration

Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Implements: blueprint masakari-ansible-plugin
Change-Id: I334877c0111a45d3f3a74e7f56931786f4301713
2018-11-06 19:46:53 +02:00

63 lines
2.2 KiB
Django/Jinja

# Define the monitoring processes as follows:
# process_name: [Name of the process as it in 'ps -ef'.]
# start_command: [Start command of the process.]
# pre_start_command: [Command which is executed before start_command.]
# post_start_command: [Command which is executed after start_command.]
# restart_command: [Restart command of the process.]
# pre_restart_command: [Command which is executed before restart_command.]
# post_restart_command: [Command which is executed after restart_command.]
# run_as_root: [Bool value whether to execute commands as root authority.]
#
# These definitions need to be set according to the environment to use.
# Sample of definitions is shown below.
-
# libvirt-bin
process_name: /usr/sbin/libvirtd
start_command: systemctl start libvirt-bin
pre_start_command:
post_start_command:
restart_command: systemctl restart libvirt-bin
pre_restart_command:
post_restart_command:
run_as_root: True
-
# nova-compute
process_name: {{ (ansible_local.openstack_ansible.nova.install_method == "source") | ternary("/openstack/venvs/nova-{{ nova_venv_tag }}/bin/nova-compute", "/usr/bin") }}
start_command: systemctl start nova-compute
pre_start_command:
post_start_command:
restart_command: systemctl restart nova-compute
pre_restart_command:
post_restart_command:
run_as_root: True
-
# instancemonitor
process_name: {{ masakari_bin }}/masakari-instancemonitor
start_command: systemctl start masakari-instancemonitor
pre_start_command:
post_start_command:
restart_command: systemctl restart masakari-instancemonitor
pre_restart_command:
post_restart_command:
run_as_root: True
-
# hostmonitor
process_name: {{ masakari_bin }}/masakari-hostmonitor
start_command: systemctl start masakari-hostmonitor
pre_start_command:
post_start_command:
restart_command: systemctl restart masakari-hostmonitor
pre_restart_command:
post_restart_command:
run_as_root: True
-
# sshd
process_name: /usr/sbin/sshd
start_command: systemctl start ssh
pre_start_command:
post_start_command:
restart_command: systemctl restart ssh
pre_restart_command:
post_restart_command:
run_as_root: True