# Synthetic Monitoring Private Locations per Agent

**URL:** https://discuss.elastic.co/t/synthetic-monitoring-private-locations-per-agent/378139
**Category:** Kibana
**Created:** [May 14, 2025, 1:01pm UTC](https://discuss.elastic.co/t/synthetic-monitoring-private-locations-per-agent/378139 "2025-05-14T13:01:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![catn0b0t](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catn0b0t/32/122758_2.png) [@catn0b0t](https://discuss.elastic.co/u/catn0b0t)
#### Post date: [May 14, 2025, 1:01pm UTC](https://discuss.elastic.co/t/synthetic-monitoring-private-locations-per-agent/378139/1 "2025-05-14T13:01:52Z")

</div>

Hi,  
We have several fleet policies with with large numbers of agents. Now, we want to run some synthetic monitors on these agents, problem is that the monitor would look different on each host (different url to call, different certificate, ...), so we can't really say "execute this monitor on all hosts in this policy/private location". It would be a huge change for the better if we would somehow be able to have more control over monitors-locations-policies. I see a few possible solutions:

- If we'd be able to define locations on an agent-level instead of the policy level, this would fix the problem.
- If we'd be able to use one location/policy but have the ability to add a condition to only execute the monitor if the agent has name X or has tag Y, then we'd also be able to fix this by creating a monitor for each agent.
- Ultimate solution: It would be pretty awesome if we could define variables/parameters on the fleet policy level and on the agent level. Then the monitor could be built generically and just pickup its agent-specific values from the variables/parameters.

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [May 15, 2025, 5:27am UTC](https://discuss.elastic.co/t/synthetic-monitoring-private-locations-per-agent/378139/2 "2025-05-15T05:27:19Z")

</div>

Hi,

Did you already try to use [params or environment variables](https://www.elastic.co/docs/solutions/observability/synthetics/work-with-params-secrets)?

We have the agent running as a container, so we set the agent specific data as an Openshift Secret which is then provided as an environment variable.

> If you are creating and managing synthetic monitors using a [Synthetics project](https://www.elastic.co/docs/solutions/observability/synthetics/create-monitors-with-projects), you can also use regular environment variables via the standard node `process.env` global object.

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![catn0b0t](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catn0b0t/32/122758_2.png) [@catn0b0t](https://discuss.elastic.co/u/catn0b0t)
#### Post date: [May 15, 2025, 9:14am UTC](https://discuss.elastic.co/t/synthetic-monitoring-private-locations-per-agent/378139/3 "2025-05-15T09:14:56Z")

</div>

Nice! I didn't know we could access the local environment.
