今天这里就不做过多解释了,直接上配置,可以先对prometheus的配置参数有个了解。
1global: 2 # 抓取指标的间隔,默认1m 3 scrape_interval: 10s 4 # 抓取指标的超时时间,默认10s 5 scrape_timeout: 15s 6 # 指定Prometheus评估规则的频率[记录规则(record)和告警规则(alert)],默认1m. 7 # 可以理解为执行规则的时间间隔 8 evaluation_interval: 15s 9 # PromQL查询日志的相关记录文件,有点类似mysql slowlog 10 query_log_file: prometheus_query_log 11 # 用于区分不同的prometheus 12 external_labels: 13 datacenter: 'hangzhou-1' 14 region: 'huadong' 15 16 17# Alertmanager configuration 18alerting: 19 alertmanagers: 20 - static_configs: 21 -...
+++ 第一部分:Prometheus简介及一些必要的名词解释 +++ From metrics to insight
Power your metrics and alerting with the leading open-source monitoring solution.
从指标到洞察力,使用领先的开源监控解决方案为您的数据指标和警报提供助力。
Flashing esp-01s micropython firmware workflow
1raspberrypi4B board <---> esp-link <---> esp-01s board Download micropython firmware for esp-01s 1M
1// https://micropython.org/download/esp8266-1m/ 2wget -c https://micropython.org/resources/firmware/esp8266-1m-20210902-v1.17.bin Flashing with Thonny IDE
1// Install flash tool - esptool 2pip3 install -U esptool 3// find connect esp01s port 4dmesg|grep tty 5// check esp01s board info 6esptool.py -p /dev/ttyACM0 flash_id
Python string split() method allows a string to be easily split into a list based on a delimiter. Though in some cases, you might need the separation to occur based on not just one but multiple delimiter values. This quick 101 article introduces two convenient approaches this can be achieved in Python.
Split String With Two Delimiters in Python Assume the following string.
1text = "python is, an easy;language; to, learn." For our example, we need to split it either by a semicolon followed by a space ;, or by a...