<commit_before># Installation on windows

1) Download and install node

Download nodejs from [nodejs.org](https://nodejs.org/en/download/) and execute the installer. 

2) Install Logagent and windows event plugin

```
npm i -g @sematext/logagent
npm i -g logagent-input-windows-events
# run logagent windows version 
logagent-windows --help 
```

3) Optional service installer

Create a configuration file for Logagent in 
```
%ProgramData%/Sematext/logagent.conf
```  
(e.g. c:\programfiles\sematext\logagent.conf)

In case you want tostore the configuration file in a different directory, enter the new path in the registry:

```
HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment\LOGAGENT_CONFIG
```

Example config file to collect Windows events to Elasticsearch: 

```
options:
  includeOriginalLine: false
  suppress: true

input:
  windowsEvent:
    module: logagent-input-windows-events 
    # query events every 10 seconds
    intervall: 10
    maxEvents: 1000

output:  
  local-es:
    module: elasticsearch
    url: http://localhost:9200
    index: test1<commit_msg>update path with backslash<commit_after># Installation on windows

1) Download and install node

Download nodejs from [nodejs.org](https://nodejs.org/en/download/) and execute the installer. 

2) Install Logagent and windows event plugin

```
npm i -g @sematext/logagent
npm i -g logagent-input-windows-events
# run logagent windows version 
logagent-windows --help 
```

3) Optional service installer

Create a configuration file for Logagent in 
```
%ProgramData%\Sematext\logagent.conf
```  
(e.g. c:\programfiles\sematext\logagent.conf)

In case you want tostore the configuration file in a different directory, enter the new path in the registry:

```
HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment\LOGAGENT_CONFIG
```

Example config file to collect Windows events to Elasticsearch: 

```
options:
  includeOriginalLine: false
  suppress: true

input:
  windowsEvent:
    module: logagent-input-windows-events 
    # query events every 10 seconds
    intervall: 10
    maxEvents: 1000

output:  
  local-es:
    module: elasticsearch
    url: http://localhost:9200
    index: test1
{'fraction_non_alphanumeric': 0.09119356280733125, 'fraction_numerical': 0.014304872597228431, 'mean_word_length': 4.109589041095891, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '864746', 'n_tokens_mistral': 705, 'n_tokens_neox': 657, 'n_words': 218}