摘要:
原文链接 https://www.cnblogs.com/wt11/p/15122036.html 参考链接 https://www.cnblogs.com/dongyuq1/p/13572477.html 1. 先自定义exporter package utils import ( "github 阅读全文
摘要:
package utils import ( "fmt" "net/http" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "gi 阅读全文
摘要:
package main import ( "fmt" "sync" "time" ) // 方法一: 通过sync.WaitGroup + chan自定义 var tokens chan struct{} var wg sync.WaitGroup func fprint(num int) { d 阅读全文
摘要:
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 阅读全文
摘要:
[root@localhost apps]# cat /etc/supervisor/conf.d/command_analyzer_celery_* [program:book]command=/home/project/bookmanager/venv/bin/gunicorn -w 8 -b 阅读全文
摘要:
1. 配置免密登陆: ansible -i costome_hosts all -m authorized_key -a "user=root key='{{ lookup('file', '/root/.ssh/id_rsa.pub')}}' path='/root/.ssh/authorized 阅读全文
摘要:
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) 阅读全文
摘要:
# -*- coding: utf-8 -*- BADREQUEST = 400 UNAUTHORIZED = 401 FORBIDDEN = 403 GONE = 410 TOOMANYREQUESTS = 412 class DnsdbException(Exception): def __in 阅读全文
摘要:
import configparser import logging from logging.handlers import RotatingFileHandler config = configparser.ConfigParser() config.read("config", encodin 阅读全文
摘要:
1. 采集服务器网卡1分钟平均流量(单位bit) rate(node_network_receive_bytes_total{device="ens33",instance="192.168.214.129:9100",job="node",name="JSONS"}[1m])*8 阅读全文