# How can we see the full output /result of a query in Metrcibeat Sql module

**URL:** <https://discuss.elastic.co/t/how-can-we-see-the-full-output-result-of-a-query-in-metrcibeat-sql-module/254239>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 4, 2020, 9:52am UTC](https://discuss.elastic.co/t/how-can-we-see-the-full-output-result-of-a-query-in-metrcibeat-sql-module/254239 "2020-11-04T09:52:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunil18](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@Sunil18](https://discuss.elastic.co/u/Sunil18)\
**Post date:** [November 4, 2020, 9:52am UTC](https://discuss.elastic.co/t/how-can-we-see-the-full-output-result-of-a-query-in-metrcibeat-sql-module/254239/1 "2020-11-04T09:52:49Z")

</div>

I have configured the sql module to get custom metrices using for custom queries from Oracle ,MySQL and PostgreSQL databases.

When I check the output using " metrciebat test modules sql " it does not show me full output like if we have 10 records in table it show me only 1 record. Do we have any such command through which we can see the full output

Also, it shows wrong output for "select sum(bytes/1024/1024/1024) as DB\_SIZE\_GB from dba\_data\_files " query using metrciebat modules where as its shows correct output if i execute this query directly in database.

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [November 5, 2020, 5:44pm UTC](https://discuss.elastic.co/t/how-can-we-see-the-full-output-result-of-a-query-in-metrcibeat-sql-module/254239/2 "2020-11-05T17:44:26Z")

</div>

Hey @Sunil18,

> [@Sunil18](#):
>
> When I check the output using " metrciebat test modules sql " it does not show me full output like if we have 10 records in table it show me only 1 record. Do we have any such command through which we can see the full output

`metricbeat test modules` is intended to test that the module configuration is able to retrieve some data, and it does that by waiting till one event is collected. But it only waits for one event. There is no way at the moment to collect more events, but I think this is a feature that could make sense. Feel free to open an enhancement request in [Sign in to GitHub · GitHub](https://github.com/elastic/beats/issues/new?template=feature-request.md)

An alternative you have is to run metricbeat as you would normally do, but only with the sql module, and with the console output. With a minimal configuration like this:

```auto
metricbeat.modules:
  - module: sql
    metricsets: [query]
    hosts: ['...']
    driver: ...
    sql_query: ...

output.console.pretty: true

```

Then run metricbeat with `metricbeat run -c config.yml -e`, and you should see the logs, with the events that it would collect.

> [@Sunil18](#):
>
> Also, it shows wrong output for "select sum(bytes/1024/1024/1024) as DB\_SIZE\_GB from dba\_data\_files " query using metrciebat modules where as its shows correct output if i execute this query directly in database.

What output does it show, and what would you expect?

---

<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:** [December 3, 2020, 7:44pm UTC](https://discuss.elastic.co/t/how-can-we-see-the-full-output-result-of-a-query-in-metrcibeat-sql-module/254239/3 "2020-12-03T19:44:27Z")

</div>

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