标签:界面 指令 recv 添加监控项 hosts continue user man 运营
环境:
ip | 设备 |
---|---|
192.168.94.143 | node2监听端 |
192.168.94.141 | node1被监听端 |
受控机安装agentd
[root@node2 ~]# scp zabbix-5.2.6.tar.gz 192.168.94.141:/root
The authenticity of host ‘192.168.94.141 (192.168.94.141)‘ can‘t be established.
ECDSA key fingerprint is SHA256:njAxzS7PXc4MxUEzutpJ3Oe1uKxQKUv12eQwQGTUh/Q.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘192.168.94.141‘ (ECDSA) to the list of known hosts.
root@192.168.94.141‘s password:
zabbix-5.2.6.tar.gz 100% 20MB 145.8MB/s 00:00
[root@node1 ~]# ll
total 20128
-rw-------. 1 root root 1179 Jan 4 00:36 anaconda-ks.cfg
drwxr-xr-x 3 root root 40 Mar 30 23:38 apachescripct
-rw-r--r-- 1 root root 4 Mar 30 23:23 b
-rw-r--r-- 1 root root 20602665 Apr 8 15:21 zabbix-5.2.6.tar.gz
[root@node1 ~]# tar -xf zabbix-5.2.6.tar.gz
[root@node1 ~]# cd zabbix-5.2.6
[root@node1 zabbix-5.2.6]# cd zabbix-5.2.6/
[root@node1 zabbix-5.2.6]# ./configure --enable-agent
[root@node1 zabbix-5.2.6]# make install
//更改zabbix服务器端ip开启主动模式,设置zabbix中识别受监控主机名
[root@node1 zabbix-5.2.6]# sed -i ‘s/^Server=127.0.0.1/Server=192.168.94.143/g‘ /usr/local/etc/zabbix_agentd.conf
[root@node1 ~]# sed -i ‘/^ServerActive/s/=127.0.0.1/=192.168.94.143/g‘ /usr/local/etc/zabbix_agentd.conf
[root@node1 ~]# sed -i ‘/^Hostname=/s/Zabbix server/node1/g‘ /usr/local/etc/zabbix_agentd.conf
[root@node1 ~]# useradd -r -M -s /sbin/nologin zabbix
[root@node1 ~]# zabbix_agentd
[root@node1 ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:10050 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
创建主机
[root@node1 ~]# touch /opt/test
[root@node1 ~]# ll /opt/test
-rw-r--r-- 1 root root 0 Apr 8 16:20 /opt/test
//更改文件
[root@node1 ~]# echo 1 > /opt/test
//更改文件
[root@node1 ~]# echo 1 > /opt/test
标签:界面 指令 recv 添加监控项 hosts continue user man 运营
原文地址:https://www.cnblogs.com/fangxinxin/p/14635311.html