zabbix-5.0自动发现

1. 安装zabbix5.0
    rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
    yum clean all && yum install zabbix-server-mysql zabbix-agent2

    yum-config-manager --enable rhel-server-rhscl-7-rpms && yum install -y centos-release-scl
    vim /etc/yum.repos.d/zabbix.repo
    [zabbix-frontend]
    name=Zabbix Official Repository frontend - $basearch
    baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
    enabled=1     #打开
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

    yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl  #安装zabbix前端

2. 创建zabbix数据库(mariadb),导入zabbix表
    create database zabbix character set utf8 collate utf8_bin;
    create user zabbix@localhost identified by '123456';
    grant all privileges on zabbix.* to zabbix@localhost;

    zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

3. 修改zabbix_server配置及前端PHP配置
    DBPassword=123456
    vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
    listen 80;
    server_name example.com; #打开注释,修改本机IP

    vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
    listen.acl_users = apache,nginx
    ; php_value[date.timezone] = Europe/Riga  #打开注释,修改为Asia/Shanghai

4. 启动server,agent2,nginx,php,启动之后直接IP访问安装
    systemctl restart zabbix-server zabbix-agent2 rh-nginx116-nginx rh-php72-php-fpm
    systemctl enable zabbix-server zabbix-agent2 rh-nginx116-nginx rh-php72-php-fpm
5. 配置自动发现
    配置自动发现linux
    自动发现-->创建自动发现规则
   https://www.zabbix.com/documentation/5.0/zh/manual/installation/frontend/frontend_on_rhel7

6. 自动发现交换机
    

7. 配置动作
    选择自动发现动作-->创建动作

 

 

原文地址:https://www.cnblogs.com/The-day-of-the-wind/p/14388959.html