# Run\_from config

**URL:** https://discuss.elastic.co/t/run-from-config/340378
**Category:** Beats
**Tags:** heartbeat
**Created:** [August 8, 2023, 1:32pm UTC](https://discuss.elastic.co/t/run-from-config/340378 "2023-08-08T13:32:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)
#### Post date: [August 8, 2023, 1:32pm UTC](https://discuss.elastic.co/t/run-from-config/340378/1 "2023-08-08T13:32:25Z")

</div>

Simple question here, if I have 10 different monitors setup on a single agent, do I have to duplicate the run\_from section (example below) and specify the id for each of them, or if I exclude the id field, will the run\_from section apply to all?

```auto
heartbeat.run_from:
  id: example1.contoso.com
  geo:
    name: Microsoft HQ
    location: 47.6516, -122.1351
    continent_name: North America
    country_iso_code: US
    region_name: Washington
    region_iso_code: WA
    city_name: Redmond
  id: example2.contoso.com
  geo:
    name: Microsoft HQ
    location: 47.6516, -122.1351
    continent_name: North America
    country_iso_code: US
    region_name: Washington
    region_iso_code: WA
    city_name: Redmond

```

---

<div class="post-metadata">

### Author: ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)
#### Post date: [August 8, 2023, 2:38pm UTC](https://discuss.elastic.co/t/run-from-config/340378/2 "2023-08-08T14:38:19Z")

</div>

Hello there @wwalker - thanks for your interest in Heartbeat!

If you have 10 monitors running on a single Heartbeat instance, and you want all of them to register the same geo data, you can specify `heartbeat.run_from` in your config. In the case of the `run_from` field, the `id` actually corresponds to the _location name_, not the monitor.

So, in your example, I would revise the YAML to look like this:

```yaml
heartbeat.run_from:
  id: microsoft-hq
  geo:
    name: Microsoft HQ
    location: 47.6516, -122.1351
    continent_name: North America
    country_iso_code: US
    region_name: Washington
    region_iso_code: WA
    city_name: Redmond

```

This should cause all 10 of your monitors (defined in the `heartbeat.monitors` field) to register that geo data in their processor metadata. The `id` value you specify here (`microsoft-hq` in the example above) will populate in the `observer.name` field in your Elasticsearch documents, and the rest of the data will be visible under `observer.geo`. It's also possible to specify an individual `run_from` field on monitors configs themselves, if you should want to override the agent-wide geo config for specific checks.

In case you haven't already looked, there are [docs](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-observer-options.html#:~:text=Use%20the%20heartbeat.,setting%20to%20just%20that%20monitor.) for this specific feature.

Please let me know if you have any trouble or further questions, and thanks again for using Heartbeat!

---

<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: [September 5, 2023, 4:39pm UTC](https://discuss.elastic.co/t/run-from-config/340378/3 "2023-09-05T16:39:15Z")

</div>

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