Metricbeat MSSQL module has a really high batch req/sec number

I have a question about metricbeat mssql module. The server I use it on has an on average batch req/sec like 5 and max about 60, but the value I receive in elastic and see in Kibana is over 19 millions. I can't figure out what kind of number this is. Example below. I default installation. I changed metricbeat.yml to change index names. In mssql.yml I only set correct servername, username and password.

{
        "_index" : "metricbeat-2022-02-22",
        "_type" : "_doc",
        "_id" : "5ENxIH8BCYRw90fICTz0",
        "_score" : null,
        "fields" : {
          "mssql.performance.batch_requests_per_sec" : [
            19131402
          ],
          "@timestamp" : [
            "2022-02-22T07:59:12.383Z"
          ]
        },
        "sort" : [
          1645516752383
        ]
},
{
        "_index" : "metricbeat-2022-02-22",
        "_type" : "_doc",
        "_id" : "2HZnIH8BAsOAxw_IL_yX",
        "_score" : null,
        "fields" : {
          "mssql.performance.batch_requests_per_sec" : [
            19129762
          ],
          "@timestamp" : [
            "2022-02-22T07:48:26.665Z"
          ]
        },
        "sort" : [
          1645516106665
        ]
      }

@Manoj_S_Shetty this seems to be an integration issue, could you take a look at it?

Hi Tiago, Apology for the Delay in response. Yes I will try to analyze this and get some inputs.

Thank you

Hello @ohs :slight_smile:

Can you paste the below select statement result snapshot, It might help me in some way.

SELECT object_name,
       counter_name,
       instance_name,
       cntr_value,
       cntr_type
FROM   sys.dm_os_performance_counters
WHERE counter_name = 'Batch Requests/sec'

Thank you
Manoj

1 Like

Hi. Here is the result:

object_name counter_name instance_name cntr_value cntr_type
MSSQL$B102655:SQL Statistics Batch Requests/sec 1680140 272696576

Hi @ohs

Can you please tell me the version of MSSQL you are using and what is the Query you are running and you are seeing this "mssql.performance.batch_requests_per_sec" : [ 19131402]

Hi.

MS Sql Server Version
Microsoft SQL Server 2016 (SP3) (KB5003279) - 13.0.6300.2 (X64) Aug 7 2021 01:20:37 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)

The query when I get the result is from the mssql module in metricbeat (mssql.yml) so it's not a query I execute.

Hi,

Tried setting up a MSSQL and exported the MSSQL metrics to Kibana , I Can see below in response:

    "_index" : ".ds-metricbeat-8.1.1-2022.03.23-000001",
        "_id" : "V1oBt38BMkADdcE3q403",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2022-03-23T13:40:13.255Z",
          "metricset" : {
            "name" : "performance",
            "period" : 10000
          },
          "service" : {
            "address" : "sqlserver://localhost:1799",
            "type" : "mssql"
          },
          "mssql" : {
            "performance" : {
              "batch_requests_per_sec" : 3766,
              "page_splits_per_sec" : 78,
              "lock_waits_per_sec" : 3,
              "buffer" : {
                "cache_hit" : { },
                "page_life_expectancy" : { }
              },
              "user_connections" : 12,
              "recompilations_per_sec" : 44,
              "compilations_per_sec" : 682
            }
          },

Looks for me a normal numbers in batch request/sec metrics.

Will you be able to tell me which version of metricbeat you are using?

also can you paste the below in Dev Tools and verify the numbers in the response section

GET /_search
{
  "query": {
    "match_all": {}
  }
}

Hi. I'm grateful for the help so far, but we had to implement another solution so we won't be using metricbeat. Thanks.

Øistein

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