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
Get the Agent's primary IP, store it and show it in the alerts #2577
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…me>/address". (#2550) * Linux syscollector: retrieve MAC addresses from "/sys/class/net/<ifname>/address". * Fixed wrong fread() call + variable naming convention. * Let Syscollector get a shorter MAC address. Some tunneling interfaces have a shorter MAC, like "00:00:00:00"
chemamartinez
suggested changes
Feb 13, 2019
src/win32/win_agent.c
Outdated
@@ -569,16 +710,33 @@ void send_win32_info(time_t curr_time) | |||
} | |||
} | |||
|
|||
snprintf(label_ip,30,"#\"_agent_ip\":%s",agent_ip); |
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.
We have to fill the label only when agent_ip
exists.
chemamartinez
force-pushed
the
new_wm_control
branch
from
February 13, 2019 16:13
e43e173
to
631d3a7
Compare
chemamartinez
approved these changes
Feb 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the PR for the commit #2199
The goal with this feature is the give to the manager the knowledge of the current primary IP of the agent, updated everytime the agent send a keep alive.
The manager will store that IP in the global database and it will be printed in the Wazuh app.
With that change, although an agent can be registered with any as IP, the manager will know his current IP.
This is how a row from the table
agent
ofglobal.db
of an agent registered with any as IP looks like:And the information is displayed in the Wazuh App like this: