| 1 |
# Ansible managed: Do NOT edit this file manually! |
| 2 |
# This is a configuration file for Zabbix Agent 2 |
| 3 |
# To get more information about Zabbix, visit http://www.zabbix.com |
| 4 |
|
| 5 |
# This configuration file is "minimalized", which means all the original comments |
| 6 |
# are removed. The full documentation for your Zabbix Agent 2 can be found here: |
| 7 |
# https://www.zabbix.com/documentation/{{ zabbix_agent_version }}/en/manual/appendix/config/zabbix_agent2 |
| 8 |
|
| 9 |
{% if zabbix_agent_aliases is defined and zabbix_agent_aliases %} |
| 10 |
{% if zabbix_agent_aliases is string %} |
| 11 |
Alias={{ zabbix_agent_aliases }} |
| 12 |
{% else %} |
| 13 |
{% for item in zabbix_agent_aliases %} |
| 14 |
Alias={{ item }} |
| 15 |
{% endfor %} |
| 16 |
{% endif %} |
| 17 |
{% else %} |
| 18 |
# Alias= |
| 19 |
{% endif %} |
| 20 |
{% if zabbix_agent_allowkeys is defined and zabbix_agent_allowkeys %} |
| 21 |
{% if zabbix_agent_allowkeys is string %} |
| 22 |
AllowKey={{ zabbix_agent_allowkeys }} |
| 23 |
{% else %} |
| 24 |
{% for item in zabbix_agent_allowkeys %} |
| 25 |
AllowKey={{ item }} |
| 26 |
{% endfor %} |
| 27 |
{% endif %} |
| 28 |
{% else %} |
| 29 |
# AllowKey= |
| 30 |
{% endif %} |
| 31 |
{% if not zabbix_agent2 and ansible_facts.os_family != "Windows" %} |
| 32 |
{{ (zabbix_agent_allowroot is defined and zabbix_agent_allowroot is not none) | ternary('', '# ') }}AllowRoot={{ zabbix_agent_allowroot | default (false) | ternary('1', '0') }} |
| 33 |
{% endif %} |
| 34 |
{{ (zabbix_agent_buffersend is defined and zabbix_agent_buffersend is not none) | ternary('', '# ') }}BufferSend={{ zabbix_agent_buffersend | default('') }} |
| 35 |
{{ (zabbix_agent_buffersize is defined and zabbix_agent_buffersize is not none) | ternary('', '# ') }}BufferSize={{ zabbix_agent_buffersize | default('') }} |
| 36 |
{% if zabbix_agent2 %} |
| 37 |
{{ (zabbix_agent_controlsocket is defined and zabbix_agent_controlsocket is not none) | ternary('', '# ') }}ControlSocket={{ zabbix_agent_controlsocket | default('') }} |
| 38 |
{% endif %} |
| 39 |
{{ (zabbix_agent_debuglevel is defined and zabbix_agent_debuglevel is not none) | ternary('', '# ') }}DebugLevel={{ zabbix_agent_debuglevel | default('') }} |
| 40 |
{% if zabbix_agent_denykeys is defined and zabbix_agent_denykeys %} |
| 41 |
{% if zabbix_agent_denykeys is string %} |
| 42 |
DenyKey={{ zabbix_agent_denykeys }} |
| 43 |
{% else %} |
| 44 |
{% for item in zabbix_agent_denykeys %} |
| 45 |
DenyKey={{ item }} |
| 46 |
{% endfor %} |
| 47 |
{% endif %} |
| 48 |
{% else %} |
| 49 |
# DenyKey= |
| 50 |
{% endif %} |
| 51 |
{% if zabbix_agent2 %} |
| 52 |
{{ (zabbix_agent_enablepersistentbuffer is defined and zabbix_agent_enablepersistentbuffer is not none) | ternary('', '# ') }}EnablePersistentBuffer={{ zabbix_agent_enablepersistentbuffer | default (false) | ternary('1', '0') }} |
| 53 |
{% endif %} |
| 54 |
{% if not zabbix_agent2 %} |
| 55 |
{{ (zabbix_agent_enableremotecommands is defined and zabbix_agent_enableremotecommands is not none) | ternary('', '# ') }}EnableRemoteCommands={{ zabbix_agent_enableremotecommands | default (false) | ternary('1', '0') }} |
| 56 |
{% endif %} |
| 57 |
{% if zabbix_agent2 %} |
| 58 |
{{ (zabbix_agent_forceactivechecksonstart is defined and zabbix_agent_forceactivechecksonstart is not none) | ternary('', '# ') }}ForceActiveChecksOnStart={{ zabbix_agent_forceactivechecksonstart | default (false) | ternary('1', '0') }} |
| 59 |
{% endif %} |
| 60 |
{% if zabbix_agent_version is version_compare('6.2', '>=') %} |
| 61 |
{{ (zabbix_agent_heartbeatfrequency is defined and zabbix_agent_heartbeatfrequency is not none) | ternary('', '# ') }}HeartbeatFrequency={{ zabbix_agent_heartbeatfrequency | default('') }} |
| 62 |
{% endif %} |
| 63 |
{{ (zabbix_agent_hostinterface is defined and zabbix_agent_hostinterface is not none) | ternary('', '# ') }}HostInterface={{ zabbix_agent_hostinterface | default('') }} |
| 64 |
{{ (zabbix_agent_hostinterfaceitem is defined and zabbix_agent_hostinterfaceitem is not none) | ternary('', '# ') }}HostInterfaceItem={{ zabbix_agent_hostinterfaceitem | default('') }} |
| 65 |
{{ (zabbix_agent_hostmetadata is defined and zabbix_agent_hostmetadata is not none) | ternary('', '# ') }}HostMetadata={{ zabbix_agent_hostmetadata | default('') }} |
| 66 |
{{ (zabbix_agent_hostmetadataitem is defined and zabbix_agent_hostmetadataitem is not none) | ternary('', '# ') }}HostMetadataItem={{ zabbix_agent_hostmetadataitem | default('') }} |
| 67 |
{{ (zabbix_agent_hostname is defined and zabbix_agent_hostname is not none) | ternary('', '# ') }}Hostname={{ zabbix_agent_hostname | default('') }} |
| 68 |
{{ (zabbix_agent_hostnameitem is defined and zabbix_agent_hostnameitem is not none) | ternary('', '# ') }}HostnameItem={{ zabbix_agent_hostnameitem | default('') }} |
| 69 |
{% if zabbix_agent_include_dirs is defined and zabbix_agent_include_dirs %} |
| 70 |
{% for item in zabbix_agent_include_dirs %} |
| 71 |
Include={{ item }}/*.conf |
| 72 |
{% endfor %} |
| 73 |
{% else %} |
| 74 |
# Include= |
| 75 |
{% endif %} |
| 76 |
{% if not zabbix_agent2 %} |
| 77 |
{{ (zabbix_agent_listenbacklog is defined and zabbix_agent_listenbacklog is not none) | ternary('', '# ') }}ListenBacklog={{ zabbix_agent_listenbacklog | default('') }} |
| 78 |
{% endif %} |
| 79 |
{{ (zabbix_agent_listenip is defined and zabbix_agent_listenip is not none) | ternary('', '# ') }}ListenIP={{ zabbix_agent_listenip | default('') }} |
| 80 |
{{ (zabbix_agent_listenport is defined and zabbix_agent_listenport is not none) | ternary('', '# ') }}ListenPort={{ zabbix_agent_listenport | default('') }} |
| 81 |
{% if not zabbix_agent2 and ansible_facts.os_family != "Windows" %} |
| 82 |
{{ (zabbix_agent_loadmodule is defined and zabbix_agent_loadmodule is not none) | ternary('', '# ') }}LoadModule={{ zabbix_agent_loadmodule | default('') }} |
| 83 |
{{ (zabbix_agent_loadmodulepath is defined and zabbix_agent_loadmodulepath is not none) | ternary('', '# ') }}LoadModulePath={{ zabbix_agent_loadmodulepath | default('') }} |
| 84 |
{% endif %} |
| 85 |
{{ (zabbix_agent_logfile is defined and zabbix_agent_logfile is not none) | ternary('', '# ') }}LogFile={{ zabbix_agent_logfile | default('') }} |
| 86 |
{{ (zabbix_agent_logfilesize is defined and zabbix_agent_logfilesize is not none) | ternary('', '# ') }}LogFileSize={{ zabbix_agent_logfilesize | default('') }} |
| 87 |
{% if not zabbix_agent2 %} |
| 88 |
{{ (zabbix_agent_logremotecommands is defined and zabbix_agent_logremotecommands is not none) | ternary('', '# ') }}LogRemoteCommands={{ zabbix_agent_logremotecommands | default (false) | ternary('1', '0') }} |
| 89 |
{% endif %} |
| 90 |
{{ (zabbix_agent_logtype is defined and zabbix_agent_logtype is not none) | ternary('', '# ') }}LogType={{ zabbix_agent_logtype | default('') }} |
| 91 |
{% if not zabbix_agent2 %} |
| 92 |
{{ (zabbix_agent_maxlinespersecond is defined and zabbix_agent_maxlinespersecond is not none) | ternary('', '# ') }}MaxLinesPerSecond={{ zabbix_agent_maxlinespersecond | default('') }} |
| 93 |
{% endif %} |
| 94 |
{% if not zabbix_agent2 and ansible_facts.os_family == "Windows" %} |
| 95 |
{{ (zabbix_agent_perfcounter is defined and zabbix_agent_perfcounter is not none) | ternary('', '# ') }}PerfCounter={{ zabbix_agent_perfcounter | default('') }} |
| 96 |
{{ (zabbix_agent_perfcounteren is defined and zabbix_agent_perfcounteren is not none) | ternary('', '# ') }}PerfCounterEn={{ zabbix_agent_perfcounteren | default('') }} |
| 97 |
{% endif %} |
| 98 |
{% if zabbix_agent2 %} |
| 99 |
{{ (zabbix_agent_persistentbufferfile is defined and zabbix_agent_persistentbufferfile is not none) | ternary('', '# ') }}PersistentBufferFile={{ zabbix_agent_persistentbufferfile | default('') }} |
| 100 |
{{ (zabbix_agent_persistentbufferperiod is defined and zabbix_agent_persistentbufferperiod is not none) | ternary('', '# ') }}PersistentBufferPeriod={{ zabbix_agent_persistentbufferperiod | default('') }} |
| 101 |
{% endif %} |
| 102 |
{% if ansible_facts.os_family != "Windows" %} |
| 103 |
{{ (zabbix_agent_pidfile is defined and zabbix_agent_pidfile is not none) | ternary('', '# ') }}PidFile={{ zabbix_agent_pidfile | default('') }} |
| 104 |
{% endif %} |
| 105 |
{% if zabbix_agent_plugins is defined and zabbix_agent_plugins %} |
| 106 |
{% for entry in zabbix_agent_plugins %} |
| 107 |
{% set my_name = entry['name'] %} |
| 108 |
{% for property in entry['options'] %} |
| 109 |
{% set param = property['parameter'] %} |
| 110 |
{% set value = property['value'] %} |
| 111 |
Plugins.{{ my_name }}.{{ param }}={{ value }} |
| 112 |
{% endfor %} |
| 113 |
{% endfor %} |
| 114 |
{% endif %} |
| 115 |
{% if zabbix_agent2 %} |
| 116 |
{{ (zabbix_agent_pluginsocket is defined and zabbix_agent_pluginsocket is not none) | ternary('', '# ') }}PluginSocket={{ zabbix_agent_pluginsocket | default('') }} |
| 117 |
{{ (zabbix_agent_plugintimeout is defined and zabbix_agent_plugintimeout is not none) | ternary('', '# ') }}PluginTimeout={{ zabbix_agent_plugintimeout | default('') }} |
| 118 |
{% endif %} |
| 119 |
{{ (zabbix_agent_refreshactivechecks is defined and zabbix_agent_refreshactivechecks is not none) | ternary('', '# ') }}RefreshActiveChecks={{ zabbix_agent_refreshactivechecks | default('') }} |
| 120 |
{{ (zabbix_agent_server is defined and zabbix_agent_server is not none) | ternary('', '# ') }}Server={{ zabbix_agent_server | default('') }} |
| 121 |
{{ (zabbix_agent_serveractive is defined and zabbix_agent_serveractive is not none) | ternary('', '# ') }}ServerActive={{ zabbix_agent_serveractive | default('') }} |
| 122 |
{{ (zabbix_agent_sourceip is defined and zabbix_agent_sourceip is not none) | ternary('', '# ') }}SourceIP={{ zabbix_agent_sourceip | default('') }} |
| 123 |
{% if not zabbix_agent2 %} |
| 124 |
{{ (zabbix_agent_startagents is defined and zabbix_agent_startagents is not none) | ternary('', '# ') }}StartAgents={{ zabbix_agent_startagents | default('') }} |
| 125 |
{% endif %} |
| 126 |
{% if zabbix_agent2 %} |
| 127 |
{{ (zabbix_agent_statusport is defined and zabbix_agent_statusport is not none) | ternary('', '# ') }}StatusPort={{ zabbix_agent_statusport | default('') }} |
| 128 |
{% endif %} |
| 129 |
{{ (zabbix_agent_timeout is defined and zabbix_agent_timeout is not none) | ternary('', '# ') }}Timeout={{ zabbix_agent_timeout | default('') }} |
| 130 |
{{ (zabbix_agent_tlsconnect is defined and zabbix_agent_tlsaccept is not none) | ternary('', '# ') }}TLSAccept={{ zabbix_agent_tlsaccept | default('') }} |
| 131 |
{{ (zabbix_agent_tlscafile is defined and zabbix_agent_tlscafile is not none) | ternary('', '# ') }}TLSCAFile={{ zabbix_agent_tlscafile | default('') }} |
| 132 |
{{ (zabbix_agent_tlscertfile is defined and zabbix_agent_tlscertfile is not none) | ternary('', '# ') }}TLSCertFile={{ zabbix_agent_tlscertfile | default('') }} |
| 133 |
{% if not zabbix_agent2 and ansible_facts.os_family != "Windows" %} |
| 134 |
{{ (zabbix_agent_tlscipherall is defined and zabbix_agent_tlscipherall is not none) | ternary('', '# ') }}TLSCipherAll={{ zabbix_agent_tlscipherall | default('') }} |
| 135 |
{{ (zabbix_agent_tlscipherall13 is defined and zabbix_agent_tlscipherall13 is not none) | ternary('', '# ') }}TLSCipherAll13={{ zabbix_agent_tlscipherall13 | default('') }} |
| 136 |
{{ (zabbix_agent_tlsciphercert is defined and zabbix_agent_tlsciphercert is not none) | ternary('', '# ') }}TLSCipherCert={{ zabbix_agent_tlsciphercert | default('') }} |
| 137 |
{{ (zabbix_agent_tlsciphercert13 is defined and zabbix_agent_tlsciphercert13 is not none) | ternary('', '# ') }}TLSCipherCert13={{ zabbix_agent_tlsciphercert13 | default('') }} |
| 138 |
{{ (zabbix_agent_tlscipherpsk is defined and zabbix_agent_tlscipherpsk is not none) | ternary('', '# ') }}TLSCipherPSK={{ zabbix_agent_tlscipherpsk | default('') }} |
| 139 |
{{ (zabbix_agent_tlscipherpsk13 is defined and zabbix_agent_tlscipherpsk13 is not none) | ternary('', '# ') }}TLSCipherPSK13={{ zabbix_agent_tlscipherpsk13 | default('') }} |
| 140 |
{% endif %} |
| 141 |
{{ (zabbix_agent_tlsconnect is defined and zabbix_agent_tlsconnect is not none) | ternary('', '# ') }}TLSConnect={{ zabbix_agent_tlsconnect | default('') }} |
| 142 |
{{ (zabbix_agent_tlscrlfile is defined and zabbix_agent_tlscrlfile is not none) | ternary('', '# ') }}TLSCRLFile={{ zabbix_agent_tlscrlfile | default('') }} |
| 143 |
{{ (zabbix_agent_tlskeyfile is defined and zabbix_agent_tlskeyfile is not none) | ternary('', '# ') }}TLSKeyFile={{ zabbix_agent_tlskeyfile | default('') }} |
| 144 |
{% if zabbix_agent_tlsaccept == 'psk' or zabbix_agent_tlsconnect == 'psk' %} |
| 145 |
{{ (zabbix_agent_tlspskfile is defined and zabbix_agent_tlspskfile is not none) | ternary('', '# ') }}TLSPSKFile={{ zabbix_agent_tlspskfile | default('') }} |
| 146 |
{{ (zabbix_agent_tlspskidentity is defined and zabbix_agent_tlspskidentity is not none) | ternary('', '# ') }}TLSPSKIdentity={{ zabbix_agent_tlspskidentity | default('') }} |
| 147 |
{% endif %} |
| 148 |
{{ (zabbix_agent_tlsservercertissuer is defined and zabbix_agent_tlsservercertissuer is not none) | ternary('', '# ') }}TLSServerCertIssuer={{ zabbix_agent_tlsservercertissuer | default('') }} |
| 149 |
{{ (zabbix_agent_tlsservercertsubject is defined and zabbix_agent_tlsservercertsubject is not none) | ternary('', '# ') }}TLSServerCertSubject={{ zabbix_agent_tlsservercertsubject | default('') }} |
| 150 |
{{ (zabbix_agent_unsafeuserparameters is defined and zabbix_agent_unsafeuserparameters is not none) | ternary('', '# ') }}UnsafeUserParameters={{ zabbix_agent_unsafeuserparameters | default (false) | ternary('1', '0') }} |
| 151 |
{% if not zabbix_agent2 and ansible_facts.os_family != "Windows" %} |
| 152 |
{{ (zabbix_agent_runas_user is defined and zabbix_agent_runas_user is not none) | ternary('', '# ') }}User={{ zabbix_agent_runas_user | default('') }} |
| 153 |
{% endif %} |
| 154 |
{{ (zabbix_agent_userparamater is defined and zabbix_agent_userparamater is not none) | ternary('', '# ') }}UserParameter={{ zabbix_agent_userparamater | default('') }} |
| 155 |
{{ (zabbix_agent_userparamaterdir is defined and zabbix_agent_userparamaterdir is not none) | ternary('', '# ') }}UserParameterDir={{ zabbix_agent_userparamaterdir | default('') }} |