-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs onboarding] Getting elastic-agent state in a more reliably way #165205
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@graphaelli I would appreciate your input here |
…always-in-warning-state
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…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)
…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)
…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>
…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
Closes #163163.
We were getting
elastic-agent
status usinghuman
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.gChanges
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