zoukankan      html  css  js  c++  java
  • zabbix-agent+playbook

    ---
       - hosts: webservers
         tasks:
           - name : '安装zabbix-agent'
             shell: rpm -qa | grep -q zabbix-release || rpm -ivh http://repo.zabbix.com/zabbix/4.4/rhel/6/x86_64/zabbix-release-4.4-1.el6.noarch.rpm
           - name: '安装zabbix-agent'
             yum: name=zabbix-agent state=latest
           - name: '修改分发配置文件'
             template: src=zabbix_agentd.conf dest=/etc/zabbix/zabbix_agentd.conf
             tags: zabbix-agent-conf
             notify: restart-agent
           - name: '关闭防火墙'
             service: name=iptables state=stopped
           - name: '关闭selinux'
             shell: setenforce 0
           - name: '启动zabbix-agent'
             service: name=zabbix-agent     state=started enabled=yes
         handlers:
           - name: restart-agent
              service: name=zabbix-agent state=restarted

    [root@localhost zabbix]# vim zabbix_agentd.conf

    编辑配置文件  

    Server=192.168.202.131
    ServerActive=192.168.202.131 //zabbix-server 主机的ip地址
    

      

      

  • 相关阅读:
    51Nod1528 加号分配
    51Nod1679 连通率
    51Nod1679 连通率
    51Nod1426 沙拉酱括号
    51Nod1426 沙拉酱括号
    51Nod1678 lky与gcd
    51Nod1556 计算
    c学习第2天
    Stopwatch秒表的使用
    数据从.txt文件中导入数据库
  • 原文地址:https://www.cnblogs.com/gaiting/p/12108134.html
Copyright © 2011-2022 走看看