# Metricbeat collects Windows information and Linux information

**URL:** <https://discuss.elastic.co/t/metricbeat-collects-windows-information-and-linux-information/98965>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [August 31, 2017, 8:11am UTC](https://discuss.elastic.co/t/metricbeat-collects-windows-information-and-linux-information/98965 "2017-08-31T08:11:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![caibaoying](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@caibaoying](https://discuss.elastic.co/u/caibaoying)\
**Post date:** [August 31, 2017, 8:11am UTC](https://discuss.elastic.co/t/metricbeat-collects-windows-information-and-linux-information/98965/1 "2017-08-31T08:11:29Z")

</div>

Whether the code uses different functions to collects information on Linux and Windows operating systems? Why the source does not see it for different operating systems call a different function？

If you solved my question, I would be grateful！

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [August 31, 2017, 8:23am UTC](https://discuss.elastic.co/t/metricbeat-collects-windows-information-and-linux-information/98965/2 "2017-08-31T08:23:41Z")

</div>

It calls different functions in some places, take a look to [https://github.com/elastic/beats/tree/master/metricbeat/module/system](https://github.com/elastic/beats/tree/master/metricbeat/module/system), you will see `system_linux.go`, `system_windows.go` and `system_other.go`, the right file is chosen on compile time, when we package for each system

---

<div class="post-metadata">

**Author:** ![caibaoying](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@caibaoying](https://discuss.elastic.co/u/caibaoying)\
**Post date:** [August 31, 2017, 8:35am UTC](https://discuss.elastic.co/t/metricbeat-collects-windows-information-and-linux-information/98965/3 "2017-08-31T08:35:53Z")

</div>

Your answer solve my question, thanks a lot.

---

<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:** [September 28, 2017, 8:36am UTC](https://discuss.elastic.co/t/metricbeat-collects-windows-information-and-linux-information/98965/4 "2017-09-28T08:36:13Z")

</div>

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