-
-
Notifications
You must be signed in to change notification settings - Fork 230
/
agent.pp
50 lines (50 loc) · 2.43 KB
/
agent.pp
1
2
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# @summary This will create resources into puppetdb for automatically configuring agent into zabbix front-end.
# @param hostname Hostname of the machine
# @param ipaddress The IP address of the machine running zabbix agent.
# @param use_ip Use ipadress instead of dns to connect.
# @param port The port that the zabbix agent is listening on.
# @param groups An array of groups the host belongs to.
# @param group_create Whether to create hostgroup if missing.
# @param templates List of templates which should be attached to this host.
# @param macros Array of hashes (macros) which should be attached to this host.
# @param proxy Whether it is monitored by an proxy or not.
# @param interfacetype Internally used identifier for the host interface.
# @param interfacedetails Hash with interface details for SNMP when interface type is 2.
# @param tls_connect How the server must connect to the agent
# @param tls_accept How the agent can connect to the server
# @param tls_issuer Issuer of the certificate that is allowed to talk with the serve
# @param tls_subject Subject of the certificate that is allowed to talk with the server
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,
}
}