Windows
Before installing the agent on the operating systems we support below, you need to download the certificate according to the instructions at Initialize Certificate . The download file will contain the certificates used to authenticate with the vMonitor Logs system. Use this information with the instructions below to complete Agent for Log setup.
Setting
Determine the type of agent you want to install and follow that agent's instructions below:
Filebeat
Unzip the downloaded filebeat folder
Copy the files user.cer.pem, user.key.pem, VNG.trust.pem from the certificate folder to the extracted filebeat folder. Let's say below we have extracted filebeat into a folder
C:\filebeat-8.7.1-windows-x86_64
Manually run the command below with PowerShell
Copy
cd C:\filebeat-8.7.1-windows-x86_64
.\filebeat.exe -c .\filebeat.yml
In which: In the filebeat.yml file, we have set up the example in the download certificate folder as below to push the content of file C:\agent.log to the system.
Copy
filebeat.inputs:
- type: log
paths:
- C:\agent.log
output.kafka:
hosts: ["$BOOTSTRAP_SERVERS"]
topic: $TOPIC
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
ssl.certificate_authorities:
- $PATH_FILE_VNG_TRUST_PEM
ssl.certificate: $PATH_FILE_USER_CER_PEM
ssl.key: $PATH_FILE_USER_KEY_PEM
ssl.verification_mode: "none"
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 7
permissions: 0644
In there:
At
input
the path to the log fileAt
output
, the variables you need to fill in are taken from the certificate download step above:$BOOTSTRAP_SERVERS, $TOPIC
taken from file info.md$PATH_FILE_VNG_TRUST_PEM,$PATH_FILE_USER_CER_PEM,$PATH_FILE_USER_KEY_PEM
is the path to the file VNG.trust.pem user.cer.pem user.key.pem
Install a service that runs in the background:
On powershell when entering the filebeat path
Copy
.\install-service-filebeat.ps1
We recommend that you try running it manually first to identify the problem if there is any.
Copy
cd C:\filebeat-8.7.1-windows-x86_64
.\filebeat.exe -c .\filebeat.yml
Copy
filebeat.inputs:
- type: log
paths:
- C:\agent.log
output.kafka:
hosts: ["$BOOTSTRAP_SERVERS"]
topic: $TOPIC
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
ssl.certificate_authorities:
- $PATH_FILE_VNG_TRUST_PEM
ssl.certificate: $PATH_FILE_USER_CER_PEM
ssl.key: $PATH_FILE_USER_KEY_PEM
ssl.verification_mode: "none"
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 7
permissions: 0644
Copy
.\install-service-filebeat.ps1
Last updated