Ossec 批量添加agent主机

Ossec 的manage_agents命令默认去 /var/ossec 目录下找主机列表文件,

[root@ossecserver ossec]# pwd

/var/ossec

我们编辑一个需要添加的agent主机的列表,格式如下:

[root@ossecserver ossec]# more addhosts

192.168.1.87,bluehost87

192.168.1.88,bluehost88

192.168.1.89,bluehost89

 

执行批量添加命令:

[root@ossecserver ossec]# /var/ossec/bin/manage_agents -f /addhosts

Bulk load file: /addhosts

Opening: [/addhosts]

Agent information:

ID:004

Name:bluehost87

IP Address:192.168.1.87

 

Agent added.

Agent information:

ID:005

Name:bluehost88

IP Address:192.168.1.88

 

Agent added.

Agent information:

ID:006

Name:bluehost89

IP Address:192.168.1.89

 

Agent added.

滚动至顶部