使用salt批量部署zabbix自动发现监控(二)

使用salt批量部署zabbix自动发现监控(二)

查看目录结构 [root@iZbp14ipzpabr30yllskn4Z salt]# tree discovery_port/ discovery_port/ ├── files │ ├── discovery_port.sh │ ├── sudoers.sh │ └── userparameter_discovery_port.conf └── init.sls 1 directory, 4 files [root@iZbp14ipzpabr30yllskn4Z salt]# 查看主配置文件init.sls [root@iZbp14ipzpabr30yllskn4Z salt]# more discovery_port/init.sls ### zabbix mysql config discovery_port: file.managed: - name: /etc/zabbix/zabbix_agentd.d/userparameter_discovery_port.conf - user: root - mode: 755 - source: salt://discovery_port/files/userparameter_discovery_port.conf discovery_port_sh: file.managed: - name: /opt/discovery_port.sh - user: root - mode: 755 - source: salt://discovery_port/files/discovery_port.sh sudoers_manager: file.managed: - name: /opt/sudoers.sh - user: root - mode: 755 - source: salt://discovery_port/files/sudoers. [Read More]