# Synthetic monitor data to specific indices

**URL:** <https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055>\
**Category:** Elasticsearch\
**Created:** [March 8, 2022, 8:34am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055 "2022-03-08T08:34:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![swchandu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swchandu/32/95295_2.png) [@swchandu](https://discuss.elastic.co/u/swchandu)\
**Post date:** [March 8, 2022, 8:34am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/1 "2022-03-08T08:34:08Z")

</div>

Hi,  
Is it possible to redirect data of synthetic monitoring agent to a specific index?

elk 8

thanks

---

<div class="post-metadata">

**Author:** ![sagarpatel](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarpatel](https://discuss.elastic.co/u/sagarpatel)\
**Post date:** [March 8, 2022, 9:12am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/2 "2022-03-08T09:12:09Z")

</div>

Hi,

Yes you can do this.  
If you are using `heartbeat` then you can set [index](https://www.elastic.co/guide/en/beats/heartbeat/current/elasticsearch-output.html#index-option-es) value in output filter.

But if you change index name then you need to configure the `setup.template.name` and `setup.template.pattern` options as well.

> The index name to write events to when you’re using daily indices. The default is `"heartbeat-%{[agent.version]}-%{+yyyy.MM.dd}"` , for example, `"heartbeat-8.0.1-2022-03-08"` . If you change this setting, you also need to configure the `setup.template.name` and `setup.template.pattern` options (see [_Elasticsearch index template_](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-template.html)).

Using Synthetic Integration from Fleet, it seems like not possible from Integration UI. You can provide your custom namespace name which default value is `default`.

---

<div class="post-metadata">

**Author:** ![swchandu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swchandu/32/95295_2.png) [@swchandu](https://discuss.elastic.co/u/swchandu)\
**Post date:** [March 9, 2022, 1:18pm UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/3 "2022-03-09T13:18:21Z")

</div>

I am able to redirect the data to a specific index. However, unable to view it in uptime monitor with custom indices.  
As soon as I change the default indices from settings, I am getting the following error

### Heartbeat mappings missing

Incorrect mappings detected! Perhaps you forgot to run the heartbeat `setup` command?

You can learn how to troubleshoot this issue in the [docs(opens in a new tab or window)](https://www.elastic.co/guide/en/observability/8.0/troubleshoot-uptime-mapping-issues.html).

Any idea how to solve it

---

<div class="post-metadata">

**Author:** ![sagarpatel](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarpatel](https://discuss.elastic.co/u/sagarpatel)\
**Post date:** [March 10, 2022, 3:03am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/4 "2022-03-10T03:03:09Z")

</div>

Please check this [documentation](https://www.elastic.co/guide/en/observability/current/configure-uptime-settings.html).

> 1. To access this page, go to **Observability \> Uptime**.
> 2. At the top of the page, click **Settings**.
> 3. provide your custom index name in `uptime indices` setting.

---

<div class="post-metadata">

**Author:** ![swchandu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swchandu/32/95295_2.png) [@swchandu](https://discuss.elastic.co/u/swchandu)\
**Post date:** [March 10, 2022, 4:48am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/5 "2022-03-10T04:48:07Z")

</div>

I have already changed and then I am getting that error.

---

<div class="post-metadata">

**Author:** ![sagarpatel](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@sagarpatel](https://discuss.elastic.co/u/sagarpatel)\
**Post date:** [March 10, 2022, 4:53am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/6 "2022-03-10T04:53:16Z")

</div>

> [@swchandu](#):
>
> Incorrect mappings detected!

As error said it is mapping issue, but you need to check logs then only it will be clear. can you please raise seperate quesion for same.

Did you try solution mentioned [here](https://www.elastic.co/guide/en/observability/8.0/troubleshoot-uptime-mapping-issues.html#_mapping_issues).

---

<div class="post-metadata">

**Author:** ![swchandu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swchandu/32/95295_2.png) [@swchandu](https://discuss.elastic.co/u/swchandu)\
**Post date:** [March 10, 2022, 11:37am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/7 "2022-03-10T11:37:38Z")

</div>

## I have tried that . Also tried to do it manually using fields.yml from heartbeat. output.elasticsearch: hosts: '[http://elasticsearch:9200](http://elasticsearch:9200)' username: 'elastic' password: 'elastic' index: "test-heartbeat-%{[agent.version]}-%{+yyyy.MM.dd}" setup.template.name: "test-heartbeat" setup.template.pattern: "test-heartbeat" setup.template.overwrite: true setup.template.fields: /usr/share/heartbeat/fields.yml setup.kibana: host: '[http://elasticsearch:5601](http://elasticsearch:5601)'

$ heartbeat test config  
Config OK  
$ heartbeat test output  
elasticsearch: [http://elasticsearch:9200](http://elasticsearch:9200)...  
parse url... OK  
connection...  
parse host... OK  
dns lookup... OK  
addresses: 10.1.150.98  
dial up... OK  
TLS... WARN secure connection disabled  
talk to server... OK  
version: 8.0.0

$heartbeat setup -e  
{"log.level":"info","@timestamp":"2022-03-10T11:25:12.866Z","log.origin":{"file.name":"instance/beat.go","file.line":679},"message":"Home path: [/usr/share/heartbeat] Config path: [/usr/share/heartbeat] Data path: [/usr/share/heartbeat/data] Logs path: [/usr/share/heartbeat/logs]","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:12.867Z","log.origin":{"file.name":"instance/beat.go","file.line":687},"message":"Beat ID: da9e5d30-9e42-4b38-884b-3f1077a78446","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"warn","@timestamp":"2022-03-10T11:25:15.867Z","log.logger":"add\_cloud\_metadata","log.origin":{"file.name":"add\_cloud\_metadata/provider\_aws\_ec2.go","file.line":80},"message":"read token request for getting IMDSv2 token returns empty: Put "[http://169.254.169.254/latest/api/token\](http://169.254.169.254/latest/api/token%5C)": context deadline exceeded (Client.Timeout exceeded while awaiting headers). No token in the metadata request will be used.","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.868Z","log.logger":"beat","log.origin":{"file.name":"instance/beat.go","file.line":1050},"message":"Beat info","service.name":"heartbeat","system\_info":{"beat":{"path":{"config":"/usr/share/heartbeat","data":"/usr/share/heartbeat/data","home":"/usr/share/heartbeat","logs":"/usr/share/heartbeat/logs"},"type":"heartbeat","uuid":"da9e5d30-9e42-4b38-884b-3f1077a78446"},"ecs.version":"1.6.0"}}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.868Z","log.logger":"beat","log.origin":{"file.name":"instance/beat.go","file.line":1059},"message":"Build info","service.name":"heartbeat","system\_info":{"build":{"commit":"2ab3a7334016f570e0bfc7e9a577a35a22e02df5","libbeat":"8.0.0","time":"2022-02-03T18:08:05.000Z","version":"8.0.0"},"ecs.version":"1.6.0"}}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.868Z","log.logger":"beat","log.origin":{"file.name":"instance/beat.go","file.line":1062},"message":"Go runtime info","service.name":"heartbeat","system\_info":{"go":{"os":"linux","arch":"amd64","max\_procs":4,"version":"go1.17.6"},"ecs.version":"1.6.0"}}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.869Z","log.logger":"beat","log.origin":{"file.name":"instance/beat.go","file.line":1066},"message":"Host info","service.name":"heartbeat","system\_info":{"host":{"architecture":"x86\_64","boot\_time":"2022-02-22T05:56:21Z","containerized":true,"name":"test-heartbeat","ip":["127.0.0.1/8","172.31.0.2/16"],"kernel\_version":"3.10.0-862.el7.x86\_64","mac":["02:42:ac:1f:00:02"],"os":{"type":"linux","family":"debian","platform":"ubuntu","name":"Ubuntu","version":"20.04.3 LTS (Focal Fossa)","major":20,"minor":4,"patch":3,"codename":"focal"},"timezone":"UTC","timezone\_offset\_sec":0},"ecs.version":"1.6.0"}}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.870Z","log.logger":"beat","log.origin":{"file.name":"instance/beat.go","file.line":1095},"message":"Process info","service.name":"heartbeat","system\_info":{"process":{"capabilities":{"inheritable":null,"permitted":["net\_raw"],"effective":["net\_raw"],"bounding":["chown","dac\_override","fowner","fsetid","kill","setgid","setuid","setpcap","net\_bind\_service","net\_raw","sys\_chroot","mknod","audit\_write","setfcap"],"ambient":null},"cwd":"/usr/share/heartbeat","exe":"/usr/share/heartbeat/heartbeat","name":"heartbeat","pid":8184,"ppid":8176,"seccomp":{"mode":"filter"},"start\_time":"2022-03-10T11:25:01.830Z"},"ecs.version":"1.6.0"}}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.870Z","log.origin":{"file.name":"instance/beat.go","file.line":332},"message":"Setup Beat: heartbeat; Version: 8.0.0","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.871Z","log.logger":"esclientleg","log.origin":{"file.name":"eslegclient/connection.go","file.line":105},"message":"elasticsearch url: [http://elasticsearch:9200](http://elasticsearch:9200)","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.871Z","log.logger":"publisher","log.origin":{"file.name":"pipeline/module.go","file.line":113},"message":"Beat name: test-heartbeat","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.871Z","log.logger":"esclientleg","log.origin":{"file.name":"eslegclient/connection.go","file.line":105},"message":"elasticsearch url: [http://elasticsearch:9200](http://elasticsearch:9200)","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.884Z","log.logger":"esclientleg","log.origin":{"file.name":"eslegclient/connection.go","file.line":284},"message":"Attempting to connect to Elasticsearch version 8.0.0","service.name":"heartbeat","ecs.version":"1.6.0"}  
Overwriting ILM policy is disabled. Set `setup.ilm.overwrite: true` for enabling.

{"log.level":"info","@timestamp":"2022-03-10T11:25:15.884Z","log.logger":"index-management","log.origin":{"file.name":"idxmgmt/std.go","file.line":231},"message":"Auto ILM enable success.","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.886Z","log.logger":"index-management.ilm","log.origin":{"file.name":"ilm/std.go","file.line":118},"message":"ILM policy heartbeat exists already.","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.886Z","log.logger":"index-management","log.origin":{"file.name":"idxmgmt/std.go","file.line":366},"message":"Set settings.index.lifecycle.name in template to {heartbeat {"policy":{"phases":{"hot":{"actions":{"rollover":{"max\_age":"30d","max\_size":"50gb"}}}}}}} as ILM is enabled.","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.890Z","log.logger":"template","log.origin":{"file.name":"template/load.go","file.line":198},"message":"Existing template will be overwritten, as overwrite is enabled.","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:15.998Z","log.logger":"template\_loader","log.origin":{"file.name":"template/load.go","file.line":134},"message":"Try loading template test-heartbeat to Elasticsearch","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:16.017Z","log.logger":"template\_loader","log.origin":{"file.name":"template/load.go","file.line":126},"message":"Template with name "test-heartbeat" loaded.","service.name":"heartbeat","ecs.version":"1.6.0"}  
{"log.level":"info","@timestamp":"2022-03-10T11:25:16.017Z","log.logger":"index-management","log.origin":{"file.name":"idxmgmt/std.go","file.line":267},"message":"Loaded index template.","service.name":"heartbeat","ecs.version":"1.6.0"}  
Index setup finished.  
heartbeat@test-heartbeat:~$  
Once this is done, I have created "data view/index pattern" and checked data.  
Then modified uptime -\> settings-\> indices Uptime indices

---

<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:** [April 7, 2022, 11:38am UTC](https://discuss.elastic.co/t/synthetic-monitor-data-to-specific-indices/299055/8 "2022-04-07T11:38:16Z")

</div>

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