# Arguments in K6-operator

**URL:** <https://community.grafana.com/t/arguments-in-k6-operator/98410>\
**Category:** Extensions\
**Created:** [June 7, 2022, 3:27pm UTC](https://community.grafana.com/t/arguments-in-k6-operator/98410 "2022-06-07T15:27:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshayini](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Akshayini](https://community.grafana.com/u/Akshayini)\
**Post date:** [June 7, 2022, 3:27pm UTC](https://community.grafana.com/t/arguments-in-k6-operator/98410/1 "2022-06-07T15:27:41Z")

</div>

Hi,

While using k6-operator to run tests inside a Kubernetes cluster, In the custom resource file I was making use of the arguments “–console-output=log1.txt --out json=RR.json”

Now where are these log1.txt and RR.json files stored and how to access them?

---

<div class="post-metadata">

**Author:** ![olhayevtushenko](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@olhayevtushenko](https://community.grafana.com/u/olhayevtushenko)\
**Post date:** [June 9, 2022, 1:22pm UTC](https://community.grafana.com/t/arguments-in-k6-operator/98410/3 "2022-06-09T13:22:39Z")

</div>

Hi @Akshayini,  
AFAIK, most people using k6-operator are streaming outputs with extensions instead of storing them in local files, but there’re workarounds you can use here. By default, each runner uses `grafana/k6` image under the hood, so these files will be located in home folder of each runner, i.e. `/home/k6`. You can access them inside the container while the test run executes, be it manually with `kubectl exec` or with the logic of custom runner image.

Alternatively, if you’re passing your script as `volumeClaim`, it should be possible to store your output files in the `/test/` folder of that volume too. (I haven’t tried this myself though so needs double checking)

---

<div class="post-metadata">

**Author:** ![Akshayini](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Akshayini](https://community.grafana.com/u/Akshayini)\
**Post date:** [June 9, 2022, 3:48pm UTC](https://community.grafana.com/t/arguments-in-k6-operator/98410/4 "2022-06-09T15:48:18Z")

</div>

Hi Olha,  
Thankyou for the response. Is there a way to send/forward the metrics collected in output file of json to loki-Grafana ?  
We have loki enabled for our application and I would like to stream the metrics we get in a .json out file to loki.  
At the moment i can only send log level data (console data) in loki, but I also want each request metric (Metric, Point) like we get in .json outfile to loki.

---

<div class="post-metadata">

**Author:** ![olhayevtushenko](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@olhayevtushenko](https://community.grafana.com/u/olhayevtushenko)\
**Post date:** [June 10, 2022, 11:44am UTC](https://community.grafana.com/t/arguments-in-k6-operator/98410/5 "2022-06-10T11:44:19Z")

</div>

@Akshayini, yes, you can send k6 metrics similarly, with the help of outputs:

> **[Results output](https://k6.io/docs/get-started/results-output/)**
>
> For basic tests, the top-level summary that k6 provides might be enough. For detailed analysis, you can stream all data your test outputs to an external source.

Some of these outputs are builtin in k6, while others are supported as extensions and then you’ll need a custom binary or image. Specifically for Grafana stack, you should probably look to [Prometheus output](https://k6.io/docs/results-visualization/grafana-cloud).
