# Output to file

**URL:** <https://discuss.elastic.co/t/output-to-file/199720>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [September 16, 2019, 7:45pm UTC](https://discuss.elastic.co/t/output-to-file/199720 "2019-09-16T19:45:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrProfSagi](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@DrProfSagi](https://discuss.elastic.co/u/DrProfSagi)\
**Post date:** [September 16, 2019, 7:45pm UTC](https://discuss.elastic.co/t/output-to-file/199720/1 "2019-09-16T19:45:14Z")

</div>

I am working on monitoring and debugging a closed up secured system, that can only output files to my main network (also not connected to the internet...).  
I have decided to output the metricbeat logs into a file with the output.file option.  
I am using the metricbeat to monitor windows systems, and have installed the metricbeat as a service on the systems with the provided script.

To my problem: i need the output of the metricbeat to go out to a UNC path, meaning to go to a network cifs share, and for the life of me i can not get it to work, i tried any combination of forward and backward backslashes, but i cant get it to work, i always get the mkdir error, and get a partial path in the logs, for example, if my UNC path is \servername\c$\metricbeat, it writes in the log it can not mkdir on \servername at best.

Can someone help please?

---

<div class="post-metadata">

**Author:** ![MarianaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marianad/32/42687_2.png) [@MarianaD](https://discuss.elastic.co/u/MarianaD)\
**Post date:** [September 26, 2019, 7:36am UTC](https://discuss.elastic.co/t/output-to-file/199720/2 "2019-09-26T07:36:32Z")

</div>

hi @DrProfSagi, can you confirm that the user you are running metricbeat as, has access to the network share and the permission to create directory and files?

---

<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:** [October 24, 2019, 7:36am UTC](https://discuss.elastic.co/t/output-to-file/199720/3 "2019-10-24T07:36:32Z")

</div>

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