Zabbix Agent 5.0 install for centos | IT运维网
  • 本站启用了账户登录密码错误就锁定模式,如有人误操作被锁请邮件(yvan.lu@ityww.cn)告知我账户名。
  • 本站为个人技术性站点,上面会更新一些系统、网络、存储、虚拟化及云计算等相关的文章,与大家一起参考、学习和交流。
  • 欢迎访问本网站;本站QQ交流群:654792529;如果您觉得本站非常有看点,那么赶紧使用Ctrl+D收藏吧!

Zabbix Agent 5.0 install for centos

Zabbix yvan 3年前 (2021-12-23) 3119次浏览 已收录 0个评论
说明:
1、Agent版本建议跟服务端一致,不推荐高于Server端;
2、CentOS环境国内清华Mirror站点有镜像,因此直接在该Mirror站点取安装包

安装Zabbix Agent客户端

1、在线安装:yum install https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-agent2-5.0.18-1.el7.x86_64.rpm

[root@zabbix-agent ~]# yum install https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-agent2-5.0.18-1.el7.x86_64.rpm
Loaded plugins: fastestmirror
zabbix-agent2-5.0.18-1.el7.x86_64.rpm                                                                                                         | 4.9 MB  00:00:00
Examining /var/tmp/yum-root-Rsu2C1/zabbix-agent2-5.0.18-1.el7.x86_64.rpm: zabbix-agent2-5.0.18-1.el7.x86_64
Marking /var/tmp/yum-root-Rsu2C1/zabbix-agent2-5.0.18-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package zabbix-agent2.x86_64 0:5.0.18-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================
 Package                             Arch                         Version                             Repository                                                Size
=====================================================================================================================================================================
Installing:
 zabbix-agent2                       x86_64                       5.0.18-1.el7                        /zabbix-agent2-5.0.18-1.el7.x86_64                        16 M

Transaction Summary
=====================================================================================================================================================================
Install  1 Package

Total size: 16 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : zabbix-agent2-5.0.18-1.el7.x86_64                                                                                                                 1/1
  Verifying  : zabbix-agent2-5.0.18-1.el7.x86_64                                                                                                                 1/1

Installed:
  zabbix-agent2.x86_64 0:5.0.18-1.el7

Complete!

2、配置zabbix Agent配置文件:vim /etc/zabbix/zabbix_agent2.conf
    Server=192.168.26.51  #定义Zabbix Server端地址
    Hostname=zabbix-agent  #定义Agent端的主机名
Zabbix Agent 5.0 install for centos
Zabbix Agent 5.0 install for centos
3、启动Zabbix Agent并加入自启动:systemctl restart zabbix-agent2 && systemctl enable zabbix-agent2

[root@zabbix-agent ~]# systemctl restart zabbix-agent2 && systemctl enable zabbix-agent2
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent2.service to /usr/lib/systemd/system/zabbix-agent2.service.
[root@zabbix-agent ~]# systemctl status zabbix-agent2
● zabbix-agent2.service - Zabbix Agent 2
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2021-12-24 02:30:13 CST; 54s ago
 Main PID: 1603 (zabbix_agent2)
   CGroup: /system.slice/zabbix-agent2.service
           └─1603 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf

Dec 24 02:30:13 zabbix-agent systemd[1]: Started Zabbix Agent 2.
Dec 24 02:30:13 zabbix-agent zabbix_agent2[1603]: Starting Zabbix Agent 2 [zabbix-agent]. (5.0.18)
Dec 24 02:30:13 zabbix-agent zabbix_agent2[1603]: Press Ctrl+C to exit.

Zabbix Server端添加该主机:配置>>主机>>创建主机

1、配置>>主机>>创建主机
Zabbix Agent 5.0 install for centos
2、主机标签
    主机名称:Agent主机的Hostname/IP;被动模式下IP即可,主动模式下必需Hostname与IP解析对应;
    可见的名称:用于前台显示便于辨识的名称
    群组:从右侧选择(或直接输入关键词下拉菜单选择)已有的群组名称;如没有配套供选择的群组可直接输入自定义名称并自动生成群组;
    Interfaces:客户端
        IP地址:Agent端主机IP地址
        DNS名称:留空
        连接到:IP
        端口:10050
    描述:按需配置
    由agent代理程序监测:无agent代理程序;如分布式(Proxy)模式则选择Zabbix Proxy;
    已启动:勾选
Zabbix Agent 5.0 install for centos
3、模版标签
    链接的模版:显示已选择并关联的模版
    Link new templates:从右侧选择(或直接输入关键词下拉菜单选择)已有的模版名称;
Zabbix Agent 5.0 install for centos
Zabbix Agent 5.0 install for centos


IT运维网 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Zabbix Agent 5.0 install for centos
喜欢 (4)
yvan
关于作者:
聪明来自勤奋、知识在于积累、好记性不如烂键盘!

您必须 登录 才能发表评论!