Nagios批量更換管理員

Michael_DD發表於2016-03-31
Nagios批量更換管理員


select * from host where host_alias like "%name%"
select host_name, host_alias from host where host_name LIKE "%172.2.129.61%";

替換:
UPDATE host
SET host_alias = (
REPLACE (
host_alias,
"name1",
"name2"
)
)
WHERE
host_name LIKE "%中心%";

增加:
UPDATE host
SET host_alias = (
concat (
host_alias,
"/name"
)
)
WHERE
host_name LIKE "%129.61%";



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-2073047/,如需轉載,請註明出處,否則將追究法律責任。

相關文章