slatstack 安装 zabbix_agent
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了slatstack 安装 zabbix_agent相关的知识,希望对你有一定的参考价值。
1、创建sls文件 install-rpms: cmd.run: - name: yum install -y autoconf automake imake libxml2-devel expat-devel cmake gcc gcc-c++ libaio libaio-devel bzr bison libtool ncurses5-devel net-snmp\* java-1.7.0-openjdk.x86_64 java-1.7.0-openjdk-devel.x86_64 libxml2 libxml2-devel bzip2 libpng-devel freetype-devel bzip2-devel curl* curl-devel libjpeg\* openjpeg\* install-zabbix_agent: file.managed: - name: /tmp/zabbix-3.0.3.tar.gz - source: salt://init/files/zabbix-3.0.3.tar.gz cmd.run: - name: (id zabbix || useradd -u 600 zabbix) && cd /tmp && tar zxf zabbix-3.0.3.tar.gz && cd zabbix-3.0.3 && ./configure --prefix=/usr/local/zabbix --enable-agent --enable-java && make && make install && mkdir /usr/local/zabbix/log && chown zabbix:zabbix /usr/local/zabbix/log - unless: test -d /usr/local/zabbix config-zabbix_agent: file.managed: - name: /usr/local/zabbix/etc/zabbix_agentd.conf - source: salt://init/files/zabbix_agentd.conf cmd.run: - name: (grep zabbix_agentd /etc/rc.local || echo "/usr/local/zabbix/sbin/zabbix_agentd">>/etc/rc.local) && /usr/local/zabbix/sbin/zabbix_agentd - require: - file: install-zabbix_agent 2、安装zabbix agent:salt-ssh ‘*‘ state.sls init.zabbix_agent
以上是关于slatstack 安装 zabbix_agent的主要内容,如果未能解决你的问题,请参考以下文章