zabbix inventory

2022-09-28

zabbix host_inventory

1、
mysql -uroot -Dzabbixdb -e"select * from hostmacro where values='MEMORY_UTIL_MAX'\G";
mysql -uzabbix -Dzabbix42 -e"select * from interface where hostid not in (select hostid from host_inventory);";
2、
update_host_inventory_from_null.sh
mysql -uzabbix -Dzabbix42 -e"select name,os from host_inventory where name='';";
mysql -uzabbixuser -Dzabbixdb -e"update host_inventory set name='server01',os='Linux' where os='';";
3、insert
mysql -uzabbix -Dzabbix42 -e"insert into host_inventory(hostid,inventory_mode,alias,hardware_full,software_full,contact,location,
notes,host_networks,site_notes,poc_1_notes,poc_2_notes) select hostid,1,ip,'','','','','','','','','' from interface where hostid
not in (select a.hostid from host_inventory a)";

分类:Linux | 标签: |

相关日志

评论被关闭!