zabbix agent 安装
来源:互联网 发布:手机优化排名 编辑:程序博客网 时间:2024/06/09 20:03
#!/bin/shpath=/opt/zabbixver=http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.4/zabbix-3.0.4.tar.gzwgetp=/usr/local/srcserver=192.168.1.55check=`lsof -i :10050`conf=$path/etc/zabbix_agentd.confname=`ifconfig |grep netmask|grep -v "127.0.0.1"|awk '{print $2}'`user=zabbix##############下载agent源码包############yum -y group install Development Toolsuseradd -M -s /sbin/nologin zabbixyum -y install lsof wget cd $wgetpif [[ -f zabbix-3.0.4.tar.gz ]]; thenecho "文件已存在"cd zabbix-3.0.4./configure --prefix=$path --enable-agentelsewget $vertar -xvzf zabbix-3.0.4.tar.gzcd zabbix-3.0.4./configure --prefix=$path --enable-agentfi#if [[ $? != 0 ]]; then#echo "zabbix install faile pls 检查依赖问题 "#fimake if [[ $? != 0 ]]; thenecho " make failed "fimake installsleep 2 cd $path##############备份zabbix.confcp $conf $conf-$(date +%F)######替换配置文件#############cat << EOF >$confLogFile=/tmp/zabbix_agentd.logServer=$server#ServerActive=$serverHostname=$nameUnsafeUserParameters=1EnableRemoteCommands=1RefreshActiveChecks=300Timeout=5Include=$path/etc/zabbix_agentd.conf.d/EOFchown -R zabbix.zabbix $pathsleep 2./sbin/zabbix_agentd######检测agent是否启动$checkif [[ $? == 0 ]]; thenecho "zabbix is runing"elseecho "zabbix is runing failed"fitailf /tmp/zabbix_agentd.log
附上window安装:
C:\Windows\system32>C:\zabbix_agents\bin\win64\zabbix_agentd.exe -i -c C:\zabbix_agents\conf\zabbix_agentd.win.conf#注意顺序 -i -czabbix_agentd.exe [1468]: service [Zabbix Agent] installed successfullyzabbix_agentd.exe [1468]: event source [Zabbix Agent] installed successfully
windows agent配置文件
LogFile=C:\zabbix_agents\zabbix_agentd.logServer=172.16.100.106#ServerActive=172.16.100.106Hostname=172.16.100.81UnsafeUserParameters=1EnableRemoteCommands=1RefreshActiveChecks=300Timeout=5#Include=c:\zabbix_agents\zabbix_agentd.conf.d\*.conf
0 0
- 安装Zabbix Agent
- ZABBIX agent 安装
- zabbix agent安装配置
- zabbix agent 安装
- Centos6 安装zabbix-agent
- centos7 安装zabbix-agent
- zabbix-agent安装
- Freebsd安装zabbix agent
- zabbix agent 安装
- zabbix agent 安装
- 安装配置zabbix-agent
- [Zabbix] Agent 安装
- centos7安装zabbix-agent
- Windows安装 Zabbix agent
- zabbix-agent安装
- CentOS 安装zabbix-server和zabbix-agent
- zabbix客户端 zabbix-agent 2.4版本安装
- zabbix客户端 zabbix-agent 2.4版本安装
- TP下邮箱验证
- 算法竞赛入门经典 习题2-4 倒三角形(triangle)
- Hyperledger fabric的链码接口整理
- Qt 设置显示通知栏
- Android 7.0 ActivityManagerService(10) App的crash处理
- zabbix agent 安装
- 魔法照片
- 未来之路:年底关于个人职业发展的一点思考-技术是不是青春饭?
- java webservice 简单实例
- px4 多旋翼SITL仿真
- Java 序列化
- Excel:将包含某列部分数据的另一个表格中其它列拷贝至当前表格
- Oracle数据库查询条件使用三元表达式
- 告诉你为什么数据要取对数