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

Add support for new mapping parameters for metrics defined in packages #115621

Closed
jsoriano opened this issue Oct 19, 2021 · 5 comments · Fixed by #126322
Closed

Add support for new mapping parameters for metrics defined in packages #115621

jsoriano opened this issue Oct 19, 2021 · 5 comments · Fixed by #126322
Assignees
Labels
QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team v8.2.0

Comments

@jsoriano
Copy link
Member

Describe the feature:

There were previous efforts to add metrics information for time series in meta (see #82273). Since then, new mapping parameters for metrics have been added (elastic/elasticsearch#74014), making metrics and dimensions first-class citizens.

Add the new mapping parameters to the templates installed for packages.

Following the example in #82273, this field definition:

- name: total.norm.pct
  type: scaled_float
  metric_type: gauge
  unit: percent
  format: percent
  description: |
     The percentage of CPU time spent by the process since the last event. This value is normalized by the number of CPU cores and it ranges from 0 to 100%.

Should be translated to:

"system": {
  "properties": {
    "total": {
      "properties": {
        "norm": {
          "properties": {
            "pct": {
              "scaling_factor": 1000,
              "type": "scaled_float",
              "meta": {
                "unit": "percent"
              },
              "time_series_metric": {
                "type": "gauge"
              }
            }
          }
        }
      }
    }

unit can continue in meta, this value would be used by convention only for formatting and there is no setting defined at the mapping level.

Describe a specific use case for the feature:

Use the mapping settings available in elasticsearch for time series data, what will allow to leverage features implemented for this data.

@jsoriano jsoriano added the Team:Fleet Team label for Observability Data Collection Fleet team label Oct 19, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic
Copy link
Contributor

@jsoriano hey, the es issue mentioned aggregations, can it appear in package fields?

@jsoriano
Copy link
Member Author

@jsoriano hey, the es issue mentioned aggregations, can it appear in package fields?

We haven't considered support for custom aggregations yet. I assume this is something optional we can add later if needed.

@juliaElastic
Copy link
Contributor

Copying manual test case here from 8.2 test plan:

time_series_metric mapping for metric_type field:

 "pct": {
    "type": "scaled_float",
    "meta": {
      "metric_type": "gauge",
      "unit": "percent"
     },
     "scaling_factor": 1000,
     "time_series_metric": "gauge"
   }

@amolnater-qasource
Copy link

Hi @juliaElastic
We have revalidated this issue on latest 8.3 BC4 kibana cloud environment and found it fixed.

Steps followed:

  • Install System integration.
  • Navigate to Stack Management/Index Management/Index Templates/metrics-system.memory/Preview tab
  • Observed that index templates has time_series_metric in field mapping for metric_type.

Screenshot:
5

Build details:
BUILD: 53413
COMMIT: 875ea18

Hence marking this as QA:Validated.
Please let us know if we are missing anything.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team v8.2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants