# MetricBeat on Openshift

**URL:** <https://discuss.elastic.co/t/metricbeat-on-openshift/242795>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 27, 2020, 6:57pm UTC](https://discuss.elastic.co/t/metricbeat-on-openshift/242795 "2020-07-27T18:57:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaikunwar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaikunwar/32/72788_2.png) [@jaikunwar](https://discuss.elastic.co/u/jaikunwar)\
**Post date:** [July 27, 2020, 6:57pm UTC](https://discuss.elastic.co/t/metricbeat-on-openshift/242795/1 "2020-07-27T18:57:23Z")

</div>

I am trying to run metricbeat on openshift using docker file:  
#Docker file:  
FROM docker-secure-com/metricbeat/metricbeat:latest  
COPY metricbeat.yml /etc/metricbeat/config/metricbeat.yml  
COPY metricbeat.yml /etc/metricbeat/metricbeat.yml  
My pod is running. But I have 2 question:  
1\> how to test if metric beat is running/test?  
2\> I run command metric beat by login to pod which gives error as  
sh-4.2$ metricbeat  
2020-07-27 18:56:28.900410413 +0000 UTC m=+0.078453796 write error: failed to make directories for new file: mkdir /var/log/metricbeat: permission denied  
2020-07-27 18:56:28.900509181 +0000 UTC m=+0.078552564 write error: failed to make directories for new file: mkdir /var/log/metricbeat: per

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [July 28, 2020, 8:07am UTC](https://discuss.elastic.co/t/metricbeat-on-openshift/242795/2 "2020-07-28T08:07:09Z")

</div>

You can find details how to run metricbeat in the docker runtime here: [https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html](https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html)

Regarding testing... hm, I believe you can watch the metricbeat process output for ERROR and produced log lines (to see if it's not dead), but it requires a bit of scripting.

---

<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:** [August 25, 2020, 8:16am UTC](https://discuss.elastic.co/t/metricbeat-on-openshift/242795/3 "2020-08-25T08:16:39Z")

</div>

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