Nagios 添加别名
1. 针对check_mk监控的 服务器 : 修改文件:/etc/check_mk/main.mk 添加方法: extra_host_conf["alias"] = [ ( "<ALIAS DESCRITPION", ["<HOSTNAME>"] ) ] 例如: extra_host_conf["alias"] = [ ( "abc", ["11.11.0.103"]) ] 如果添加的别名中含有中文,需要在文件开头申明: #!/usr/bin/python # -*- coding: utf-8 -*- 例如: extra_host_conf["alias"] = [ ( "地铁一号线/高桥站/设备机房/数据库服务器", ["11.11.0.103"]) ] 2. 添加监控机自己的别名: 修改文件:/usr/local/nagios/etc/objects/localhost.cfg 修改内容: 原内容: define host{ use linux-server ; Name of host template to use ...