2023年11月29日 星期三

zabbix macro and his function

all view 

https://www.zabbix.com/documentation/current/en/manual/config/macros




# macro

https://www.zabbix.com/documentation/current/en/manual/config/macros 


# macro with function

https://www.zabbix.com/documentation/current/en/manual/config/macros/macro_functions

2023年10月17日 星期二

python 2.7 post handler

 https://www.cnblogs.com/gattaca/p/7301282.html

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日 星期二

CRONTAB file

 in /var/spool/cron 

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