agent.conf.j2 10 KB

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