agent.conf.j2 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. # This is a config file for the Zabbix agent daemon (Unix)
  6. # To get more information about Zabbix, visit http://www.zabbix.com
  7. ############ GENERAL PARAMETERS #################
  8. ### Option: PidFile
  9. # Name of PID file.
  10. #
  11. # Mandatory: no
  12. # Default:
  13. # PidFile=/tmp/zabbix_agentd.pid
  14. PidFile=/var/run/zabbix/zabbix_agentd.pid
  15. ### Option: LogFile
  16. # Name of log file.
  17. # If not set, syslog is used.
  18. #
  19. # Mandatory: no
  20. # Default:
  21. # LogFile=
  22. LogFile=/var/log/zabbix-agent/zabbix_agentd.log
  23. ### Option: LogFileSize
  24. # Maximum size of log file in MB.
  25. # 0 - disable automatic log rotation.
  26. #
  27. # Mandatory: no
  28. # Range: 0-1024
  29. # Default:
  30. # LogFileSize=1
  31. LogFileSize=0
  32. ### Option: DebugLevel
  33. # Specifies debug level
  34. # 0 - no debug
  35. # 1 - critical information
  36. # 2 - error information
  37. # 3 - warnings
  38. # 4 - for debugging (produces lots of information)
  39. #
  40. # Mandatory: no
  41. # Range: 0-4
  42. # Default:
  43. # DebugLevel=3
  44. ### Option: SourceIP
  45. # Source IP address for outgoing connections.
  46. #
  47. # Mandatory: no
  48. # Default:
  49. # SourceIP=
  50. ### Option: EnableRemoteCommands
  51. # Whether remote commands from Zabbix server are allowed.
  52. # 0 - not allowed
  53. # 1 - allowed
  54. #
  55. # Mandatory: no
  56. # Default:
  57. # EnableRemoteCommands=0
  58. ### Option: LogRemoteCommands
  59. # Enable logging of executed shell commands as warnings.
  60. # 0 - disabled
  61. # 1 - enabled
  62. #
  63. # Mandatory: no
  64. # Default:
  65. # LogRemoteCommands=0
  66. ##### Passive checks related
  67. ### Option: Server
  68. # List of comma delimited IP addresses (or hostnames) of Zabbix servers.
  69. # Incoming connections will be accepted only from the hosts listed here.
  70. # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
  71. #
  72. # Mandatory: no
  73. # Default:
  74. # Server=
  75. Server={{ zabbix_remote_server }}
  76. ### Option: ListenPort
  77. # Agent will listen on this port for connections from the server.
  78. #
  79. # Mandatory: no
  80. # Range: 1024-32767
  81. # Default:
  82. # ListenPort=10050
  83. ### Option: ListenIP
  84. # List of comma delimited IP addresses that the agent should listen on.
  85. # First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
  86. #
  87. # Mandatory: no
  88. # Default:
  89. # ListenIP=0.0.0.0
  90. ### Option: StartAgents
  91. # Number of pre-forked instances of zabbix_agentd that process passive checks.
  92. # If set to 0, disables passive checks and the agent will not listen on any TCP port.
  93. #
  94. # Mandatory: no
  95. # Range: 0-100
  96. # Default:
  97. # StartAgents=3
  98. ##### Active checks related
  99. ### Option: ServerActive
  100. # List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
  101. # If port is not specified, default port is used.
  102. # IPv6 addresses must be enclosed in square brackets if port for that host is specified.
  103. # If port is not specified, square brackets for IPv6 addresses are optional.
  104. # If this parameter is not specified, active checks are disabled.
  105. # Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
  106. #
  107. # Mandatory: no
  108. # Default:
  109. # ServerActive=
  110. ServerActive={{ zabbix_remote_server }}
  111. ### Option: Hostname
  112. # Unique, case sensitive hostname.
  113. # Required for active checks and must match hostname as configured on the server.
  114. # Value is acquired from HostnameItem if undefined.
  115. #
  116. # Mandatory: no
  117. # Default:
  118. # Hostname=
  119. Hostname={{ ansible_hostname }}
  120. ### Option: HostnameItem
  121. # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
  122. # Does not support UserParameters or aliases.
  123. #
  124. # Mandatory: no
  125. # Default:
  126. # HostnameItem=system.hostname
  127. ### Option: HostMetadata
  128. # Optional parameter that defines host metadata.
  129. # Host metadata is used at host auto-registration process.
  130. # An agent will issue an error and not start if the value is over limit of 255 characters.
  131. # If not defined, value will be acquired from HostMetadataItem.
  132. #
  133. # Mandatory: no
  134. # Range: 0-255 characters
  135. # Default:
  136. # HostMetadata=
  137. ### Option: HostMetadataItem
  138. # Optional parameter that defines an item used for getting host metadata.
  139. # Host metadata is used at host auto-registration process.
  140. # During an auto-registration request an agent will log a warning message if
  141. # the value returned by specified item is over limit of 255 characters.
  142. # This option is only used when HostMetadata is not defined.
  143. #
  144. # Mandatory: no
  145. # Default:
  146. # HostMetadataItem=
  147. ### Option: RefreshActiveChecks
  148. # How often list of active checks is refreshed, in seconds.
  149. #
  150. # Mandatory: no
  151. # Range: 60-3600
  152. # Default:
  153. # RefreshActiveChecks=120
  154. ### Option: BufferSend
  155. # Do not keep data longer than N seconds in buffer.
  156. #
  157. # Mandatory: no
  158. # Range: 1-3600
  159. # Default:
  160. # BufferSend=5
  161. ### Option: BufferSize
  162. # Maximum number of values in a memory buffer. The agent will send
  163. # all collected data to Zabbix Server or Proxy if the buffer is full.
  164. #
  165. # Mandatory: no
  166. # Range: 2-65535
  167. # Default:
  168. # BufferSize=100
  169. ### Option: MaxLinesPerSecond
  170. # Maximum number of new lines the agent will send per second to Zabbix Server
  171. # or Proxy processing 'log' and 'logrt' active checks.
  172. # The provided value will be overridden by the parameter 'maxlines',
  173. # provided in 'log' or 'logrt' item keys.
  174. #
  175. # Mandatory: no
  176. # Range: 1-1000
  177. # Default:
  178. # MaxLinesPerSecond=100
  179. ############ ADVANCED PARAMETERS #################
  180. ### Option: Alias
  181. # Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
  182. # Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
  183. # Different Alias keys may reference the same item key.
  184. # For example, to retrieve the ID of user 'zabbix':
  185. # Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
  186. # Now shorthand key zabbix.userid may be used to retrieve data.
  187. # Aliases can be used in HostMetadataItem but not in HostnameItem parameters.
  188. #
  189. # Mandatory: no
  190. # Range:
  191. # Default:
  192. ### Option: Timeout
  193. # Spend no more than Timeout seconds on processing
  194. #
  195. # Mandatory: no
  196. # Range: 1-30
  197. # Default:
  198. # Timeout=3
  199. ### Option: AllowRoot
  200. # Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent
  201. # will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
  202. # 0 - do not allow
  203. # 1 - allow
  204. #
  205. # Mandatory: no
  206. # Default:
  207. # AllowRoot=0
  208. ### Option: Include
  209. # You may include individual files or all files in a directory in the configuration file.
  210. # Installing Zabbix will create include directory in /etc/zabbix, unless modified during the compile time.
  211. #
  212. # Mandatory: no
  213. # Default:
  214. # Include=
  215. # Include=/etc/zabbix/zabbix_agentd.userparams.conf
  216. # Include=/etc/zabbix/zabbix_agentd.conf.d/
  217. Include=/etc/zabbix/zabbix_agentd.conf.d/
  218. ####### USER-DEFINED MONITORED PARAMETERS #######
  219. ### Option: UnsafeUserParameters
  220. # Allow all characters to be passed in arguments to user-defined parameters.
  221. # 0 - do not allow
  222. # 1 - allow
  223. #
  224. # Mandatory: no
  225. # Range: 0-1
  226. # Default:
  227. # UnsafeUserParameters=0
  228. ### Option: UserParameter
  229. # User-defined parameter to monitor. There can be several user-defined parameters.
  230. # Format: UserParameter=<key>,<shell command>
  231. # See 'zabbix_agentd' directory for examples.
  232. #
  233. # Mandatory: no
  234. # Default:
  235. # UserParameter=
  236. ####### LOADABLE MODULES #######
  237. ### Option: LoadModulePath
  238. # Full path to location of agent modules.
  239. # Default depends on compilation options.
  240. #
  241. # Mandatory: no
  242. # Default:
  243. # LoadModulePath=${libdir}/modules
  244. ### Option: LoadModule
  245. # Module to load at agent startup. Modules are used to extend functionality of the agent.
  246. # Format: LoadModule=<module.so>
  247. # The modules must be located in directory specified by LoadModulePath.
  248. # It is allowed to include multiple LoadModule parameters.
  249. #
  250. # Mandatory: no
  251. # Default:
  252. # LoadModule=