Zabbix 日志监控
1. 指定日志文件监控
1)监控项
键值:log[C:\Users\xxxx\PycharmProjects\trunk\Python\PyStock\log\tspro_margin_20210317.log,"INFO: 开始"]
2)触发器
表达式:{HD-XXXX:log[C:\Users\xxxxx\PycharmProjects\trunk\Python\PyStock\log\tspro_margin_20210317.log,"INFO: 开始"].str(INFO)}=1
2)正则表达式:监控某一文件夹下的日志
键值:logrt["C:\Users\xxxx\PycharmProjects\trunk\Python\PyStock\log\^ts.*.log$","WARNING: No data found",UTF-8,100,skip]
表达式:{HD-XXXX:logrt["C:\Users\xxxxx\PycharmProjects\trunk\Python\PyStock\log\^ts.*.log$","WARNING: No data found",UTF-8,100,skip].str(WARNING)}=1 and {HD-XXXXXX:logrt["C:\Users\xxxxx\PycharmProjects\trunk\Python\PyStock\log\^ts.*.log$","WARNING: No data found",UTF-8,100,skip].nodata(5m)}=0