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

[Fleet]: tsdb settings are not greyed out for system-metrics-cpu when the button is not editable by user. #152778

Closed
amolnater-qasource opened this issue Mar 7, 2023 · 9 comments · Fixed by #154048
Assignees
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@amolnater-qasource
Copy link

Kibana version: 8.7 BC4 kibana cloud environment

Host OS and Browser version: All, All

System Integration version: v1.20.9

Build details:

VERSION: 8.7 BC4
BUILD: 60949
COMMIT: de22cd9361a0dbf429f9648d3c7b7c45aa862e90

Preconditions:

  1. 8.7 BC4 kibana cloud environment should be available.
  2. Setup should be done as available under Added Time-series indexing (TSDB) to Integrations Experimental Indexing settings #144974

Steps to reproduce:

  1. Navigate to Fleet and add System v1.20.9 to the agent policy.
  2. Observe under System-Cpu-metrics, tsdb settings are already enabled and user is unable to make any changes.
  3. Observe tsdb settings are not greyed out.

Screen Recording:

ec2-44-197-249-206.compute-1.amazonaws.com.-.Remote.Desktop.Connection.2023-03-07.11-52-05.mp4

Expected Result:
tsdb settings should be greyed out for system-metrics-cpu when the button is not editable by user.

image

@amolnater-qasource amolnater-qasource added bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Fleet Team label for Observability Data Collection Fleet team labels Mar 7, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@amolnater-qasource
Copy link
Author

@manishgupta-qasource Please review.

@manishgupta-qasource
Copy link

Secondary review for this ticket is Done

@juliaElastic
Copy link
Contributor

I think it is expected that TSDB can be toggled off by the users with this change: #149591

@amolnater-qasource
Copy link
Author

Hi @juliaElastic

Thank you for looking into this and sharing the related PR.

We are successfully enable and disable tsdb for System v1.20.5.

However, we are unable to disable the same for v1.20.9 System integration. That's why we have logged this issue specifically for this version.

Could you please confirm if it is expected?

Thanks!

@kpollich
Copy link
Member

kpollich commented Mar 7, 2023

Hi @amolnater-qasource - this is expected in the newer version of system as it enables TSDB on the package side as of elastic/integrations#5160. e.g. the package is enabling TSDB for certain metrics, so the toggle will be "enabled" in the UI but not changeable by the user.

Interestingly, I do not see an entry for v1.20.9 in the integration's changelog, so this may have been a prerelease version: https://github.com/elastic/integrations/blob/main/packages/system/changelog.yml

It's clear that there is some effort to move system metrics over to TSDB as in elastic/integrations#5160, but I actually don't see v1.20.9 tracked in git anywhere.

https://epr.elastic.co/package/system/1.20.9/ is also a 404. Something we should investigate further. But to answer your original question this looks like expected behavior when a package defines index_mode: time_series for a given data stream.

@amolnater-qasource
Copy link
Author

Hi @kpollich

Thank you for the updates.

the package is enabling TSDB for certain metrics, so the toggle will be "enabled" in the UI but not changeable by the user.

According to this we expected the button to be greyed out so that the non-editable fields will be easily differentiated.

Further, the System integration version system-1.20.9 is loaded on setting the registry-package available under section: Testing scenario of enabling TSDB in package spec by default at #144974 (comment)

Registery:
registry-packages.zip

Please let us know if anything else is required from our end.
Thanks!

@kpollich
Copy link
Member

kpollich commented Mar 9, 2023

@amolnater-qasource - Thanks understood! Seems like the EuiSwitch state may be incorrectly set here. Should be checked=false and disabled=true. Will toss this on our bug board 👍

@jillguyonnet jillguyonnet self-assigned this Mar 22, 2023
jillguyonnet added a commit that referenced this issue Apr 12, 2023
### Summary

Disable `Time-series indexing (TSDB)` switch in experimental datastream
settings if TSDB is enabled in the package itself.

As part of this fix, the following changes are included in compliance
with UX rules:
* Rename toggle label from `Time-series indexing (TSDB)` to `Time-series
database (TSDB) indexing`.
* When the toggle is disabled, add a question mark icon with a tooltip
with text `TSDB indexing is enabled by the integration`.

Closes #152778

### Screenshots

#### Before

![Screenshot 2023-04-11 at 17 54
45](https://user-images.githubusercontent.com/23701614/231219749-20f157ab-28bb-48c7-8dfb-982f6361f75d.png)

#### After

When the integration does NOT enable TSDB:
![Screenshot 2023-04-11 at 17 26
04](https://user-images.githubusercontent.com/23701614/231220105-32e165ea-de89-40ae-8ff7-18d8ddc96d66.png)

When the integration DOES enable TSDB:
![Screenshot 2023-04-11 at 17 28
12](https://user-images.githubusercontent.com/23701614/231218852-0e4027c6-464f-4787-8484-68f4b862664a.png)

### Steps to test locally

Refer to the [original
PR](#144974) for extended context.

#### Testing a package without TSDB

1. Run Kibana on this branch.
2. Add the System integration (version 1.5.2 at the time of writing);
under the `Collect metrics from System instances -> System cpu metrics
-> Advanced options` settings, the `Time-series indexing (TSDB)` switch
should be off and enabled (you should be able to toggle it on and off).

#### Testing a package with TSDB

1. Update the system integration to use TSDB and run a local package
registry:
1. In the integrations repo, bump the patch version of the system
integration: add a changelog entry (1.25.3) and update the version
accordingly in the package manifest.
2. In the manifest of the cpu data stream, add the following to enable
TSDB (see [this
doc](https://github.com/elastic/integrations/blob/2abe6f635a27996479fee83203149ba2236dec7a/docs/developer_tsdb_migration_guidelines.md)
for context):
      ```
      elasticsearch:
        index_mode: "time_series"
      ```
3. Build the system integration: `cd packages/system && elastic-package
build`
4. Run a local package registry: `elastic-package stack up -d -v
--services package-registry`
5. Check at https://localhost:8080/search?package=system that the
version is correct (1.5.3).
4. Run Kibana on this branch to test the change:
1. In your `kibana.dev.yml`, add `xpack.fleet.registryUrl:
https://localhost:8080` if not there already.
2. Also in `kibana.dev.yml`, add `xpack.fleet.enableExperimental:
['experimentalDataStreamSettings']` if not there already.
6. Before running `yarn start`, run `export
NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem`
in the same shell. This is to set up the certificate needed to access
EPR with https.
7. In Kibana, add the System integration (check that the version is
correct); under the `Collect metrics from System instances -> System cpu
metrics -> Advanced options` settings, the `Time-series indexing (TSDB)`
switch should be on and disabled. There should be a question mark icon
with a tooltip.

---------

Co-authored-by: kibanamachine <[email protected]>
@amolnater-qasource amolnater-qasource added the QA:Ready for Testing Code is merged and ready for QA to validate label Apr 13, 2023
@amolnater-qasource
Copy link
Author

Hi Team,

We have revalidated this issue on latest 8.8 BC5 Kibana cloud environment and found it fixed now.

Observations:

  • tsdb settings are greyed out for system-metrics-cpu when the button is not editable by user.

Screenshot:
9
10

Build details:

VERSION: 8.8.0 BC5 Kibana cloud environment
BUILD: 63092
COMMIT: ba9b182a3422f5e162c1ca74baafb91833eca059

Hence we are marking this issue as QA:Validated.

Thanks!

@amolnater-qasource amolnater-qasource added QA:Validated Issue has been validated by QA and removed QA:Ready for Testing Code is merged and ready for QA to validate labels May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants