https://www.cnblogs.com/gattaca/p/7301282.html
2023年10月17日 星期二
2023年10月11日 星期三
fluentd log-driver
https://blog.boatswain.io/zh/post/docker-container-log-rotation/
https://gdevillele.github.io/engine/admin/logging/fluentd/
https://hub.docker.com/r/fluent/fluent-bit/
2023年10月4日 星期三
zabbix storage
查看磁盘容量息的key值:vfs.fs.size[/,pfree]
vfs.fs.size[/,pfree]:取/领域的剩余空间率。p是percentage,
vfs.fs.size[/,free]:取/领域的剩余空间。对应的单位就是B(这里的意思是Byte)
vfs.fs.size[/,pused]:取/领域的使用空间率。
vfs.fs.size[/,used]:取/领域的使用空间。
如果要创建触发器表达式可以使用{ZABBIX-CC:vfs.fs.size[/,pfree].last(0)}<20
參考 https://blog.51cto.com/ityunwei2017/1864128
2023年9月5日 星期二
2023年8月8日 星期二
python star symbol is unpacking
# explain
This PEP proposes extended usages of the * iterable unpacking operator and ** dictionary unpacking operators to allow unpacking in more positions, an arbitrary number of times, and in additional circumstances. Specifically, in function calls, in comprehensions and generator expressions, and in displays.
https://www.geeksforgeeks.org/packing-and-unpacking-arguments-in-python/
https://peps.python.org/pep-0448/#id6
# example
print( [i for i in [*[1,2], 1]] )
# [1, 2, 1]
print( [i for i in [[1,2], 1]] )
# [[1, 2], 1]
def hello(*attrs):
for s in attrs:
print(s)
hello([1,2,3])
#[1, 2, 3]
hello(*[1,2,3])
#1
#2
#3
hello(1,2,3)
#1
#2
#3
2023年7月17日 星期一
Rabbitmq REST API
1. https://rawcdn.githack.com/rabbitmq/rabbitmq-server/v3.12.1/deps/rabbitmq_management/priv/www/api/index.html
2. https://www.rabbitmq.com/vhosts.html
2023年7月11日 星期二
airflow api
# seting the
airflow_api_auth_backends: 'airflow.api.auth.backend.basick_auth'
# Test
curl -X GET --user "airflow:1qaz2WSX" "https://airflow-dev.armor.hinet.net/api/v1/pools"
curl -X PATCH 'https://airflow-dev.armor.hinet.net/api/v1/dags/report_backup?update_mask=is_paused' \
-H 'Content-Type: application/json' \
--user "airflow:1qaz2WSX" \
-d '{
"is_paused": true
}'
# ref setting airflow.cfg
airflow_api_auth_backends: 'airflow.api.auth.backend.basick_auth
# https://stackoverflow.com/questions/61329923/apache-airflow-rest-api-authentication
# https://airflow.apache.org/docs/apache-airflow/1.10.12/howto/set-config.html'
#https://airflow-dev.armor.hinet.net/redoc