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

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.

Hey @Sunil18,

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

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:

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.

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

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