Guest User

zabbix_agent2.conf

a guest
Dec 1st, 2023
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 15.17 KB | None | 0 0
  1. # This is a configuration file for Zabbix agent 2 (Windows)
  2. # To get more information about Zabbix, visit http://www.zabbix.com
  3.  
  4. ############ GENERAL PARAMETERS #################
  5.  
  6. ### Option: LogType
  7. #   Specifies where log messages are written to:
  8. #       file    - file specified with LogFile parameter
  9. #       console - standard output
  10. #
  11. # Mandatory: no
  12. # Default:
  13. # LogType=file
  14.  
  15. ### Option: LogFile
  16. #   Log file name for LogType 'file' parameter.
  17. #
  18. # Mandatory: yes, if LogType is set to file, otherwise no
  19. # Default:
  20. # LogFile=
  21.  
  22. LogFile=C:\monitoring\zabbix\zabbix_agentd.log
  23.  
  24. ### Option: LogFileSize
  25. #   Maximum size of log file in MB.
  26. #   0 - disable automatic log rotation.
  27. #
  28. # Mandatory: no
  29. # Range: 0-1024
  30. # Default:
  31. # LogFileSize=1
  32.  
  33. ### Option: DebugLevel
  34. #   Specifies debug level:
  35. #   0 - basic information about starting and stopping of Zabbix processes
  36. #   1 - critical information
  37. #   2 - error information
  38. #   3 - warnings
  39. #   4 - for debugging (produces lots of information)
  40. #   5 - extended debugging (produces even more information)
  41. #
  42. # Mandatory: no
  43. # Range: 0-5
  44. # Default:
  45. # DebugLevel=3
  46.  
  47. ### Option: SourceIP
  48. #   Source IP address for outgoing connections.
  49. #
  50. # Mandatory: no
  51. # Default:
  52. # SourceIP=
  53.  
  54. ##### Passive checks related
  55.  
  56. ### Option: Server
  57. #   List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.
  58. #   Incoming connections will be accepted only from the hosts listed here.
  59. #   If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
  60. #   and '::/0' will allow any IPv4 or IPv6 address.
  61. #   '0.0.0.0/0' can be used to allow any IPv4 address.
  62. #   Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
  63. #
  64. # Mandatory: yes, if StartAgents is not explicitly set to 0
  65. # Default:
  66. # Server=
  67.  
  68. Server=zabbix.domain.ru
  69.  
  70. ### Option: ListenPort
  71. #   Agent will listen on this port for connections from the server.
  72. #
  73. # Mandatory: no
  74. # Range: 1024-32767
  75. # Default:
  76. ListenPort=10050
  77.  
  78. ### Option: ListenIP
  79. #   List of comma delimited IP addresses that the agent should listen on.
  80. #   First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
  81. #
  82. # Mandatory: no
  83. # Default:
  84. # ListenIP=0.0.0.0
  85.  
  86. ### Option: StatusPort
  87. #   Agent will listen on this port for HTTP status requests.
  88. #
  89. # Mandatory: no
  90. # Range: 1024-32767
  91. # Default:
  92. # StatusPort=
  93.  
  94. ##### Active checks related
  95.  
  96. ### Option: ServerActive
  97. #   Zabbix server/proxy address or cluster configuration to get active checks from.
  98. #   Server/proxy address is IP address or DNS name and optional port separated by colon.
  99. #   Cluster configuration is one or more server addresses separated by semicolon.
  100. #   Multiple Zabbix servers/clusters and Zabbix proxies can be specified, separated by comma.
  101. #   More than one Zabbix proxy should not be specified from each Zabbix server/cluster.
  102. #   If Zabbix proxy is specified then Zabbix server/cluster for that proxy should not be specified.
  103. #   Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed.
  104. #   If port is not specified, default port is used.
  105. #   IPv6 addresses must be enclosed in square brackets if port for that host is specified.
  106. #   If port is not specified, square brackets for IPv6 addresses are optional.
  107. #   If this parameter is not specified, active checks are disabled.
  108. #   Example for Zabbix proxy:
  109. #       ServerActive=127.0.0.1:10051
  110. #   Example for multiple servers:
  111. #       ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
  112. #   Example for high availability:
  113. #       ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051;zabbix.cluster.node3
  114. #   Example for high availability with two clusters and one server:
  115. #       ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051,zabbix.cluster2.node1;zabbix.cluster2.node2,zabbix.domain
  116. #
  117. # Mandatory: no
  118. # Default:
  119. # ServerActive=
  120.  
  121. #ServerActive=127.0.0.1
  122.  
  123. ### Option: Hostname
  124. #   List of comma delimited unique, case sensitive hostnames.
  125. #   Required for active checks and must match hostnames as configured on the server.
  126. #   Value is acquired from HostnameItem if undefined.
  127. #
  128. # Mandatory: no
  129. # Default:
  130. # Hostname=
  131.  
  132. #Hostname=Windows host
  133.  
  134. ### Option: HostnameItem
  135. #   Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
  136. #   Does not support UserParameters or aliases.
  137. #
  138. # Mandatory: no
  139. # Default:
  140. # HostnameItem=system.hostname
  141.  
  142. ### Option: HostMetadata
  143. #   Optional parameter that defines host metadata.
  144. #   Host metadata is used at host auto-registration process.
  145. #   An agent will issue an error and not start if the value is over limit of 2034 bytes.
  146. #   If not defined, value will be acquired from HostMetadataItem.
  147. #
  148. # Mandatory: no
  149. # Range: 0-2034 bytes
  150. # Default:
  151. # HostMetadata=
  152.  
  153. ### Option: HostMetadataItem
  154. #   Optional parameter that defines an item used for getting host metadata.
  155. #   Host metadata is used at host auto-registration process.
  156. #   During an auto-registration request an agent will log a warning message if
  157. #   the value returned by specified item is over limit of 65535 characters.
  158. #   This option is only used when HostMetadata is not defined.
  159. #
  160. # Mandatory: no
  161. # Default:
  162. # HostMetadataItem=
  163.  
  164. ### Option: HostInterface
  165. #   Optional parameter that defines host interface.
  166. #   Host interface is used at host auto-registration process.
  167. #   An agent will issue an error and not start if the value is over limit of 255 characters.
  168. #   If not defined, value will be acquired from HostInterfaceItem.
  169. #
  170. # Mandatory: no
  171. # Range: 0-255 characters
  172. # Default:
  173. # HostInterface=
  174.  
  175. ### Option: HostInterfaceItem
  176. #   Optional parameter that defines an item used for getting host interface.
  177. #   Host interface is used at host auto-registration process.
  178. #   During an auto-registration request an agent will log a warning message if
  179. #   the value returned by specified item is over limit of 255 characters.
  180. #   This option is only used when HostInterface is not defined.
  181. #
  182. # Mandatory: no
  183. # Default:
  184. # HostInterfaceItem=
  185.  
  186. ### Option: RefreshActiveChecks
  187. #   How often list of active checks is refreshed, in seconds.
  188. #
  189. # Mandatory: no
  190. # Range: 60-3600
  191. # Default:
  192. # RefreshActiveChecks=120
  193.  
  194. ### Option: BufferSend
  195. #   Do not keep data longer than N seconds in buffer.
  196. #
  197. # Mandatory: no
  198. # Range: 1-3600
  199. # Default:
  200. # BufferSend=5
  201.  
  202. ### Option: BufferSize
  203. #   Maximum number of values in a memory buffer. The agent will send
  204. #   all collected data to Zabbix Server or Proxy if the buffer is full.
  205. #   Option is not valid if EnablePersistentBuffer=1
  206. #
  207. # Mandatory: no
  208. # Range: 2-65535
  209. # Default:
  210. # BufferSize=100
  211.  
  212. ### Option: EnablePersistentBuffer
  213. #   Enable usage of local persistent storage for active items.
  214. #   0 - disabled, in-memory buffer is used (default); 1 - use persistent buffer
  215. # Mandatory: no
  216. # Range: 0-1
  217. # Default:
  218. # EnablePersistentBuffer=0
  219.  
  220. ### Option: PersistentBufferPeriod
  221. #   Zabbix Agent2 will keep data for this time period in case of no
  222. #   connectivity with Zabbix server or proxy. Older data will be lost. Log data will be preserved.
  223. #   Option is valid if EnablePersistentBuffer=1
  224. #
  225. # Mandatory: no
  226. # Range: 1m-365d
  227. # Default:
  228. # PersistentBufferPeriod=1h
  229.  
  230. ### Option: PersistentBufferFile
  231. #   Full filename. Zabbix Agent2 will keep SQLite database in this file.
  232. #   Option is valid if EnablePersistentBuffer=1
  233. #
  234. # Mandatory: no
  235. # Default:
  236. # PersistentBufferFile=
  237.  
  238. ### Option: HeartbeatFrequency
  239. #   Frequency of heartbeat messages in seconds.
  240. #   Used for monitoring availability of active checks.
  241. #   0 - heartbeat messages disabled.
  242. #
  243. # Mandatory: no
  244. # Range: 0-3600
  245. # Default: 60
  246. # HeartbeatFrequency=
  247.  
  248. ############ ADVANCED PARAMETERS #################
  249.  
  250. ### Option: Alias
  251. #   Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
  252. #   Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
  253. #   Different Alias keys may reference the same item key.
  254. #   For example, to retrieve the ID of user 'zabbix':
  255. #   Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
  256. #   Now shorthand key zabbix.userid may be used to retrieve data.
  257. #   Aliases can be used in HostMetadataItem but not in HostnameItem parameters.
  258. #
  259. # Mandatory: no
  260. # Range:
  261. # Default:
  262.  
  263. ### Option: Timeout
  264. #   Spend no more than Timeout seconds on processing
  265. #
  266. # Mandatory: no
  267. # Range: 1-30
  268. # Default:
  269. # Timeout=3
  270.  
  271. Timeout=15
  272.  
  273. ### Option: Include
  274. #   You may include individual files or all files in a directory in the configuration file.
  275. #   Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
  276. #
  277. # Mandatory: no
  278. # Default:
  279. # Include=
  280.  
  281. # Include=c:\zabbix\zabbix_agent2.userparams.conf
  282. # Include=c:\zabbix\zabbix_agent2.conf.d\
  283. # Include=c:\zabbix\zabbix_agent2.conf.d\*.conf
  284.  
  285. ### Option:PluginTimeout
  286. #   Timeout for connections with external plugins.
  287. #
  288. # Mandatory: no
  289. # Range: 1-30
  290. # Default: <Global timeout>
  291. # PluginTimeout=
  292.  
  293. ### Option:PluginSocket
  294. #   Path to unix socket for external plugin communications.
  295. #
  296. # Mandatory: no
  297. # Default:\\.\pipe\agent.plugin.sock
  298. # PluginSocket=
  299.  
  300. ####### USER-DEFINED MONITORED PARAMETERS #######
  301.  
  302. ### Option: UnsafeUserParameters
  303. #   Allow all characters to be passed in arguments to user-defined parameters.
  304. #   The following characters are not allowed:
  305. #   \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @
  306. #   Additionally, newline characters are not allowed.
  307. #   0 - do not allow
  308. #   1 - allow
  309. #
  310. # Mandatory: no
  311. # Range: 0-1
  312. # Default:
  313. # UnsafeUserParameters=0
  314.  
  315. ### Option: UserParameter
  316. #   User-defined parameter to monitor. There can be several user-defined parameters.
  317. #   Format: UserParameter=<key>,<shell command>
  318. #   See 'zabbix_agentd' directory for examples.
  319. #
  320. # Mandatory: no
  321. # Default:
  322. # UserParameter=
  323.  
  324. ### Option: UserParameterDir
  325. #   Directory to execute UserParameter commands from. Only one entry is allowed.
  326. #   When executing UserParameter commands the agent will change the working directory to the one
  327. #   specified in the UserParameterDir option.
  328. #   This way UserParameter commands can be specified using the relative ./ prefix.
  329. #
  330. # Mandatory: no
  331. # Default:
  332. # UserParameterDir=
  333.  
  334. ### Option: ControlSocket
  335. #   The control socket, used to send runtime commands with '-R' option.
  336. #
  337. # Mandatory: no
  338. # Default:
  339. # ControlSocket=
  340.  
  341. ControlSocket=\\.\pipe\agent.sock
  342.  
  343. ####### TLS-RELATED PARAMETERS #######
  344.  
  345. ### Option: TLSConnect
  346. #   How the agent should connect to server or proxy. Used for active checks.
  347. #   Only one value can be specified:
  348. #       unencrypted - connect without encryption
  349. #       psk         - connect using TLS and a pre-shared key
  350. #       cert        - connect using TLS and a certificate
  351. #
  352. # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
  353. # Default:
  354. # TLSConnect=unencrypted
  355.  
  356. ### Option: TLSAccept
  357. #   What incoming connections to accept.
  358. #   Multiple values can be specified, separated by comma:
  359. #       unencrypted - accept connections without encryption
  360. #       psk         - accept connections secured with TLS and a pre-shared key
  361. #       cert        - accept connections secured with TLS and a certificate
  362. #
  363. # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection)
  364. # Default:
  365. # TLSAccept=unencrypted
  366.  
  367. ### Option: TLSCAFile
  368. #   Full pathname of a file containing the top-level CA(s) certificates for
  369. #   peer certificate verification.
  370. #
  371. # Mandatory: no
  372. # Default:
  373. # TLSCAFile=
  374.  
  375. ### Option: TLSCRLFile
  376. #   Full pathname of a file containing revoked certificates.
  377. #
  378. # Mandatory: no
  379. # Default:
  380. # TLSCRLFile=
  381.  
  382. ### Option: TLSServerCertIssuer
  383. #       Allowed server certificate issuer.
  384. #
  385. # Mandatory: no
  386. # Default:
  387. # TLSServerCertIssuer=
  388.  
  389. ### Option: TLSServerCertSubject
  390. #       Allowed server certificate subject.
  391. #
  392. # Mandatory: no
  393. # Default:
  394. # TLSServerCertSubject=
  395.  
  396. ### Option: TLSCertFile
  397. #   Full pathname of a file containing the agent certificate or certificate chain.
  398. #
  399. # Mandatory: no
  400. # Default:
  401. # TLSCertFile=
  402.  
  403. ### Option: TLSKeyFile
  404. #   Full pathname of a file containing the agent private key.
  405. #
  406. # Mandatory: no
  407. # Default:
  408. # TLSKeyFile=
  409.  
  410. ### Option: TLSPSKIdentity
  411. #   Unique, case sensitive string used to identify the pre-shared key.
  412. #
  413. # Mandatory: no
  414. # Default:
  415. # TLSPSKIdentity=
  416.  
  417. ### Option: TLSPSKFile
  418. #   Full pathname of a file containing the pre-shared key.
  419. #
  420. # Mandatory: no
  421. # Default:
  422. # TLSPSKFile=
  423.  
  424. ####### PLUGIN-SPECIFIC PARAMETERS #######
  425.  
  426. ### Option: Plugins
  427. #   A plugin can have one or more plugin specific configuration parameters in format:
  428. #     Plugins.<PluginName>.<Parameter1>=<value1>
  429. #     Plugins.<PluginName>.<Parameter2>=<value2>
  430. #
  431. # Mandatory: no
  432. # Range:
  433. # Default:
  434.  
  435. ### Option: Plugins.Log.MaxLinesPerSecond
  436. #   Maximum number of new lines the agent will send per second to Zabbix Server
  437. #   or Proxy processing 'log' and 'logrt' checks.
  438. #   The provided value will be overridden by the parameter 'maxlines',
  439. #   provided in 'log' or 'logrt' item keys.
  440. #
  441. # Mandatory: no
  442. # Range: 1-1000
  443. # Default:
  444. # Plugins.Log.MaxLinesPerSecond=20
  445.  
  446. ### Option: Plugins.WindowsEventlog.MaxLinesPerSecond
  447. #   Maximum number of new lines the agent will send per second to Zabbix Server
  448. #   or Proxy processing 'eventlog' checks.
  449. #   The provided value will be overridden by the parameter 'maxlines',
  450. #   provided in 'eventlog' item keys.
  451. #
  452. # Mandatory: no
  453. # Range: 1-1000
  454. # Default:
  455. # Plugins.WindowsEventlog.MaxLinesPerSecond=20
  456.  
  457. ### Option: AllowKey
  458. #   Allow execution of item keys matching pattern.
  459. #   Multiple keys matching rules may be defined in combination with DenyKey.
  460. #   Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments.
  461. #   Parameters are processed one by one according their appearance order.
  462. #   If no AllowKey or DenyKey rules defined, all keys are allowed.
  463. #
  464. # Mandatory: no
  465.  
  466. AllowKey=system.run[*]
  467.  
  468. ### Option: DenyKey
  469. #   Deny execution of items keys matching pattern.
  470. #   Multiple keys matching rules may be defined in combination with AllowKey.
  471. #   Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments.
  472. #   Parameters are processed one by one according their appearance order.
  473. #   If no AllowKey or DenyKey rules defined, all keys are allowed.
  474. #       Unless another system.run[*] rule is specified DenyKey=system.run[*] is added by default.
  475. #
  476. # Mandatory: no
  477. # Default:
  478. # DenyKey=system.run[*]
  479.  
  480. ### Option: Plugins.SystemRun.LogRemoteCommands
  481. #   Enable logging of executed shell commands as warnings.
  482. #   0 - disabled
  483. #   1 - enabled
  484. #
  485. # Mandatory: no
  486. # Default:
  487. # Plugins.SystemRun.LogRemoteCommands=0
  488.  
  489. #Plugins.SystemRun.LogRemoteCommands=1
  490.  
  491. ### Option: ForceActiveChecksOnStart
  492. #   Perform active checks immediately after restart for first received configuration.
  493. #   Also available as per plugin configuration, example: Plugins.Uptime.System.ForceActiveChecksOnStart=1
  494. #
  495. # Mandatory: no
  496. # Range: 0-1
  497. # Default:
  498. # ForceActiveChecksOnStart=0
  499.  
  500. # Include configuration files for plugins
  501. Include=.\zabbix_agent2.d\plugins.d\*.conf
  502.  
Advertisement
Add Comment
Please, Sign In to add comment