上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页
摘要: 原文链接 https://www.cnblogs.com/wt11/p/15122036.html 参考链接 https://www.cnblogs.com/dongyuq1/p/13572477.html 1. 先自定义exporter package utils import ( "github 阅读全文
posted @ 2021-08-10 08:48 明天OoO你好 阅读(724) 评论(0) 推荐(0) 编辑
摘要: package utils import ( "fmt" "net/http" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "gi 阅读全文
posted @ 2021-08-05 00:23 明天OoO你好 阅读(1463) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "sync" "time" ) // 方法一: 通过sync.WaitGroup + chan自定义 var tokens chan struct{} var wg sync.WaitGroup func fprint(num int) { d 阅读全文
posted @ 2021-05-16 20:56 明天OoO你好 阅读(510) 评论(0) 推荐(0) 编辑
摘要: FROM centos:7 as build ADD nginx-1.19.6.tar.gz /usr/local/src # change dir to /usr/local/src/nginx-1.19.6 WORKDIR /usr/local/src/nginx-1.19.6 # runnin 阅读全文
posted @ 2021-01-22 00:28 明天OoO你好 阅读(171) 评论(0) 推荐(0) 编辑
摘要: [root@localhost apps]# cat /etc/supervisor/conf.d/command_analyzer_celery_* [program:book]command=/home/project/bookmanager/venv/bin/gunicorn -w 8 -b 阅读全文
posted @ 2021-01-11 20:20 明天OoO你好 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 1. 配置免密登陆: ansible -i costome_hosts all -m authorized_key -a "user=root key='{{ lookup('file', '/root/.ssh/id_rsa.pub')}}' path='/root/.ssh/authorized 阅读全文
posted @ 2020-12-15 16:42 明天OoO你好 阅读(252) 评论(0) 推荐(0) 编辑
摘要: count = 0 with open('/cm/com.file','rb') as f: while True: buffer = f.read(1024*8192) if not buffer: break count += buffer.count(b"\n") print(count) 阅读全文
posted @ 2020-11-30 22:29 明天OoO你好 阅读(1135) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- BADREQUEST = 400 UNAUTHORIZED = 401 FORBIDDEN = 403 GONE = 410 TOOMANYREQUESTS = 412 class DnsdbException(Exception): def __in 阅读全文
posted @ 2020-11-15 14:20 明天OoO你好 阅读(356) 评论(0) 推荐(0) 编辑
摘要: import configparser import logging from logging.handlers import RotatingFileHandler config = configparser.ConfigParser() config.read("config", encodin 阅读全文
posted @ 2020-11-07 11:41 明天OoO你好 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1. 采集服务器网卡1分钟平均流量(单位bit) rate(node_network_receive_bytes_total{device="ens33",instance="192.168.214.129:9100",job="node",name="JSONS"}[1m])*8 阅读全文
posted @ 2020-09-10 22:17 明天OoO你好 阅读(1078) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页