摘要: 方案(一) 思路:将字典的元素转换成元组,用元组的默认排序方式比较 >>> from random import randint >>> d = {x:randint(60,100) for x in 'abcdef'} >>> d {'a': 69, 'c': 76, 'b': 69, 'e': 阅读全文
posted @ 2020-09-23 12:40 Edward_han 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 列表解析 生成一个随机列表,筛选出正数 >>> data = [randint(-10,10) for x in range(0,10)] >>> data [-8, -1, 9, -3, -3, -4, 7, 8, -3, 1] >>> [x for x in data if x>0] [9, 7 阅读全文
posted @ 2020-09-23 12:37 Edward_han 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 捕获式监控既不属于主动也不属于被动式监控,监控服务器回捕获来自被监控端发来的数据,即使被监控端没有安装agent 比如本方式可以获取被监控端contab发来的数据 先编辑一个item,类型为Zabbix trapper 在一台计算机中里安装zabbix_sender向zabbix server发送数 阅读全文
posted @ 2020-09-23 12:31 Edward_han 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 举例说明 打开nginx的状态信息,在配置文件/etc/nginx/nginx.conf中添加如下代码 location /status { stub_status on; } 重启nginx 访问状态信息页面 [root@localhost ~]# curl http://10.10.101.10 阅读全文
posted @ 2020-09-23 12:30 Edward_han 阅读(233) 评论(0) 推荐(0) 编辑
摘要: # cd /opt/dockerfile/web/ # ls apache jdk nginx tomcat # mkdir haproxy # cd haproxy/ 添加配置文件haproxy.cfg 修改配置文件haproxy.cfg # vim haproxy.cfg global maxc 阅读全文
posted @ 2020-09-23 12:22 Edward_han 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 创建dockerfile目录 # mkdir /opt/dockerfile/{web/{nginx,tomcat,jdk,apache},system/{centos,ubuntu,redhat}} -pv 强制删除tag为<none>的镜像 # docker rmi -f `docker ima 阅读全文
posted @ 2020-09-23 12:20 Edward_han 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 安装Nginx # vim Dockerfile FROM centos MAINTAINER Edward RUN yum install epel-release -y && yum install nginx -y #USER nginx #ENV MYSQL_HOST 192.168.50. 阅读全文
posted @ 2020-09-23 12:06 Edward_han 阅读(466) 评论(0) 推荐(0) 编辑
摘要: server端安装 yum install net-snmp-util yum install net-snmp 被监控端安装 yum install net-snmp 被监控端编辑配置文件 #### # First, map the community name "public" into a " 阅读全文
posted @ 2020-09-23 11:50 Edward_han 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Zabbix Server的安装 ● 安装zabbix仓库 # rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm ● 安装zabbix server, fronte 阅读全文
posted @ 2020-09-23 11:48 Edward_han 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-09-23 11:35 Edward_han 阅读(52) 评论(0) 推荐(0) 编辑