如何在管理器服务器上自动注册 OSSEC 代理 ip 地址?

How to automate registering the OSSEC agent ip address on manager server?

我想自动化在 OSSEC 管理器服务器上注册 OSSEC 代理 IP 的过程。我已经探索了许多关于它的 link 和文章,但他们到处都提到使用 /var/ossec/bin/manage_agents 通过提示输入 IP 值。我在下面提到 link 进行设置:https://www.digitalocean.com/community/tutorials/how-to-monitor-ossec-agents-using-an-ossec-server-on-ubuntu-14-04

您可以使用 -a-n 修饰符提供代理的名称和 IP。 例如,添加一个名为“test-agent”的代理,对 IP 没有任何限制,只需 运行:

/var/ossec/bin/manage_agents -a any -n test-agent

然后您可以使用 -e 修饰符提取关键信息并将其导入您的代理。添加代理后需要重启管理器

值得注意的是,Wazuh 是 OSSEC 的一个分支,在过去 5 年中大大改进了原始功能,其中包括 self-registration service which can help you automate the process of agent registration and the installers can leverage this through the use of deployment variables.