Puppet Class: zabbix::resources::web

Defined in:
manifests/resources/web.pp

Summary

This will load all zabbix related items from the puppet database and uses the zabbixapi gem to add/configure hosts via the zabbix-api

Overview

Parameters:

  • zabbix_url (String[1])

    Url on which zabbix is available.

  • zabbix_user (String[1])

    API username.

  • zabbix_pass (String[1])

    API password.

  • apache_use_ssl (Boolean)

    Whether to use ssl or not.



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
34
35
36
37
# File 'manifests/resources/web.pp', line 6

class zabbix::resources::web (
  String[1] $zabbix_url,
  String[1] $zabbix_user,
  String[1] $zabbix_pass,
  Boolean   $apache_use_ssl,
) {
  file { '/etc/zabbix/api.conf':
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0400',
    content => epp('zabbix/api.conf.epp',
      {
        zabbix_url     => $zabbix_url,
        zabbix_user    => $zabbix_user,
        zabbix_pass    => $zabbix_pass,
        apache_use_ssl => $apache_use_ssl,
      }
    ),
  }

  Zabbix_proxy <<| |>> {
    require        => [
      Service['zabbix-server'],
      Package['zabbixapi'],
      File['/etc/zabbix/api.conf'],
    ],
  }
  -> Zabbix_template <<| |>>
  -> Zabbix_host <<| |>>
  -> Zabbix_userparameters <<| |>>
}