# Install and configure for Ubuntu

This section describes how to install and configure Masakari-monitors for Ubuntu 18.04 (bionic).

## Prerequisites

Before you install and configure Masakari-monitors, you must verify installations below:

1. To install and confirm Masakari installation:

   - Masakari - is an OpenStack project designed to ensure high availability of instances and compute processes running on hosts. For detailed installation steps please refer to masakari documentation

   - Verify Masakari installation by verifying status of services:

         $ systemctl list-unit-files devstack@masakari-*.service

         UNIT FILE                                              STATE
         devstack@masakari-api.service                          enabled
         devstack@masakari-engine.service                       enabled

         2 unit files listed.

2. IPMI support is needed for `masakari-hostmonitor service` which is a remote hardware health monitoring and management system that defines interfaces for use in monitoring the physical health of servers.

   1. Check if IPMI Hardware support is enabled:

          $ stonith -L | grep external/ipmi
          external/ipmi

   2. Install ipmitool and verify:

      - IPMItool

          utility is an open-source command-line interface (CLI) for controlling IPMI (Intelligent Platform Management Interface) enabled devices.

            $ sudo apt-get -y install ipmitool
            $ sudo ipmitool -V

        Note

        Check for IPMI Hardware support with the command: `sudo ipmitool lan print 1`.

        If IPMI configuration found, then proceed to steps below.

   3. Install crm and verify:

      - crm is a Pacemaker command line interface for configuration and management.

            $ sudo apt-get -y install crmsh
            $ sudo crm --version

   4. Install pacemaker and corosync and verify: Refer Ubuntu Manpage for control and configure pacemaker and corosync.

      - corosync - It is a Cluster Engine and a Group Communication System with additional features for implementing high availability within applications.

            $ sudo apt-get -y install corosync
            $ sudo corosync -v

      - pacemaker - It is an open-source high availability resource manager software used on computer clusters.

            $ sudo apt-get -y install pacemaker
            $ sudo crmadmin --version

      - Edit the `/etc/corosync/corosync.conf` file as described below:

        - Configure `bindnetaddr` value as network address of the interface to bind:

              totem {
                  ...
                      interface {
                      ...
                          bindnetaddr: BINDNETADDR

              Replace ``BINDNETADDR`` with network address used for mutual
              communication between hosts.

        - Add the service section at end of file:

              service {
                  name: pacemaker
                  ver: 0
                  use_mgmtd: yes
              }

      - Edit the `/etc/default/corosync` file as described below:

            # Start corosync at boot [yes|no]
            START=yes

      - Start corosync and pacemaker services:

            # systemctl start corosync.service
            # systemctl start pacemaker.service

   5. Install and confirm STONITH resource:

      - STONITH (Shoot The Other Node In The Head) is a Linux service for maintaining the integrity of nodes in a high-availability (HA) cluster. More description on how to create STONITH resource is here cluster resources

## Install and configure Masakari Monitors

Note

- Masakari-monitors can be installed on the ComputeNodes only.

1. Clone masakari-monitors using:

       # git clone https://opendev.org/openstack/masakari-monitors.git

2. Prepare masakari-monitors configuration files:

   1. Generate via tox: Go to ‘opt/stack/masakari-monitors’ and execute the command below, this will generate `masakarimonitors.conf.sample`, sample configuration file at `/opt/stack/masakari-monitors/etc/masakarimonitors/`

          # tox -egenconfig

   2. Or download them:

      # `masakarimonitors.conf.sample`

   3. Rename `masakarimonitors.conf.sample` to file to `masakarimonitors.conf`, and edit as described below:

      - In the `[api]` section, verify keys below for sending notifications:

            [api]
            ...
            auth_url = http://CONTROLLER/identity
            project_name = service
            project_domain_name = default
            username = masakari
            password = MASAKARI_PASS

        Replace `CONTROLLER` with the IP address or hostname of ControllerNode. And replace `MASAKARI_PASS` with the password you chose for the `masakari` user in the Identity service.

      - In the `[host]` section, configure about pacemaker:

            [host]
            ...
            corosync_multicast_interfaces = MULTICAST_INTERFACES
            corosync_multicast_ports = MULTICAST_PORTS

        - Replace `MULTICAST_INTERFACES` with the interface that corosync is using for mutual communication between hosts. You can find the interface from the value of `bindnetaddr` in /etc/corosync/corosync.conf. If there are multiple interfaces, specify them by comma-separated like ‘corosync_multicast_interfaces = enp0s3,enp0s8’.

        - Replace `MULTICAST_PORTS` with the `mcastport` described in /etc/corosync/corosync.conf. If there are multiple `mcastport`, specify them by comma-separated like ‘corosync_multicast_ports = 5405,5406’.

   4. Rename `process_list.yaml.sample`, sample configuration file at `/opt/stack/masakari-monitors/etc/masakarimonitors/`. Edit the file for the processes to be monitored.

   5. Create `masakarimonitors` directory in /etc/. Copy `masakarimonitors.conf` and `process_list.yaml` files to `/etc/masakarimonitors/`

          # cp -p etc/masakarimonitors/masakarimonitors.conf.sample /etc/masakarimonitors/masakarimonitors.conf
          # cp -p etc/masakarimonitors/process_list.yaml.sample /etc/masakarimonitors/process_list.yaml

3. To install masakari-monitors run setup.py from the directory masakari-monitors:

       # cd masakari-monitors
       # sudo python3 setup.py install

## Finalize installation

- Restart the masakari-monitors services:

      # masakari-hostmonitor
      # masakari-introspectiveinstancemonitor
      # masakari-processmonitor
      # masakari-instancemonitor

this page last updated: 2026-06-04 10:37:39

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug