-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.sample.toml
126 lines (94 loc) · 4.02 KB
/
config.sample.toml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[zac]
# Directory containing the source collector modules.
source_collector_dir = "path/to/source_collector_dir/"
# Directory containing the host modifier modules.
host_modifier_dir = "path/to/host_modifier_dir/"
# URI used to connect to the Postgres database.
db_uri = "dbname='zac' user='zabbix' host='localhost' password='secret' port=5432 connect_timeout=2"
# Log level for the application.
log_level = "INFO"
# Health status for each ZAC process.
health_file = "/tmp/zac_health.json"
# File containing hostnames of hosts to add/remove when failsafe is reached.
failsafe_file = "/tmp/zac_failsafe.json"
# File that admin can create to signal manual approval of adding/removing hosts
# when failsafe is reached.
# The file is automatically deleted after changes are made.
failsafe_ok_file = "/tmp/zac_failsafe_ok"
# Require that the application can delete the failsafe OK file before making changes.
# If false, the application will make changes even if it fails to delete the file.
# It is then up to the administrator to manually delete the file afterwards.
failsafe_ok_file_strict = true
# Configuration for ZAC processes.
[zac.process.source_merger]
# How often to run the source merger in seconds
update_interval = 60
[zac.process.host_updater]
update_interval = 60
[zac.process.hostgroup_updater]
update_interval = 60
[zac.process.template_updater]
update_interval = 60
[zac.process.garbage_collector]
# Enable garbage collection, including:
# - Remove disabled hosts from maintenances
enabled = false
# Delete maintenances if all its hosts are disabled
delete_empty_maintenance = false
update_interval = 86400 # every 24 hours
[zabbix]
# Directory containing mapping files.
map_dir = "path/to/map_dir/"
url = "http://localhost:8080"
username = "Admin"
password = "zabbix"
# Preview changes without making them.
# Disables all write operations to Zabbix.
dryrun = true
# Maximum number of hosts to add/remove in one go.
failsafe = 20
# Zabbix API timeout in seconds (0 = no timeout)
timeout = 60
# Prefix for managed tags
tags_prefix = "zac_"
managed_inventory = ["location"]
# Names of hostgroups that zabbix-auto-config will manage.
hostgroup_all = "All-hosts"
hostgroup_manual = "All-manual-hosts"
hostgroup_disabled = "All-auto-disabled-hosts"
hostgroup_source_prefix = "Source-"
hostgroup_importance_prefix = "Importance-"
# Template group creation
# If we have a host group named `Siteadmin-my-hosts`, ZAC creates a
# template group named `Templates-my-hosts`
# NOTE: will create host groups if enabled on Zabbix <6.2
create_templategroups = true
templategroup_prefix = "Templates-"
# Separator used for group name prefixes
prefix_separator = "-"
extra_siteadmin_hostgroup_prefixes = []
[source_collectors.mysource]
# Name of the source collector module without the .py extension
module_name = "mysource"
# How often to run the source collector in seconds
update_interval = 60
# How many errors to tolerate before disabling the source
error_tolerance = 5 # Tolerate 5 errors within `error_duration` seconds
# How long an error should be kept in the error tally before discarding it
error_duration = 360 # should be greater than update_interval
# Exit the application if the source fails
# If true, the application will exit if the source fails
# If false, the source will be disabled for `disable_duration` seconds
exit_on_error = false # Disable source if it fails
# How long to wait before reactivating a disabled source
disable_duration = 3600 # Time in seconds to wait before reactivating a disabled source
# Any other options are passed as keyword arguments to the source collector's
# `collect()` function
kwarg_passed_to_source = "value" # extra fields are passed to the source module as kwargs
another_kwarg = "value2" # We can pass an arbitrary number of kwargs to the source module
[source_collectors.othersource]
module_name = "mysource"
update_interval = 60
error_tolerance = 0 # no tolerance for errors (default)
exit_on_error = true # exit application if source fails (default)
source = "other" # extra kwarg used in mysource module