# InfluxDB - How to retrieve differents metrics

**URL:** <https://community.grafana.com/t/influxdb-how-to-retrieve-differents-metrics/57681>\
**Category:** InfluxDB\
**Created:** [December 14, 2021, 2:05pm UTC](https://community.grafana.com/t/influxdb-how-to-retrieve-differents-metrics/57681 "2021-12-14T14:05:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericchampagne1](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/ericchampagne1/32/20281_2.png) [@ericchampagne1](https://community.grafana.com/u/ericchampagne1)\
**Post date:** [December 14, 2021, 2:05pm UTC](https://community.grafana.com/t/influxdb-how-to-retrieve-differents-metrics/57681/1 "2021-12-14T14:05:20Z")

</div>

**Hi all,**

I use Nagios with pnp.  
I would like to make Dashboards more sexy and more dynamics.  
My selection contains _Grafana_, _Elastic Stack_ and _Power BI_.  
For now, i’m trying _Grafana_.  
I have installed _Nagflux_ and now i have an _InfluxDB_ database.

For simple metrics, all works fine.  
But i monitor Memory Usage on my hosts. This check returns different values like memory available, total, used …

 ![2021-12-14_14h37_26](https://us1.discourse-cdn.com/grafana/original/3X/0/c/0ca4b609eebde4cc7913a803148b4baaee7c809c.png)  
In pnp4nagios, graphs are like this:  
 ![2021-12-14_14h35_37](https://us1.discourse-cdn.com/grafana/original/3X/4/8/486e15f37d19d3a935c02d7cfc3fbd1d9ea87b1e.png)  
So, all is correct.

But in Grafana, when i make a query, i only have one metrics.  
My query:

> SELECT first(“value”) FROM “metrics” WHERE (“host” = ‘datacenter-1’ AND “service” = ‘Memory Usage’) AND time \>= now() - 6h and time \<= now() GROUP BY time(15s) fill(null)

It return only **Total memory** metrics.

A **SELECT mean(“value”)** give values which not match anything

> SELECT mean(“value”) FROM “metrics” WHERE (“host” = ‘datacenter-1’ AND “service” = ‘Memory Usage’) AND time \>= now() - 6h and time \<= now() GROUP BY time(15s) fill(null)

Could anyone help me ?  
Thanks
