Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TSDB] Fields with metric type counter not supported when TSDB is enabled #95031

Closed
ritalwar opened this issue Apr 5, 2023 · 7 comments
Closed
Labels
>bug :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@ritalwar
Copy link

ritalwar commented Apr 5, 2023

Elasticsearch Version

v 8.7.0

Installed Plugins

No response

Java Version

bundled

OS Version

Darwin Kernel Version 21.3.0

Problem Description

There is an observation for 2 different scenarios:

Scenario 1: Adding integration with enabling TSDB flag

Behaviour

Error in Dashboards for the fields of metric type counter.

image
Screenshot 2023-04-05 at 1 08 39 PM

Index Mapping is like:

{
        "mssql": {
          "properties": {
            "metrics": {
              "properties": {
                "active_log_size": {
                  "type": "long",
                  "meta": {
                    "unit": "byte"
                  },
                  "time_series_metric": "counter"
                },
                "database_id": {
                  "type": "long"
                },
                "database_name": {
                  "type": "keyword",
                  "time_series_dimension": true
                },
                "instance_name": {
                  "type": "keyword",
                  "time_series_dimension": true
                },
                "log_backup_time": {
                  "type": "date"
                },
                "log_recovery_size": {
                  "type": "long",
                  "meta": {
                    "unit": "byte"
                  },
                  "time_series_metric": "gauge"
                },
          }
        },
}

Scenario 2: Adding Integration without enabling TSDB flag

Behaviour

Dashboards woking fine:

image

Index Mapping is like:

{
        "mssql": {
          "properties": {
            "metrics": {
              "properties": {
                "active_log_size": {
                  "type": "long",
                  "meta": {
                    "unit": "byte"
                  }
                },
                "database_id": {
                  "type": "long"
                },
                "database_name": {
                  "type": "keyword"
                },
                "instance_name": {
                  "type": "keyword"
                },
                "log_backup_time": {
                  "type": "date"
                },
                "log_recovery_size": {
                  "type": "long",
                  "meta": {
                    "unit": "byte"
                  }
                },
            }
          }
        },
}

Enable TSDB Flag:
Dashboard still works fine and index mapping look like:


{
        "mssql": {
          "properties": {
            "metrics": {
              "properties": {
                "active_log_size": {
                  "type": "long",
                  "meta": {
                    "unit": "byte"
                  },
                  "time_series_metric": "counter"
                },
                "database_id": {
                  "type": "long"
                },
                "database_name": {
                  "type": "keyword",
                  "time_series_dimension": true
                },
                "instance_name": {
                  "type": "keyword",
                  "time_series_dimension": true
                },
                "log_backup_time": {
                  "type": "date"
                },
                "log_recovery_size": {
                  "type": "long",
                  "meta": {
                    "unit": "byte"
                  },
                  "time_series_metric": "gauge"
                },
            }
          }
        },
}

Steps to Reproduce

Issue appears when we add any TSDB migrated integration with TSDB flag enabled.
Tested it with 2 integrations i.e MSSQL(Microsoft SQL Server) and RabbitMQ.
Dashboards are distorted with field not found error, for the fields of metric type counter.

Related Issue: #93539

Logs (if relevant)

No response

@ritalwar ritalwar added >bug needs:triage Requires assignment of a team area label :StorageEngine/TSDB You know, for Metrics labels Apr 5, 2023
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) and removed needs:triage Requires assignment of a team area label labels Apr 5, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@ritalwar ritalwar changed the title Fields with metric type counter not supported when TSDB is enabled [TSDB] Fields with metric type counter not supported when TSDB is enabled Apr 5, 2023
@ritalwar
Copy link
Author

ritalwar commented Apr 5, 2023

Also, Please refer:
Screenshot 2023-04-05 at 2 51 20 PM
Screenshot 2023-04-05 at 2 51 55 PM

@martijnvg
Copy link
Member

Is it possible to retrieve the error that occurred in the last screenshot?
I'm trying to figure out what is going on here, and I don't follow why the error in the first screenshot is returned.
With the tsdb is enabled, max aggregation is supported on counter fields. When tsdb is disabled then all aggregations are allowed on counter fields.

@ritalwar
Copy link
Author

ritalwar commented Apr 5, 2023

There is nothing more to the last screenshot.
Just Inspected the Request for the errored lens visualisation shared along and got this.

@lalit-satapathy
Copy link

Duplicate of elastic/kibana#152467

@martijnvg
Copy link
Member

I don't think that this is an Elasticsearch issue. Note that due to integration issue (#93539), the decision was made to not autocomplete counter fields in Kibana. But iirc if counter were to be used directly, then visualizations should be able to work. Work on its way so that in 8.8, counter fields can be autocompleted (elastic/kibana#152912).

@lalit-satapathy
Copy link

Closing as elastic/kibana#152467 is closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

4 participants