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

Get the Agent's primary IP, store it and show it in the alerts #2577

Merged
merged 35 commits into from Feb 14, 2019

Conversation

Skeptor
Copy link
Contributor

@Skeptor Skeptor commented Feb 12, 2019

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 of global.db of an agent registered with any as IP looks like:

image

And the information is displayed in the Wazuh App like this:

image

image

Skeptor and others added 24 commits February 7, 2019 14:53
…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"
@@ -569,16 +710,33 @@ void send_win32_info(time_t curr_time)
}
}

snprintf(label_ip,30,"#\"_agent_ip\":%s",agent_ip);
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants