# Setting up global parameters

**URL:** <https://community.grafana.com/t/setting-up-global-parameters/96575>\
**Category:** OSS Support\
**Created:** [July 18, 2023, 8:52pm UTC](https://community.grafana.com/t/setting-up-global-parameters/96575 "2023-07-18T20:52:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabh.dwivedi](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@saurabh.dwivedi](https://community.grafana.com/u/saurabh.dwivedi)\
**Post date:** [July 18, 2023, 8:52pm UTC](https://community.grafana.com/t/setting-up-global-parameters/96575/1 "2023-07-18T20:52:12Z")

</div>

Hello,

I am exploring ways to initiate tests on k6 without the need to set the url in each test run.  
For example, I need to set the prometheus remote write url every time when I run the test. But the prometheus URL is not changing unless its a different env. So I want to know if there is a way to setup the URL as global variable and whenever I run the test I don’t need to specify the URL. Is that possible?

> **[Grafana Cloud Prometheus](https://k6.io/docs/results-output/real-time/grafana-cloud-prometheus/#run-the-test)**
>
> How to upload the test result metrics to Grafana Cloud using Grafana Cloud Prometheus and the k6 output for Prometheus remote write'

---

<div class="post-metadata">

**Author:** ![mstoykov](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mstoykov/32/35309_2.png) [@mstoykov](https://community.grafana.com/u/mstoykov)\
**Post date:** [July 24, 2023, 12:43pm UTC](https://community.grafana.com/t/setting-up-global-parameters/96575/5 "2023-07-24T12:43:15Z")

</div>

Hi @saurabh.dwivedi, welcome to the community forum!

Not certain what you are asking specifically but the documentation you have linked to uses environment variables to configure k6.

As such you can just set them globally. The ones in the examples are set only for that 1 command.

I can recommend this [article](https://www3.ntu.edu.sg/home/ehchua/programming/howto/Environment_Variables.html) for some more information on env variables and how to set them including globally.

If that wasn’t your question, can I get some more information as I am not getting it then :(.
