This role:
- installs winlogbeat on Windows
- copies prepared configuration file (log path, connect to elasticsearch etc.)
- [Optional] Create folder(s) for custom paths
- Install winlogbeat
- Copy configuration file
- Minimal Version of the ansible for installation: 2.8
- Supported OS:
- Windows
- 2016
- 2019
- Windows
You can override any variable below by setting "variable: value" in playbook.
winlogbeat_versionIs used to select main Winlogbeat branch to be installed. Default value is7.winlogbeat_last_versionIs used to select specific Winlogbeat version to be installed. Default value is7.4.2winlogbeat_node_nameName of the winlogbeat node. Default value is{{ inventory_hostname }}. If this options is not defined, the hostname is used.winlogbeat_ssl_enabledTurns on/off SSL connection between winlogbeat and logstash/elasticsearch. SSL options should be set by corresponding dict fields like shown below:
ssl:
key: 'c:\tls\private\server.key'
certificate: 'c:\tls\certs\server.pem'
certificate_authorities: 'c:\CA\ca-root.pem'The path section of the configuration options defines where Winlogbeat looks for its files. For example, Winlogbeat looks for the Elasticsearch template file in the configuration path and writes log files in the logs path. Winlogbeat looks for its registry files in the data path. Default values for Linux host are set up this way:
path:
home: 'c:\program files\winlogbeat'
config: 'c:\program files\winlogbeat'
data: 'c:\programdata\winlogbeat'
logs: 'c:\programdata\winlogbeat\logs'win_download_pathTemp directory for Windows to download and upzip Winlogbeat package. Default value is'{{ ansible_env.TEMP }}/winlogbeat'(ansible_env.TEMP value solves idempotence issue)
-
winlogbeat_outputIs used to configure what output to use when sending data (elasticsearchorlogstash). Default value iselasticsearch -
elasticsearch.hostArray of hosts to connect to. Default value islocalhost -
elasticsearch.portValue for setting custom port. Default value is9200 -
logstash.hostArray of hosts to connect to. Default value islocalhost -
logstash.portValue for setting custom port. Default value is5044
The winlogbeat(systemd)\initd section of the configuration options defines which init script will be used to manage winlogbeat service depending on the *nix OS. Custom paths will be taken into account (if configured).
-
winlogbeat_service_nameName of nssm\init script, which manages winlogbeat service -
winlogbeat_bulk_max_sizeMaximum number of events to bulk in a single Logstash request. Default value is500 -
winlogbeat_workerNumber of workers per Elasticsearch host. Default value is1 -
winlogbeat_logging_to_syslogSend all logging output to syslog. Default value isfalse -
winlogbeat_logging_to_filesSend all logging output to rotating files. Default value istrue -
winlogbeat_rotateeverybytesDefines log file size limit. Defalt value is104857600=100MB -
winlogbeat_keepfilesNumber of log files to keep. Default value is30 -
winlogbeat_ignore_olderValue (any time strings like 2h, 5m can be used) above which logs will be ignored. Default value is0(disabled) -
winlogbeat_lognameName of the logging files. Default value is"winlogbeat.log"
ca-cert (only for installation with SSL)
- name: Install winlogbeat
hosts: all
roles:
- role: lean_delivery.winlogbeatApache
authors:
- Lean Delivery Team team@lean-delivery.com