Puppet Class: zabbix::resources::agent

Defined in:
manifests/resources/agent.pp

Summary

This will create resources into puppetdb for automatically configuring agent into zabbix front-end.

Overview

Parameters:

  • hostname (Any) (defaults to: undef)

    Hostname of the machine

  • ipaddress (Any) (defaults to: undef)

    The IP address of the machine running zabbix agent.

  • use_ip (Any) (defaults to: undef)

    Use ipadress instead of dns to connect.

  • port (Any) (defaults to: undef)

    The port that the zabbix agent is listening on.

  • groups (Array[String[1]]) (defaults to: undef)

    An array of groups the host belongs to.

  • group_create (Any) (defaults to: undef)

    Whether to create hostgroup if missing.

  • templates (Any) (defaults to: undef)

    List of templates which should be attached to this host.

  • macros (Any) (defaults to: undef)

    Array of hashes (macros) which should be attached to this host.

  • proxy (Any) (defaults to: undef)

    Whether it is monitored by an proxy or not.

  • interfacetype (Any) (defaults to: 1)

    Internally used identifier for the host interface.

  • interfacedetails (Variant[Array, Hash]) (defaults to: [])

    Hash with interface details for SNMP when interface type is 2.

  • tls_connect (Optional[Enum['unencrypted','psk','cert']]) (defaults to: undef)

    How the server must connect to the agent

  • tls_accept (Optional[Enum['unencrypted','psk','cert']]) (defaults to: undef)

    How the agent can connect to the server

  • tls_issuer (Optional[String[1]]) (defaults to: undef)

    Issuer of the certificate that is allowed to talk with the serve

  • tls_subject (Optional[String[1]]) (defaults to: undef)

    Subject of the certificate that is allowed to talk with the server



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'manifests/resources/agent.pp', line 17

class zabbix::resources::agent (
  $hostname                           = undef,
  $ipaddress                          = undef,
  $use_ip                             = undef,
  $port                               = undef,
  Array[String[1]] $groups            = undef,
  $group_create                       = undef,
  $templates                          = undef,
  $macros                             = undef,
  $proxy                              = undef,
  $interfacetype                      = 1,
  Variant[Array, Hash] $interfacedetails = [],
  Optional[Enum['unencrypted','psk','cert']] $tls_connect = undef,
  Optional[Enum['unencrypted','psk','cert']] $tls_accept  = undef,
  Optional[String[1]] $tls_issuer                         = undef,
  Optional[String[1]] $tls_subject                        = undef,
) {
  @@zabbix_host { $hostname:
    ipaddress        => $ipaddress,
    use_ip           => $use_ip,
    port             => $port,
    groups           => $groups,
    group_create     => $group_create,
    templates        => $templates,
    macros           => $macros,
    proxy            => $proxy,
    interfacetype    => $interfacetype,
    interfacedetails => $interfacedetails,
    tls_connect      => $tls_connect,
    tls_accept       => $tls_accept,
    tls_issuer       => $tls_issuer,
    tls_subject      => $tls_subject,
  }
}