Linux下一键安装smokeping网络质量监视系统

安装环境:CentOS 7.3 软件版本:Smokeping2.6.9 #!/bin/bash ## write by luoysx ## smokeping on centos7.2 ## check root if [ $UID != 0 ] then echo “you must be root” exit 1 fi cd /root ##替换yum源 wget https://raw.githubusercontent.com/luoysx/shellscript/master/yum.…

Linux下Rsync+Inotify-tools实现数据实时同步

服务器环境:Linux CentOS 7 服务器A:192.168.0.101(客户端) 服务器B:192.168.0.100(服务端) 在服务器A和服务器B上通过yum命令安装软件包: [root@192 ~]# yum -y install rsync inotify-tools 一、在服务器A(客户端)的配置rsync 配置conf文件: [root@192 ~]# vim /etc/rsyncd.conf transfer logging = yes pid file = /var/ru…

Zabbix3.0微信接收监控告警

系统环境:Centos 7.3 软件版本:Zabbix3.0 一、企业微信号注册和使用   企业号注册:https://work.weixin.qq.com/ 二、企业号使用教程 添加员工通讯录 登录新建的企业号,通过提前把企业成员信息添加到组织或者部门,需要填写手机号、微信号或邮箱,通过这样方式让别人扫码关注企业公众号,为了后面企业号推送消息给企业成员。 新增账户,填写信息,红框部分是必须填写的 三、创建应用 企业应用 —-> 自定义应用 —-> 创建应用 …

Zabbix监控TCP端口

安装环境:CentOS 7.3 软件版本:zabbix3.0 创建一个shell文件,写入以下内容,保存后将shell的权限设置成755 [root@120 ~]# vim /etc/zabbix/scripts/discovery_port.sh #!/bin/bash port_array=(`netstat -tnlp|egrep -i “$1″|grep -v “127.0.0.1”|awk {‘print $4′}|awk -F’:’ ‘{if ($NF~/^[0-9]*$/) pri…

Zabbix监控MySQL性能

由于MySQL5.7版本以上在命令行中不允许使用明文密码,所以需要将用户名和密码存在文件中: 认证信息文件内容如下: [client] user=zabbix password=”shengyan777.com”   监控MySQL的shell脚本内容如下: #!/bin/bash # ——————————————————————————- # FileName: check_mys…

Linux系统下快速建立IPIP隧道脚本

测试系统环境:CentOS 7.3 服务器A:1.1.1.1 服务器B:2.2.2.2 在服务器A和服务器B建立一个shell脚本,具体内容如下: [root@1 ~]vim tunadd.sh #!/bin/bash modprobe ipip sip=${SIP} dip=”” tun=${TUN:-tun} net=${NET:-172.16} mode=”n” vp=0; ks=0; while getopts ‘s:d:t:n:x:v’ opt ;do case $opt in x) …