agent.conf.j2 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. {% if ansible_controlled is defined and ansible_controlled != "" %}
  2. #
  3. # {{ ansible_controlled }}
  4. #
  5. {% endif %}
  6. # This is a config file for the Zabbix agent daemon (Unix)
  7. # To get more information about Zabbix, visit http://www.zabbix.com
  8. ############ GENERAL PARAMETERS #################
  9. ### Option: PidFile
  10. # Name of PID file.
  11. #
  12. # Mandatory: no
  13. # Default:
  14. # PidFile=/tmp/zabbix_agentd.pid
  15. PidFile=/var/run/zabbix/zabbix_agentd.pid
  16. ### Option: LogType
  17. # Specifies where log messages are written to:
  18. # system - syslog
  19. # file - file specified with LogFile parameter
  20. # console - standard output
  21. #
  22. # Mandatory: no
  23. # Default:
  24. # LogType=file
  25. ### Option: LogFile
  26. # Log file name for LogType 'file' parameter.
  27. #
  28. # Mandatory: no
  29. # Default:
  30. # LogFile=
  31. LogFile=/var/log/zabbix-agent/zabbix_agentd.log
  32. ### Option: LogFileSize
  33. # Maximum size of log file in MB.
  34. # 0 - disable automatic log rotation.
  35. #
  36. # Mandatory: no
  37. # Range: 0-1024
  38. # Default:
  39. # LogFileSize=1
  40. LogFileSize=0
  41. ### Option: DebugLevel
  42. # Specifies debug level:
  43. # 0 - basic information about starting and stopping of Zabbix processes
  44. # 1 - critical information
  45. # 2 - error information
  46. # 3 - warnings
  47. # 4 - for debugging (produces lots of information)
  48. # 5 - extended debugging (produces even more information)
  49. #
  50. # Mandatory: no
  51. # Range: 0-5
  52. # Default:
  53. # DebugLevel=3
  54. ### Option: SourceIP
  55. # Source IP address for outgoing connections.
  56. #
  57. # Mandatory: no
  58. # Default:
  59. # SourceIP=
  60. ### Option: EnableRemoteCommands
  61. # Whether remote commands from Zabbix server are allowed.
  62. # 0 - not allowed
  63. # 1 - allowed
  64. #
  65. # Mandatory: no
  66. # Default:
  67. # EnableRemoteCommands=0
  68. ### Option: LogRemoteCommands
  69. # Enable logging of executed shell commands as warnings.
  70. # 0 - disabled
  71. # 1 - enabled
  72. #
  73. # Mandatory: no
  74. # Default:
  75. # LogRemoteCommands=0
  76. ##### Passive checks related
  77. ### Option: Server
  78. # List of comma delimited IP addresses (or hostnames) of Zabbix servers.
  79. # Incoming connections will be accepted only from the hosts listed here.
  80. # If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
  81. #
  82. # Mandatory: no
  83. # Default:
  84. # Server=
  85. Server={{ zabbix_remote_server }}
  86. ### Option: ListenPort
  87. # Agent will listen on this port for connections from the server.
  88. #
  89. # Mandatory: no
  90. # Range: 1024-32767
  91. # Default:
  92. # ListenPort=10050
  93. ### Option: ListenIP
  94. # List of comma delimited IP addresses that the agent should listen on.
  95. # First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
  96. #
  97. # Mandatory: no
  98. # Default:
  99. # ListenIP=0.0.0.0
  100. ### Option: StartAgents
  101. # Number of pre-forked instances of zabbix_agentd that process passive checks.
  102. # If set to 0, disables passive checks and the agent will not listen on any TCP port.
  103. #
  104. # Mandatory: no
  105. # Range: 0-100
  106. # Default:
  107. # StartAgents=3
  108. ##### Active checks related
  109. ### Option: ServerActive
  110. # List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
  111. # If port is not specified, default port is used.
  112. # IPv6 addresses must be enclosed in square brackets if port for that host is specified.
  113. # If port is not specified, square brackets for IPv6 addresses are optional.
  114. # If this parameter is not specified, active checks are disabled.
  115. # Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
  116. #
  117. # Mandatory: no
  118. # Default:
  119. # ServerActive=
  120. ServerActive={{ zabbix_remote_server }}
  121. ### Option: Hostname
  122. # Unique, case sensitive hostname.
  123. # Required for active checks and must match hostname as configured on the server.
  124. # Value is acquired from HostnameItem if undefined.
  125. #
  126. # Mandatory: no
  127. # Default:
  128. # Hostname=
  129. Hostname={{ ansible_hostname }}
  130. ### Option: HostnameItem
  131. # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
  132. # Does not support UserParameters or aliases.
  133. #
  134. # Mandatory: no
  135. # Default:
  136. # HostnameItem=system.hostname
  137. ### Option: HostMetadata
  138. # Optional parameter that defines host metadata.
  139. # Host metadata is used at host auto-registration process.
  140. # An agent will issue an error and not start if the value is over limit of 255 characters.
  141. # If not defined, value will be acquired from HostMetadataItem.
  142. #
  143. # Mandatory: no
  144. # Range: 0-255 characters
  145. # Default:
  146. # HostMetadata=
  147. ### Option: HostMetadataItem
  148. # Optional parameter that defines an item used for getting host metadata.
  149. # Host metadata is used at host auto-registration process.
  150. # During an auto-registration request an agent will log a warning message if
  151. # the value returned by specified item is over limit of 255 characters.
  152. # This option is only used when HostMetadata is not defined.
  153. #
  154. # Mandatory: no
  155. # Default:
  156. # HostMetadataItem=
  157. ### Option: RefreshActiveChecks
  158. # How often list of active checks is refreshed, in seconds.
  159. #
  160. # Mandatory: no
  161. # Range: 60-3600
  162. # Default:
  163. # RefreshActiveChecks=120
  164. ### Option: BufferSend
  165. # Do not keep data longer than N seconds in buffer.
  166. #
  167. # Mandatory: no
  168. # Range: 1-3600
  169. # Default:
  170. # BufferSend=5
  171. ### Option: BufferSize
  172. # Maximum number of values in a memory buffer. The agent will send
  173. # all collected data to Zabbix Server or Proxy if the buffer is full.
  174. #
  175. # Mandatory: no
  176. # Range: 2-65535
  177. # Default:
  178. # BufferSize=100
  179. ### Option: MaxLinesPerSecond
  180. # Maximum number of new lines the agent will send per second to Zabbix Server
  181. # or Proxy processing 'log' and 'logrt' active checks.
  182. # The provided value will be overridden by the parameter 'maxlines',
  183. # provided in 'log' or 'logrt' item keys.
  184. #
  185. # Mandatory: no
  186. # Range: 1-1000
  187. # Default:
  188. # MaxLinesPerSecond=20
  189. ############ ADVANCED PARAMETERS #################
  190. ### Option: Alias
  191. # Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
  192. # Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
  193. # Different Alias keys may reference the same item key.
  194. # For example, to retrieve the ID of user 'zabbix':
  195. # Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
  196. # Now shorthand key zabbix.userid may be used to retrieve data.
  197. # Aliases can be used in HostMetadataItem but not in HostnameItem parameters.
  198. #
  199. # Mandatory: no
  200. # Range:
  201. # Default:
  202. ### Option: Timeout
  203. # Spend no more than Timeout seconds on processing
  204. #
  205. # Mandatory: no
  206. # Range: 1-30
  207. # Default:
  208. # Timeout=3
  209. ### Option: AllowRoot
  210. # Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent
  211. # will try to switch to the user specified by the User configuration option instead.
  212. # Has no effect if started under a regular user.
  213. # 0 - do not allow
  214. # 1 - allow
  215. #
  216. # Mandatory: no
  217. # Default:
  218. # AllowRoot=0
  219. ### Option: User
  220. # Drop privileges to a specific, existing user on the system.
  221. # Only has effect if run as 'root' and AllowRoot is disabled.
  222. #
  223. # Mandatory: no
  224. # Default:
  225. # User=zabbix
  226. ### Option: Include
  227. # You may include individual files or all files in a directory in the configuration file.
  228. # Installing Zabbix will create include directory in /etc/zabbix, unless modified during the compile time.
  229. #
  230. # Mandatory: no
  231. # Default:
  232. # Include=
  233. # Include=/etc/zabbix/zabbix_agentd.userparams.conf
  234. # Include=/etc/zabbix/zabbix_agentd.conf.d/
  235. Include=/etc/zabbix/zabbix_agentd.conf.d/
  236. ####### USER-DEFINED MONITORED PARAMETERS #######
  237. ### Option: UnsafeUserParameters
  238. # Allow all characters to be passed in arguments to user-defined parameters.
  239. # The following characters are not allowed:
  240. # \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @
  241. # Additionally, newline characters are not allowed.
  242. # 0 - do not allow
  243. # 1 - allow
  244. #
  245. # Mandatory: no
  246. # Range: 0-1
  247. # Default:
  248. # UnsafeUserParameters=0
  249. ### Option: UserParameter
  250. # User-defined parameter to monitor. There can be several user-defined parameters.
  251. # Format: UserParameter=<key>,<shell command>
  252. # See 'zabbix_agentd' directory for examples.
  253. #
  254. # Mandatory: no
  255. # Default:
  256. # UserParameter=
  257. ####### LOADABLE MODULES #######
  258. ### Option: LoadModulePath
  259. # Full path to location of agent modules.
  260. # Default depends on compilation options.
  261. #
  262. # Mandatory: no
  263. # Default:
  264. # LoadModulePath=${libdir}/modules
  265. ### Option: LoadModule
  266. # Module to load at agent startup. Modules are used to extend functionality of the agent.
  267. # Format: LoadModule=<module.so>
  268. # The modules must be located in directory specified by LoadModulePath.
  269. # It is allowed to include multiple LoadModule parameters.
  270. #
  271. # Mandatory: no
  272. # Default:
  273. # LoadModule=
  274. ####### TLS-RELATED PARAMETERS #######
  275. ### Option: TLSConnect
  276. # How the agent should connect to server or proxy. Used for active checks.
  277. # Only one value can be specified:
  278. # unencrypted - connect without encryption
  279. # psk - connect using TLS and a pre-shared key
  280. # cert - connect using TLS and a certificate
  281. #
  282. # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
  283. # Default:
  284. # TLSConnect=unencrypted
  285. ### Option: TLSAccept
  286. # What incoming connections to accept.
  287. # Multiple values can be specified, separated by comma:
  288. # unencrypted - accept connections without encryption
  289. # psk - accept connections secured with TLS and a pre-shared key
  290. # cert - accept connections secured with TLS and a certificate
  291. #
  292. # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
  293. # Default:
  294. # TLSAccept=unencrypted
  295. ### Option: TLSCAFile
  296. # Full pathname of a file containing the top-level CA(s) certificates for
  297. # peer certificate verification.
  298. #
  299. # Mandatory: no
  300. # Default:
  301. # TLSCAFile=
  302. ### Option: TLSCRLFile
  303. # Full pathname of a file containing revoked certificates.
  304. #
  305. # Mandatory: no
  306. # Default:
  307. # TLSCRLFile=
  308. ### Option: TLSServerCertIssuer
  309. # Allowed server certificate issuer.
  310. #
  311. # Mandatory: no
  312. # Default:
  313. # TLSServerCertIssuer=
  314. ### Option: TLSServerCertSubject
  315. # Allowed server certificate subject.
  316. #
  317. # Mandatory: no
  318. # Default:
  319. # TLSServerCertSubject=
  320. ### Option: TLSCertFile
  321. # Full pathname of a file containing the agent certificate or certificate chain.
  322. #
  323. # Mandatory: no
  324. # Default:
  325. # TLSCertFile=
  326. ### Option: TLSKeyFile
  327. # Full pathname of a file containing the agent private key.
  328. #
  329. # Mandatory: no
  330. # Default:
  331. # TLSKeyFile=
  332. ### Option: TLSPSKIdentity
  333. # Unique, case sensitive string used to identify the pre-shared key.
  334. #
  335. # Mandatory: no
  336. # Default:
  337. # TLSPSKIdentity=
  338. ### Option: TLSPSKFile
  339. # Full pathname of a file containing the pre-shared key.
  340. #
  341. # Mandatory: no
  342. # Default:
  343. # TLSPSKFile=