# Graphing monitor results

**URL:** https://forum.opensearch.org/t/graphing-monitor-results/15618
**Category:** OpenSearch
**Created:** [August 23, 2023, 3:49am UTC](https://forum.opensearch.org/t/graphing-monitor-results/15618 "2023-08-23T03:49:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)
#### Post date: [August 23, 2023, 3:49am UTC](https://forum.opensearch.org/t/graphing-monitor-results/15618/1 "2023-08-23T03:49:28Z")

</div>

**Versions** : 2.9.0

I want to setup a monitor that will essentially run this query /\_nodes/stats/fs?pretty

I want to be able to display storage usage per node in dashboards as well alert on it. How can I do this? Do I parse ctx.results?

Also, can I write the results to an index which be accessed by grafana?

Thanks in advance

---

<div class="post-metadata">

### Author: ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)
#### Post date: [August 23, 2023, 8:09am UTC](https://forum.opensearch.org/t/graphing-monitor-results/15618/2 "2023-08-23T08:09:18Z")

</div>

Maybe you can try to use [prometheus exporter for OpenSearch](https://github.com/aparo/opensearch-prometheus-exporter) to expose all of the metrics, and then use Prometheus + Grafana to store, display the metrics and setup monitors. If you want to store all of the metrics data into your OpenSearch cluster and then display the metrics in OpenSearch-Dashboards and setup monitor by alerting plugin in OpenSearch, you can try to use Logstash or other tools to pull the metrics from the prometheus exporter and then write them to OpenSearch index, there’s a [Logstash plugin](https://github.com/yesmarket/logstash-codec-prometheus/) can do that.

---

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)
#### Post date: [August 23, 2023, 1:18pm UTC](https://forum.opensearch.org/t/graphing-monitor-results/15618/3 "2023-08-23T13:18:08Z")

</div>

Isn’t there a native way of doing things? I read that prometheus exporter is too heavy and affects node performance?

---

<div class="post-metadata">

### Author: ![stecino](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@stecino](https://forum.opensearch.org/u/stecino)
#### Post date: [August 24, 2023, 6:15pm UTC](https://forum.opensearch.org/t/graphing-monitor-results/15618/4 "2023-08-24T18:15:46Z")

</div>

@gaobinlong I have installed the prometheus exporter. What role/cluster permissions I would need to assign the user executing the pull request \_prometheus/metrics against opensearch from prometheus?

---

<div class="post-metadata">

### Author: ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)
#### Post date: [August 25, 2023, 1:54am UTC](https://forum.opensearch.org/t/graphing-monitor-results/15618/5 "2023-08-25T01:54:42Z")

</div>

The permission is `cluster:monitor/prometheus/metrics`, you can see it here: [NodePrometheusMetricsAction](https://github.com/aparo/opensearch-prometheus-exporter/blob/78db5038b802b9eb808f4550e5caba5afce59e5b/src/main/java/org/opensearch/action/NodePrometheusMetricsAction.java#L25). If you don’t want to use the exporter plugin for OpenSearch, you can consider using [this exporter for elasticsearch](https://github.com/prometheus-community/elasticsearch_exporter) which can run independently as a single process, but there maybe some compatibility issue.
