Puppet Class: profile::openstack::eqiad1::metrics

Defined in:
modules/profile/manifests/openstack/eqiad1/metrics.pp

Overview

Parameters:

  • controller (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::eqiad1::keystone_api_fqdn'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'modules/profile/manifests/openstack/eqiad1/metrics.pp', line 1

class profile::openstack::eqiad1::metrics (
    Stdlib::Fqdn $controller = lookup('profile::openstack::eqiad1::keystone_api_fqdn'),
) {
    $this_ip = ipresolve($::fqdn, 4)
    $controller_ip = ipresolve($controller, 4)

    if $this_ip == $controller_ip {
        class { '::profile::prometheus::openstack_exporter':
            listen_port => 12345,
            cloud       => 'eqiad1',
        }
        contain '::profile::prometheus::openstack_exporter'
    } else {
        class { '::profile::prometheus::openstack_exporter':
            ensure => absent,
        }
    }
}