Puppet Class: openstack::nova::api::monitor

Defined in:
modules/openstack/manifests/nova/api/monitor.pp

Overview

This is the api service for Openstack Nova. It provides a REST api that Wikitech and Horizon use to manage VMs.

Parameters:

  • active (Any)
  • critical (Any) (defaults to: false)
  • contact_groups (Any) (defaults to: 'wmcs-bots,admins')


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'modules/openstack/manifests/nova/api/monitor.pp', line 3

class openstack::nova::api::monitor(
    $active,
    $critical=false,
    $contact_groups='wmcs-bots,admins',
    ) {

    # monitoring::service doesn't take a bool
    if $active {
        $ensure = 'present'
    }
    else {
        $ensure = 'absent'
    }

    nrpe::monitor_service { 'check_nova_api_process':
        ensure        => $ensure,
        critical      => $critical,
        description   => 'nova-api process',
        nrpe_command  => "/usr/lib/nagios/plugins/check_procs -c 1: --ereg-argument-array '^/usr/bin/python /usr/bin/nova-api'",
        contact_group => $contact_groups,
    }

    monitoring::service { 'nova-api-http':
        ensure        => $ensure,
        critical      => $critical,
        description   => 'nova-api http',
        check_command => 'check_http_on_port!8774',
        contact_group => $contact_groups,
        notes_url     => 'https://wikitech.wikimedia.org/wiki/Portal:Cloud_VPS/Admin/Troubleshooting',
    }
}