Nagios批量更换管理员

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29500582/viewspace-2073047/

你可能感兴趣的:(Nagios批量更换管理员)