# Issue with installing metric beat & collecting data

**URL:** <https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 4, 2022, 2:30pm UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855 "2022-03-04T14:30:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinay\_Menon1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinay_menon1/32/102601_2.png) [@Vinay\_Menon1](https://discuss.elastic.co/u/Vinay_Menon1)\
**Post date:** [March 4, 2022, 2:30pm UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855/1 "2022-03-04T14:30:36Z")

</div>

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

```auto
$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

```

 ![metric_beat](https://us1.discourse-cdn.com/elastic/original/3X/8/0/805e7a1fe821c900ed662aed50d8ec63bdfdb9a6.png)

![yml](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4aefc9e58a3d8e56a5002dbb354cbfa7f2895f92.png)

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,

---

<div class="post-metadata">

**Author:** ![Vinay\_Menon1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinay_menon1/32/102601_2.png) [@Vinay\_Menon1](https://discuss.elastic.co/u/Vinay_Menon1)\
**Post date:** [March 7, 2022, 4:17am UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855/2 "2022-03-07T04:17:12Z")

</div>

Hi.

Please help in above topic

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 7, 2022, 5:47am UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855/3 "2022-03-07T05:47:29Z")

</div>

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 🙂

What do the Metricbeat logs show?

---

<div class="post-metadata">

**Author:** ![Vinay\_Menon1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinay_menon1/32/102601_2.png) [@Vinay\_Menon1](https://discuss.elastic.co/u/Vinay_Menon1)\
**Post date:** [March 7, 2022, 7:41am UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855/4 "2022-03-07T07:41:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 7, 2022, 9:08pm UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855/5 "2022-03-07T21:08:07Z")

</div>

I don't know powershell so I cannot comment.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 4, 2022, 11:08pm UTC](https://discuss.elastic.co/t/issue-with-installing-metric-beat-collecting-data/298855/6 "2022-04-04T23:08:40Z")

</div>

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