遇到的一些错误

master 192.168.88.99
slave 192.168.88.17


               Last_SQL_Error: Error 'Table 'zabbix.history_uint' doesn't exist' on query. Default dat                                       abase: 'zabbix'. Query: 'insert into history_uint (itemid,clock,ns,value) values (30558,1586348082,368                                       403134,26022),(30552,1586348082,369439672,1),(30553,1586348082,374153330,1600),(30566,1586348082,37807                                       4108,2600),(30562,1586348082,387439827,16935),(30567,1586348082,388074908,3),(30560,1586348082,3954718                                       54,1138),(30559,1586348082,404479188,313),(30555,1586348082,411423967,2),(30561,1586348082,419364113,1                                       3279),(30565,1586348082,419952885,1),(30556,1586348082,426486631,1098441083),(30557,1586348082,4342327                                       65,22857777),(30554,1586348082,439578638,2),(30563,1586348082,441860389,0)'
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 1
1 row in set (0.00 sec)

需要把server 的zabbix数据库放到slave上来就可以了

[root@localhost ~]# zabbix_get -s 192.168.88.17 -k mysql_status[slave_status]
ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation
0

给个授权

MariaDB [(none)]> grant all on *.* to 'check'@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

[root@localhost scripts]# cat /etc/zabbix/scripts/check_mysql.sh
#!/bin/bash
case $1 in
        slave_status)
        mysql -ucheck -p123 "show slave status \G;" | grep "Running" | grep "Yes" | awk '{print $2}' | wc -l
        ;;
esac
[root@localhost scripts]# systemctl restart zabbix-agent

在这里插入图片描述

[root@localhost ~]# visudo   #把zabbix加进去
110 # %wheel        ALL=(ALL)       NOPASSWD: ALL
111 zabbix          ALL=(ALL)       NOPASSWD: ALL
[root@localhost zabbix_agentd.d]# pwd
/etc/zabbix/zabbix_agentd.d
[root@localhost zabbix_agentd.d]# cat mysql.conf 
UserParameter=mysql.status[*],sudo /etc/zabbix/scripts/check_mysql.sh $1     #加上sudo
[root@localhost zabbix_agentd.d]# systemctl restart zabbix-agent
[root@localhost yum.repos.d]# zabbix_get -s 192.168.88.8 -k mysql.status[table_size]
420

上传安装包 tar zxf filebeat-6.8.8-linux-x86_64.tar.gz
https://www.elastic.co/cn/downloads/past-releases#filebeat 在这里插入图片描述在这里插入图片描述
vim tar zxf filebeat-6.8.8-linux-x86_64/filebeat.yml
在这里插入图片描述
./filebeat -c filebeat.yml -e

NFS 启动不成功

[root@localhost ~]# showmount -e 192.168.88.8
clnt_create: RPC: Program not registered
解决
[root@localhost ~]# systemctl stop nfs
[root@localhost ~]# systemctl stop rpcbind
Warning: Stopping rpcbind.service, but it can still be activated by:
  rpcbind.socket
[root@localhost ~]# systemctl start rpcbind
[root@localhost ~]# systemctl start nfs
[root@localhost ~]# ss -ntlp | grep rpcbind
LISTEN     0      128          *:111                      *:*                   users:(("rpcbind",pid=40188,fd=4),("systemd",pid=1,fd=45))
LISTEN     0      128       [::]:111                   [::]:*                   users:(("rpcbind",pid=40188,fd=6),("systemd",pid=1,fd=47))
[root@localhost ~]# showmount -e 192.168.88.8
Export list for 192.168.88.8:
/backup 192.168.88.0/24

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

云原生解决方案

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值