# Get synthetic monitor data: how?

**URL:** https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082
**Category:** Kibana
**Created:** [June 8, 2024, 11:22pm UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082 "2024-06-08T23:22:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)
#### Post date: [June 8, 2024, 11:22pm UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/1 "2024-06-08T23:22:02Z")

</div>

Hi,

How do I get synthetic monitor data shown in Kibana from an API?

Kibana provides cool monitor visualisations and data, such as 'Last 10 Test Runs' (table), 'Duration trends' (graphs), etc.

 ![Screenshot 2024-06-09 at 01.19.03](https://us1.discourse-cdn.com/elastic/original/3X/2/3/235d5ddeec7837976bb4bbea63d02e5dbc30f5a8.png)

There doesn't seem to be a high-level way of retrieving this data from Kibana (at least, not according to [Synthetics APIs | Kibana Guide [8.14] | Elastic](https://www.elastic.co/guide/en/kibana/current/synthetics-apis.html)).

The logical go-to is re-constructing such tables/graphs myself using 'raw' data from Elasticsearch, but I can't tell the query that Kibana used in the first place; when navigating to Observability -\> Explore data, I can open an element in Lens, but no KQL syntax is shown.

 ![Screenshot 2024-06-09 at 01.19.23](https://us1.discourse-cdn.com/elastic/original/3X/6/f/6f2d2bc2bf2933bbab7a2ebb0b027760f60b8bb3.png)

Also, the shown data types (such as the 'Monitor duration' 'report metric' are [Observability-specific](https://www.elastic.co/guide/en/observability/current/exploratory-data-visualizations.html#data-types):

 ![Screenshot 2024-06-09 at 01.20.01](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2bba68a9631b70c8f076a01372fc54d487e16fdb.png)

... so I'm not sure how I would refer to such data types in an API call.

In Lens, I see that a temporary data view is used:

 ![Screenshot 2024-06-09 at 01.20.41](https://us1.discourse-cdn.com/elastic/original/3X/8/7/871a5f67e4ff08cc54943acea8d4ddb143aa67a5.png)

... but opening it doesn't yield any useful information either, except for that Synthetics data is stored in the `synthetics-http-default` data stream:

 ![Screenshot 2024-06-09 at 01.21.00](https://us1.discourse-cdn.com/elastic/original/3X/4/1/417e5dcaf442d7170a9231b2fd91188f2ceb31a3.png)

... which brings me back to pulling data out of Elasticsearch directly.

I hope someone can clear up the confusion!

---

<div class="post-metadata">

### Author: ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)
#### Post date: [June 9, 2024, 12:34am UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/2 "2024-06-09T00:34:20Z")

</div>

> [@NominaSumpta](#):
>
> ... but opening it doesn't yield any useful information either, except for that Synthetics data is stored in the `synthetics-http-default` data stream:

Hello, have you tried first select your data using Dev Tools?

---

<div class="post-metadata">

### Author: ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)
#### Post date: [June 9, 2024, 9:24am UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/3 "2024-06-09T09:24:40Z")

</div>

Hi Alex,

After some more digging, I found I can get to Dev Tools (and find the Elasticsearch query used to construct several 'widgets') by opening the options menu:

 ![Screenshot 2024-06-09 at 15.55.46](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c121cdb9853cc2ddfb6a4fb383f0c46ba1cc1108.png)

... followed by 'More' -\> 'Inspect' -\> 'View: Data' -\> 'Requests' -\> 'Request'.

Furthermore, I saw that Kibana does API calls to endpoints such as `/internal/synthetics/pings`. They're internal, so not meant to be used by systems other than Kibana: [[edited] Calls to Kibana internal APIs require an internal product header · Issue #152287 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/152287). However, I can derive from them the other Elasticsearch requests: [kibana/x-pack/plugins/observability\_solution/synthetics/server/routes/pings/get\_ping\_statuses.ts at 252e035594a4c680cdbf8ef4a1009c62c0ed76a1 · elastic/kibana · GitHub](https://github.com/elastic/kibana/blob/252e035594a4c680cdbf8ef4a1009c62c0ed76a1/x-pack/plugins/observability_solution/synthetics/server/routes/pings/get_ping_statuses.ts#L35C26-L35C36) -\> [kibana/x-pack/plugins/observability\_solution/synthetics/server/common/pings/query\_pings.ts at 252e035594a4c680cdbf8ef4a1009c62c0ed76a1 · elastic/kibana · GitHub](https://github.com/elastic/kibana/blob/252e035594a4c680cdbf8ef4a1009c62c0ed76a1/x-pack/plugins/observability_solution/synthetics/server/common/pings/query_pings.ts#L39)

This begs the question: is the structure of Observability documents stable? In other words: can I get these documents from a non-Kibana system, assuming my implementation won't break?

The same goes for APM.

---

<div class="post-metadata">

### Author: ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)
#### Post date: [June 10, 2024, 11:59am UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/4 "2024-06-10T11:59:56Z")

</div>

Hi @NominaSumpta

If I understood your question correctly, yes, all the information collected is stored in Elasticsearch which, when properly designed, is super robust, scalable, and secure: [https://www.elastic.co/elasticsearch/features](https://www.elastic.co/elasticsearch/features).

As for the information being accessed externally, by creating an API\_key for security reasons, you can access the data like any other index, as in this example of the synthetic-browser-default data:

`  
curl -X POST "${ES\_URL}/.ds-synthetics-browser-default-2024.06.09-000001/\_search?pretty"   
-H "Authorization: ApiKey "${ES\_API\_KEY}""   
-H "Content-Type: application/json"   
-d'  
{  
"query": {  
"match\_all": {}  
}  
}  
'

`

Feel free to continue asking your questions here, share your results, and I suggest creating a separate post for small questions to make the most out of the community's responses.

---

<div class="post-metadata">

### Author: ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)
#### Post date: [June 10, 2024, 12:23pm UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/5 "2024-06-10T12:23:54Z")

</div>

Hi Alex,

I think I was unclear by using the word 'stable'. By 'stable', I'm not talking about the ecosystem or the ELK stack itself, but about the format of Observability documents (those indexed in Elasticsearch). For example, if fields or the contents of fields suddenly change, my consumers would break.

---

<div class="post-metadata">

### Author: ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)
#### Post date: [June 10, 2024, 1:58pm UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/6 "2024-06-10T13:58:27Z")

</div>

> [@NominaSumpta](#):
>
> I think I was unclear by using the word 'stable'. By 'stable', I'm not talking about the ecosystem or the ELK stack itself, but about the format of Observability documents (those indexed in Elasticsearch). For example, if fields or the contents of fields suddenly change, my consumers would break.

Hi William,

Elastic does a good job of maintaining backward compatibility, even to avoid cases like the one you mentioned. However, it's important to actively manage and monitor your schema, and keep up with the evolution of OpenTelemetry to ensure stability for your consumers.

This is my point of view, but I suggest you open a new thread with this question to possibly get information and facts from the development team itself.

---

<div class="post-metadata">

### Author: ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)
#### Post date: [June 10, 2024, 5:03pm UTC](https://discuss.elastic.co/t/get-synthetic-monitor-data-how/361082/7 "2024-06-10T17:03:17Z")

</div>

Done: [Backward compatibility / stability of Observability documents](https://discuss.elastic.co/t/backward-compatibility-stability-of-observability-documents/361183)
