-
Notifications
You must be signed in to change notification settings - Fork 12
onekey_deploy
遇见王斌 edited this page Sep 26, 2017
·
4 revisions
onekey_deploy
├── config
│ ├── deploy-config.monitor---【zabbix server 地址等配置】
│ └── deploy-config.agent-----【zabbix agent 机器地址/用户名/用户密码】
├── deploy_monitor_agent
│ ├── agent
│ │ ├── scripts
│ │ │ └── update_hosts.sh
│ │ └── zabbix_agent_1.0.2.tar.gz
│ ├── config
│ │ ├── sshkey
│ │ │ ├── id_rsa
│ │ │ └── id_rsa.pub
│ │ ├── deploy-config.monitor
│ │ └── deploy-config.agent
│ ├── do-agent-monitor.sh
│ ├── main.sh-----------------【可单独执行,进行安装/重启 agent ,同时可以更新agent中zabbix server地址】
│ ├── README.md
│ └── tools
│ └── sshpass
├── deploy_monitor_server
│ ├── config
│ │ ├── deploy-config.monitor
│ │ └── sshkey
│ │ ├── id_rsa
│ │ └── id_rsa.pub
│ ├── main.sh-----------------【可单独执行,进行安装/配置 server】
│ ├── package
│ │ └── monitor_server1.0.8.tar.gz
│ └── tools
│ └── sshpass
└── start.sh--------------------【总启动程序】
deploy_monitor_agent 可单独部署管理,agent main.sh 具有以下功能
- load_configs 读取配置文件(读取 server IP 以及每台 agent IP)
- install_sshpass 安装 sshpass
- set_ssh_pubkeys 将公钥分发到各个 agent 机器
- set_host_settings 将 zabbix server 的 IP 写入到每个 agent 机器的 host 文件中
- install_agent 安装 zabbix_agent
通过 echo $ip |sed "s/\./_/g 方法可以将 agent 的 IP 变为 xxx_xxx_xxx_xxx 用于 agent 作为主机名
deploy_monitor_server