Antony-PB

elastic-agent.yml

Mar 14th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. ###################### Agent Configuration Example #########################
  2.  
  3. # This file is an example configuration file highlighting only the most common
  4. # options. The elastic-agent.reference.yml file from the same directory contains all the
  5. # supported options with more comments. You can use it as a reference.
  6.  
  7. ######################################
  8. # Fleet configuration
  9. ######################################
  10. outputs:
  11. default:
  12. type: elasticsearch
  13. hosts: [127.0.0.1:9200]
  14. api-key: "example-key"
  15. # username: "elastic"
  16. # password: "changeme"
  17.  
  18. inputs:
  19. - type: system/metrics
  20. # Each input must have a unique ID.
  21. id: unique-system-metrics-input
  22. # Namespace name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
  23. # For index naming restrictions, see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params
  24. data_stream.namespace: default
  25. use_output: default
  26. streams:
  27. - metricset: cpu
  28. # Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
  29. data_stream.dataset: system.cpu
  30. - metricset: memory
  31. data_stream.dataset: system.memory
  32. - metricset: network
  33. data_stream.dataset: system.network
  34. - metricset: filesystem
  35. data_stream.dataset: system.filesystem
  36.  
  37. # agent.monitoring:
  38. # # enabled turns on monitoring of running processes
  39. # enabled: true
  40. # # enables log monitoring
  41. # logs: true
  42. # # enables metrics monitoring
  43. # metrics: true
  44. # # exposes /debug/pprof/ endpoints
  45. # # recommended that these endpoints are only enabled if the monitoring endpoint is set to localhost
  46. # pprof.enabled: false
  47. # # exposes agent metrics using http, by default sockets and named pipes are used
  48. # http:
  49. # # enables http endpoint
  50. # enabled: false
  51. # # The HTTP endpoint will bind to this hostname, IP address, unix socket or named pipe.
  52. # # When using IP addresses, it is recommended to only use localhost.
  53. # host: localhost
  54. # # Port on which the HTTP endpoint will bind. Default is 0 meaning feature is disabled.
  55. # port: 6791
  56. # # Metrics buffer endpoint
  57. # buffer.enabled: false
  58.  
  59. # # Allow fleet to reload its configuration locally on disk.
  60. # # Notes: Only specific process configuration will be reloaded.
  61. # agent.reload:
  62. # # enabled configure the Elastic Agent to reload or not the local configuration.
  63. # #
  64. # # Default is true
  65. # enabled: true
  66.  
  67. # # period define how frequent we should look for changes in the configuration.
  68. # period: 10s
  69.  
  70. # management:
  71. # # Mode of management, the Elastic Agent support two modes of operation:
  72. # #
  73. # # local: The Elastic Agent will expect to find the inputs configuration in the local file.
  74. # #
  75. # # Default is local.
  76. # mode: "local"
  77.  
  78. # fleet:
  79. # access_api_key: ""
  80. # kibana:
  81. # # kibana minimal configuration
  82. # hosts: ["localhost:5601"]
  83. # ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
  84.  
  85. # # optional values
  86. # #protocol: "https"
  87. # #service_token: "example-token"
  88. # #path: ""
  89. # #ssl.verification_mode: full
  90. # #ssl.supported_protocols: [TLSv1.0, TLSv1.1, TLSv1.2]
  91. # #ssl.cipher_suites: []
  92. # #ssl.curve_types: []
  93. # reporting:
  94. # # Reporting threshold indicates how many events should be kept in-memory before reporting them to fleet.
  95. # #reporting_threshold: 10000
  96. # # Frequency used to check the queue of events to be sent out to fleet.
  97. # #reporting_check_frequency_sec: 30
  98.  
  99. # agent.download:
  100. # # source of the artifacts, requires elastic like structure and naming of the binaries
  101. # # e.g /windows-x86.zip
  102. # sourceURI: "https://artifacts.elastic.co/downloads/beats/"
  103. # # path to the directory containing downloaded packages
  104. # target_directory: "${path.data}/downloads"
  105. # # timeout for downloading package
  106. # timeout: 120s
  107. # # file path to a public key used for verifying downloaded artifacts
  108. # # if not file is present agent will try to load public key from elastic.co website.
  109. # pgpfile: "${path.data}/elastic.pgp"
  110. # # install_path describes the location of installed packages/programs. It is also used
  111. # # for reading program specifications.
  112. # install_path: "${path.data}/install"
  113.  
  114. # agent.process:
  115. # # timeout for creating new processes. when process is not successfully created by this timeout
  116. # # start operation is considered a failure
  117. # spawn_timeout: 30s
  118. # # timeout for stopping processes. when process is not stopped by this timeout then the process.
  119. # # is force killed
  120. # stop_timeout: 30s
  121.  
  122. # agent.grpc:
  123. # # listen address for the GRPC server that spawned processes connect back to.
  124. # address: localhost
  125. # # port for the GRPC server that spawned processes connect back to.
  126. # port: 6789
  127. # # max_message_size limits the message size in agent internal communication
  128. # # default is 100MB
  129. # max_message_size: 104857600
  130.  
  131. # agent.retry:
  132. # # Enabled determines whether retry is possible. Default is false.
  133. # enabled: true
  134. # # RetriesCount specifies number of retries. Default is 3.
  135. # # Retry count of 1 means it will be retried one time after one failure.
  136. # retriesCount: 3
  137. # # Delay specifies delay in ms between retries. Default is 30s
  138. # delay: 30s
  139. # # MaxDelay specifies maximum delay in ms between retries. Default is 300s
  140. # maxDelay: 5m
  141. # # Exponential determines whether delay is treated as exponential.
  142. # # With 30s delay and 3 retries: 30, 60, 120s
  143. # # Default is false
  144. # exponential: false
  145.  
  146. # Logging
  147.  
  148. # There are four options for the log output: file, stderr, syslog, eventlog
  149. # The file output is the default.
  150.  
  151. # Sets log level. The default log level is info.
  152. # Available log levels are: error, warning, info, debug
  153. #agent.logging.level: info
  154.  
  155. # Enable debug output for selected components. To enable all selectors use ["*"]
  156. # Other available selectors are "beat", "publish", "service"
  157. # Multiple selectors can be chained.
  158. #agent.logging.selectors: [ ]
  159.  
  160. # Send all logging output to stderr. The default is false.
  161. agent.logging.to_stderr: true
  162.  
  163. # Send all logging output to syslog. The default is false.
  164. #agent.logging.to_syslog: false
  165.  
  166. # Send all logging output to Windows Event Logs. The default is false.
  167. #agent.logging.to_eventlog: false
  168.  
  169. # If enabled, Elastic-Agent periodically logs its internal metrics that have changed
  170. # in the last period. For each metric that changed, the delta from the value at
  171. # the beginning of the period is logged. Also, the total values for
  172. # all non-zero internal metrics are logged on shutdown. This setting is also passed
  173. # to beats running under the agent. The default is true.
  174. #agent.logging.metrics.enabled: true
  175.  
  176. # The period after which to log the internal metrics. The default is 30s.
  177. #agent.logging.metrics.period: 30s
  178.  
  179. # Logging to rotating files. Set logging.to_files to false to disable logging to
  180. # files.
  181. #agent.logging.to_files: true
  182. #agent.logging.files:
  183. # Configure the path where the logs are written. The default is the logs directory
  184. # under the home path (the binary location).
  185. #path: /var/log/elastic-agent
  186.  
  187. # The name of the files where the logs are written to.
  188. #name: elastic-agent
  189.  
  190. # Configure log file size limit. If limit is reached, log file will be
  191. # automatically rotated
  192. #rotateeverybytes: 20971520 # = 20MB
  193.  
  194. # Number of rotated log files to keep. Oldest files will be deleted first.
  195. #keepfiles: 7
  196.  
  197. # The permissions mask to apply when rotating log files. The default value is 0600.
  198. # Must be a valid Unix-style file permissions mask expressed in octal notation.
  199. #permissions: 0600
  200.  
  201. # Enable log file rotation on time intervals in addition to size-based rotation.
  202. # Intervals must be at least 1s. Values of 1m, 1h, 24h, 7*24h, 30*24h, and 365*24h
  203. # are boundary-aligned with minutes, hours, days, weeks, months, and years as
  204. # reported by the local system clock. All other intervals are calculated from the
  205. # Unix epoch. Defaults to disabled.
  206. #interval: 0
  207.  
  208. # Rotate existing logs on startup rather than appending to the existing
  209. # file. Defaults to true.
  210. # rotateonstartup: true
  211.  
  212. # Set to true to log messages in JSON format.
  213. #agent.logging.json: false
  214.  
  215. # Providers
  216.  
  217. # Providers supply the key/values pairs that are used for variable substitution
  218. # and conditionals. Each provider's keys are automatically prefixed with the name
  219. # of the provider.
  220.  
  221. #providers:
  222.  
  223. # Agent provides information about the running agent.
  224. # agent:
  225. # enabled: true
  226.  
  227. # Docker provides inventory information from Docker.
  228. # docker:
  229. # enabled: true
  230. # host: "unix:///var/run/docker.sock"
  231. # cleanup_timeout: 60
  232.  
  233. # Env providers information about the running environment.
  234. # env:
  235. # enabled: true
  236.  
  237. # Host provides information about the current host.
  238. # host:
  239. # enabled: true
  240.  
  241. # Local provides custom keys to use as variable.
  242. # local:
  243. # enabled: true
  244. # vars:
  245. # foo: bar
  246.  
  247. # Local dynamic allows you to define multiple key/values to generate multiple configurations.
  248. # local_dynamic:
  249. # enabled: true
  250. # items:
  251. # - vars:
  252. # my_var: key1
  253. # - vars:
  254. # my_var: key2
  255. # - vars:
  256. # my_var: key3
  257.  
  258.  
Advertisement
Add Comment
Please, Sign In to add comment