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

[PR] Add agent synchronization statistics #3874

Merged
merged 12 commits into from
Sep 6, 2022

Conversation

asteriscos
Copy link
Member

@asteriscos asteriscos commented Mar 2, 2022

Hi team,

this adds agent synchronization statistics to the Agents Summary view. Also includes agents Pending status to the doughnut chart.

Closes #3402 #3836

Screenshots

Modules Overview

Screenshot from 2022-09-01 18-01-46

Agents Overview

Screenshot from 2022-09-01 18-01-58

Management Status

Screenshot from 2022-09-01 18-02-40

@asteriscos asteriscos changed the base branch from master to 4.3-7.10 March 2, 2022 18:38
@asteriscos asteriscos self-assigned this Mar 2, 2022
@asteriscos asteriscos added the 4.4 label Mar 2, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2022

Jest Test Coverage % values
Statements 4.04% ( 1473 / 36454 )
Branches 1.61% ( 459 / 28440 )
Functions 2.97% ( 264 / 8899 )
Lines 4.09% ( 1425 / 34850 )

@Desvelao Desvelao changed the base branch from 4.3-7.10 to 4.4-7.10 June 24, 2022 08:54
@AlexRuiz7 AlexRuiz7 linked an issue Jul 6, 2022 that may be closed by this pull request
@yenienserrano yenienserrano linked an issue Jul 12, 2022 that may be closed by this pull request
@yenienserrano yenienserrano marked this pull request as ready for review July 12, 2022 07:09
@yenienserrano
Copy link
Member

yenienserrano commented Jul 12, 2022

The endpoint response type has been modified GET /agents/summary/status, so the controllers using this endpoint have been updated.

Test:

  1. Navigate to the following views:
    - Overview
    - Management/Status
    - Agents
  2. The number of agents in the different states should be displayed.
  3. In the agent module, there should be a Synchronized column in the table, indicating whether the agent's configuration is synchronized.

Copy link
Member

@chantal-kelm chantal-kelm left a comment

Choose a reason for hiding this comment

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

CR: ✔️
Test: ✔️

Screenshot from 2022-07-14 12-09-35
Screenshot from 2022-07-14 12-09-48
Screenshot from 2022-07-14 12-10-00

@AlexRuiz7 AlexRuiz7 marked this pull request as draft July 18, 2022 11:50
@AlexRuiz7 AlexRuiz7 requested a review from chantal-kelm July 18, 2022 11:50
@AlexRuiz7 AlexRuiz7 changed the title Add agent synchronization statistics [PR] Add agent synchronization statistics Jul 18, 2022
@AlexRuiz7 AlexRuiz7 marked this pull request as ready for review July 20, 2022 14:37
Copy link
Member

@chantal-kelm chantal-kelm left a comment

Choose a reason for hiding this comment

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

CR: ✔️
Test: ✔️

Screenshot from 2022-07-14 12-09-35
Screenshot from 2022-07-14 12-09-48
Screenshot from 2022-07-14 12-10-00

@Mayons95
Copy link
Contributor

Mayons95 commented Sep 1, 2022

TR ✔️
LGTM !
Test OK
Evidence Attached
Screenshot from 2022-09-01 14-23-33
Screenshot from 2022-09-01 14-23-24
Screenshot from 2022-09-01 14-23-15
Screenshot from 2022-09-01 14-21-23
Screenshot from 2022-09-01 14-21-10
Screenshot from 2022-09-01 14-20-59

@Mayons95 Mayons95 self-requested a review September 1, 2022 17:25
Copy link
Contributor

@Mayons95 Mayons95 left a comment

Choose a reason for hiding this comment

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

TR ✔️

@asteriscos asteriscos merged commit 4457027 into 4.4-7.10 Sep 6, 2022
@asteriscos asteriscos deleted the feat/add-agent-synchronization-statistics-3402 branch September 6, 2022 13:59
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

The backport to 4.4-7.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.4-7.16 4.4-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.4-7.16
# Create a new branch
git switch --create backport-3874-to-4.4-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 44570272566d78fb5ae772b0f9a3061af66171aa
# Push it to GitHub
git push --set-upstream origin backport-3874-to-4.4-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.4-7.16

Then, create a pull request where the base branch is 4.4-7.16 and the compare/head branch is backport-3874-to-4.4-7.16.

github-actions bot pushed a commit that referenced this pull request Sep 6, 2022
* Added Synced stats and pending agents

* Added mocked column synced

* Changed pending position and color

* add agent-synced.tsx

* change date:data

* Update GET /agents/summary/status response handler

* add changelog

* Deprecated is_sync endpoint

* Created synced constants and updated endpoint definitions

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 4457027)
Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

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

  • Code Review: ✔️
  • Test: ✔️

AlexRuiz7 pushed a commit that referenced this pull request Sep 6, 2022
[PR] Add agent synchronization statistics (#3874)

* Added Synced stats and pending agents

* Added mocked column synced

* Changed pending position and color

* add agent-synced.tsx

* change date:data

* Update GET /agents/summary/status response handler

* add changelog

* Deprecated is_sync endpoint

* Created synced constants and updated endpoint definitions

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 4457027)

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
asteriscos added a commit that referenced this pull request Sep 6, 2022
* Added Synced stats and pending agents

* Added mocked column synced

* Changed pending position and color

* add agent-synced.tsx

* change date:data

* Update GET /agents/summary/status response handler

* add changelog

* Deprecated is_sync endpoint

* Created synced constants and updated endpoint definitions

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 4457027)
asteriscos added a commit that referenced this pull request Sep 6, 2022
* Added Synced stats and pending agents

* Added mocked column synced

* Changed pending position and color

* add agent-synced.tsx

* change date:data

* Update GET /agents/summary/status response handler

* add changelog

* Deprecated is_sync endpoint

* Created synced constants and updated endpoint definitions

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 4457027)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants