# Need to reproduce X-Pack Monitoring's Indexing Rate graph in a Kibana Timelion graph - how?

**URL:** <https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116>\
**Category:** Kibana\
**Tags:** elastic-stack-monitoring\
**Created:** [August 13, 2019, 10:22pm UTC](https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116 "2019-08-13T22:22:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neil\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neil_m/32/43621_2.png) [@Neil\_M](https://discuss.elastic.co/u/Neil_M)\
**Post date:** [August 13, 2019, 10:22pm UTC](https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116/1 "2019-08-13T22:22:10Z")

</div>

I have a need to reproduce both the Search Rate and Indexing Rate graphs from the X-Pack Monitoring application in a timelion graph so that it can be put into a dashboard that can be embedded in an external web page.

I have looked at the fields in the .monitoring index, but cannot figure out how the graphs were built.

Is it possible to reproduce these graphs?

I am currently running Elasticsearch Stack Version 5.3. We are transitioning to the latest ELK 7.x in early 2020, but I need to get this done now with 5.3.

Thanks for your guidance.

Cheers,  
Neil

---

<div class="post-metadata">

**Author:** ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)\
**Post date:** [August 14, 2019, 2:25pm UTC](https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116/2 "2019-08-14T14:25:57Z")

</div>

Hi @Neil_M,

Welcome and great questions!

I'd be happy to show you the code path to figuring out these things, but I'd also like to warn that building manual charts for _system indices_ (which start with `.`) are not officially supported, as we may change the mappings without notice in any release.

> Search Rate

Since this in on the Elasticsearch overview page, we can see those [metrics listed here](https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/monitoring/server/routes/api/v1/elasticsearch/metric_set_overview.js#L8). Then, that is mapped to [this metric here](https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js#L120), which shows the field name is: `indices_stats._all.total.search.query_total`. Once you know that, you can [double check the class definition for the metric](https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js#L140) which will help understand any post processing we might do with the data. For example, a `derivative: true` means the value is a counter and [we use a derivative aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-derivative-aggregation.html).

> Indexing Rate

[Start here](https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/monitoring/server/routes/api/v1/elasticsearch/metric_set_overview.js#L12) then [look here](https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js#L109) and you'll see the field is: `indices_stats._all.total.indexing.index_total`.

Hope this helps and good luck!

---

<div class="post-metadata">

**Author:** ![Neil\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neil_m/32/43621_2.png) [@Neil\_M](https://discuss.elastic.co/u/Neil_M)\
**Post date:** [August 14, 2019, 8:10pm UTC](https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116/3 "2019-08-14T20:10:38Z")

</div>

Thanks @chrisronline for your guidance! I'll dig into that and see where it leads me. I fully understand your point about the risk of using system indices.

---

<div class="post-metadata">

**Author:** ![Neil\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neil_m/32/43621_2.png) [@Neil\_M](https://discuss.elastic.co/u/Neil_M)\
**Post date:** [August 15, 2019, 4:36am UTC](https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116/4 "2019-08-15T04:36:06Z")

</div>

Chris, it worked perfectly! Took a bit to figure out the right timelion functions to use, but I fully replicated the graph. I was also able to overlay the previous day's data, which is quite helpful. Thanks again for your guidance!

---

<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 12, 2019, 4:39am UTC](https://discuss.elastic.co/t/need-to-reproduce-x-pack-monitorings-indexing-rate-graph-in-a-kibana-timelion-graph-how/195116/5 "2019-09-12T04:39:30Z")

</div>

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