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

[Logs onboarding] Getting elastic-agent state in a more reliably way #165205

Conversation

yngrdyn
Copy link
Contributor

@yngrdyn yngrdyn commented Aug 30, 2023

Closes #163163.

We were getting elastic-agent status using human output, this way of obtaining the state is very unreliable since human format it's more likeable to vary from one version to other. e.g

  • v8.0.0
image
  • v8.9.0
image

Changes

  • Get elastic-agent status from json output.

Demo

v8.0.0
Screen.Recording.2023-08-30.at.12.15.22.mov
v8.9.0
Screen.Recording.2023-08-30.at.12.13.46.mov

@yngrdyn yngrdyn added backport release_note:skip Skip the PR/issue when compiling release notes labels Aug 30, 2023
@yngrdyn yngrdyn requested a review from a team as a code owner August 30, 2023 10:08
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Aug 30, 2023

@graphaelli I would appreciate your input here

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@MiriamAparicio MiriamAparicio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.10

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 31, 2023
…lastic#165205)

Closes elastic#163163.

We were getting `elastic-agent` status using `human`
[output](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_7),
this way of obtaining the state is very unreliable since human format
it's more likeable to vary from one version to other. e.g

- v8.0.0
<img width="1021" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/7c8102a4-0785-4ab1-b690-ab62ec67644d">

- v8.9.0
<img width="1026" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/b6acdfbd-6efa-4518-8855-0aba3662f07b">

### Changes
- Get `elastic-agent` status from json output.

#### Demo

##### v8.0.0

https://github.com/elastic/kibana/assets/1313018/6c507269-65d5-4c8a-9e9f-420698ca995d

##### v8.9.0

https://github.com/elastic/kibana/assets/1313018/acdab744-0bd7-43c8-9eb8-024e5a2eeae5
(cherry picked from commit 94bccbc)
yngrdyn added a commit to yngrdyn/kibana that referenced this pull request Aug 31, 2023
…lastic#165205)

Closes elastic#163163.

We were getting `elastic-agent` status using `human`
[output](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_7),
this way of obtaining the state is very unreliable since human format
it's more likeable to vary from one version to other. e.g

- v8.0.0
<img width="1021" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/7c8102a4-0785-4ab1-b690-ab62ec67644d">

- v8.9.0
<img width="1026" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/b6acdfbd-6efa-4518-8855-0aba3662f07b">

### Changes
- Get `elastic-agent` status from json output.

#### Demo

##### v8.0.0

https://github.com/elastic/kibana/assets/1313018/6c507269-65d5-4c8a-9e9f-420698ca995d

##### v8.9.0

https://github.com/elastic/kibana/assets/1313018/acdab744-0bd7-43c8-9eb8-024e5a2eeae5
(cherry picked from commit 94bccbc)
kibanamachine added a commit that referenced this pull request Aug 31, 2023
…ly way (#165205) (#165297)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Logs onboarding] Getting elastic-agent state in a more reliably way
(#165205)](#165205)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Yngrid
Coello","email":"yngrid.coello@elastic.co"},"sourceCommit":{"committedDate":"2023-08-31T08:46:41Z","message":"[Logs
onboarding] Getting elastic-agent state in a more reliably way
(#165205)\n\nCloses
https://github.com/elastic/kibana/issues/163163.\r\n\r\nWe were getting
`elastic-agent` status using
`human`\r\n[output](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_7),\r\nthis
way of obtaining the state is very unreliable since human format\r\nit's
more likeable to vary from one version to other. e.g\r\n\r\n-
v8.0.0\r\n<img width=\"1021\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1313018/7c8102a4-0785-4ab1-b690-ab62ec67644d\">\r\n\r\n-
v8.9.0\r\n<img width=\"1026\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1313018/b6acdfbd-6efa-4518-8855-0aba3662f07b\">\r\n\r\n###
Changes\r\n- Get `elastic-agent` status from json output.\r\n\r\n####
Demo\r\n\r\n#####
v8.0.0\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1313018/6c507269-65d5-4c8a-9e9f-420698ca995d\r\n\r\n\r\n#####
v8.9.0\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1313018/acdab744-0bd7-43c8-9eb8-024e5a2eeae5","sha":"94bccbc6cd689acf79be97176a19ecfbb085c1ac","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.10.0","v8.11.0"],"number":165205,"url":"https://github.com/elastic/kibana/pull/165205","mergeCommit":{"message":"[Logs
onboarding] Getting elastic-agent state in a more reliably way
(#165205)\n\nCloses
https://github.com/elastic/kibana/issues/163163.\r\n\r\nWe were getting
`elastic-agent` status using
`human`\r\n[output](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_7),\r\nthis
way of obtaining the state is very unreliable since human format\r\nit's
more likeable to vary from one version to other. e.g\r\n\r\n-
v8.0.0\r\n<img width=\"1021\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1313018/7c8102a4-0785-4ab1-b690-ab62ec67644d\">\r\n\r\n-
v8.9.0\r\n<img width=\"1026\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1313018/b6acdfbd-6efa-4518-8855-0aba3662f07b\">\r\n\r\n###
Changes\r\n- Get `elastic-agent` status from json output.\r\n\r\n####
Demo\r\n\r\n#####
v8.0.0\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1313018/6c507269-65d5-4c8a-9e9f-420698ca995d\r\n\r\n\r\n#####
v8.9.0\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1313018/acdab744-0bd7-43c8-9eb8-024e5a2eeae5","sha":"94bccbc6cd689acf79be97176a19ecfbb085c1ac"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165205","number":165205,"mergeCommit":{"message":"[Logs
onboarding] Getting elastic-agent state in a more reliably way
(#165205)\n\nCloses
https://github.com/elastic/kibana/issues/163163.\r\n\r\nWe were getting
`elastic-agent` status using
`human`\r\n[output](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_7),\r\nthis
way of obtaining the state is very unreliable since human format\r\nit's
more likeable to vary from one version to other. e.g\r\n\r\n-
v8.0.0\r\n<img width=\"1021\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1313018/7c8102a4-0785-4ab1-b690-ab62ec67644d\">\r\n\r\n-
v8.9.0\r\n<img width=\"1026\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1313018/b6acdfbd-6efa-4518-8855-0aba3662f07b\">\r\n\r\n###
Changes\r\n- Get `elastic-agent` status from json output.\r\n\r\n####
Demo\r\n\r\n#####
v8.0.0\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1313018/6c507269-65d5-4c8a-9e9f-420698ca995d\r\n\r\n\r\n#####
v8.9.0\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/1313018/acdab744-0bd7-43c8-9eb8-024e5a2eeae5","sha":"94bccbc6cd689acf79be97176a19ecfbb085c1ac"}}]}]
BACKPORT-->

Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Aug 31, 2023
…lastic#165205)

Closes elastic#163163.

We were getting `elastic-agent` status using `human`
[output](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_7),
this way of obtaining the state is very unreliable since human format
it's more likeable to vary from one version to other. e.g

- v8.0.0
<img width="1021" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/7c8102a4-0785-4ab1-b690-ab62ec67644d">

- v8.9.0
<img width="1026" alt="image"
src="https://github.com/elastic/kibana/assets/1313018/b6acdfbd-6efa-4518-8855-0aba3662f07b">

### Changes
- Get `elastic-agent` status from json output.

#### Demo

##### v8.0.0


https://github.com/elastic/kibana/assets/1313018/6c507269-65d5-4c8a-9e9f-420698ca995d


##### v8.9.0


https://github.com/elastic/kibana/assets/1313018/acdab744-0bd7-43c8-9eb8-024e5a2eeae5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs onboarding] Elastic agent status always in warning state
5 participants