Issue with installing metric beat & collecting data

Hi,

Please help I am trying to execute this PowerShell script in my windows system to get Metricbeat data to elastic but it does not work as intended , The script runs properly by downloading the metric beat file to c:\user\programfile & the service runs & also shows in windows services, but there is no index created when I check stack management -> Index management. I have attached the screenshot of metricbeat that has been downloaded via the script & the yml file it has inside the folder

$Tag = Read-Host "Please enter the tag name for server"
$source = 'https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.14.1-windows-x86_64.zip'
# Destination to save the file
$destination = 'C:\Program Files\metricbeat-7.14.1-windows-x86_64.zip'
#Download the file
Invoke-WebRequest -Uri $source -OutFile $destination
expand-archive -path 'C:\Program Files\metricbeat-7.14.1-windows-x86_64.zip' -destinationpath 'C:\Program Files'
Rename-Item -Path "C:\Program Files\metricbeat-7.14.1-windows-x86_64" -NewName "Metricbeat"
cd 'C:\Program Files\Metricbeat'
PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-metricbeat.ps1
Add-Content 'C:\Program Files\Metricbeat\metricbeat.yml' "`ncloud.id: `"https://cloud_location.com:443`"; "
Add-Content 'C:\Program Files\Metricbeat\metricbeat.yml' "`ncloud.auth: `"abc-metricbeat:password`" "
Add-Content 'C:\Program Files\Metricbeat\metricbeat.yml' "`nsetup.ilm.enabled: false `noutput.elasticsearch.index: `"abc-server-%{+YYYY.MM}`" `nsetup.template.overwrite: true `nsetup.template.enabled: true `nsetup.template.name: `"abc-server`" `nsetup.template.pattern: `"abc-server-*`" "
Add-Content 'C:\Program Files\Metricbeat\metricbeat.yml' "`ntags: [$Tag]"
Add-Content 'C:\Program Files\Metricbeat\metricbeat.yml' "`nspace.id: abc-space"
Start-Service metricbeat

yml

Kindly help & guide me what is wrong & if there is any change required & if any change is required please modify & share I am new to this so please

Thanks,

Hi.

Please help in above topic

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them :slight_smile:

What do the Metricbeat logs show?

Hi Warkolm,

I am not sure about the logs of metricbeat & how to check it there are two codes I have added one is of Powershell above to install metric beat by script. can you check that?

I don't know powershell so I cannot comment.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.