Greetings,
The attached patch provides 3 new trigger functions;
Please note that this patch is against 1.1.6, and affects both the PHP UI and the Zabbix Server source code.
I am currently working on three variants on these as well: ???TW, which will compare the value against each 24 hour shifts for the last seven days, ???TM, which will compare the value against each of the 24 hour shifts for the last 30 days, ???TWD, which will compare the value against the shift 7 days ago, and ???TMD, which will compare the value against the shift 30 days ago.
EDIT: Actually, instead of doing 30 days for the month shifts, I think 28 days will work better as that will compare the value against the same weekday to better support daily patterns.
EDIT2: New patch uploaded that changes these to use the trends table per Alexei's request. Additionally, these new functions will make adding to them much easier in the future.
The attached patch provides 3 new trigger functions;
- AVGTD -- This function compares the current value to the average value, time shifted 24 hours ago. The parameter is the same as the AVG function. i.e. avgtd(300) will compare the current value to the 5 minute average, 24 hours ago and avgtd(#5) will compare the current value to the average of the last 5 values, 24 hours ago.
- MINTD -- This function compares the current value to the minimum value, time shifted 24 hours ago. The parameter is the same as the MIN function. i.e. mintd(300) will compare the current value to the 5 minute minimum, 24 hours ago and mintd(#5) will compare the current value to the minimum of the last 5 values, 24 hours ago.
- MAXTD -- This function compares the current value to the maximum value, time shifted 24 hours ago. The parameter is the same as the MAX function. i.e. maxtd(300) will compare the current value to the 5 minute maximum, 24 hours ago and maxtd(#5) will compare the current value to the maximum of the last 5 values, 24 hours ago.
Please note that this patch is against 1.1.6, and affects both the PHP UI and the Zabbix Server source code.
I am currently working on three variants on these as well: ???TW, which will compare the value against each 24 hour shifts for the last seven days, ???TM, which will compare the value against each of the 24 hour shifts for the last 30 days, ???TWD, which will compare the value against the shift 7 days ago, and ???TMD, which will compare the value against the shift 30 days ago.
EDIT: Actually, instead of doing 30 days for the month shifts, I think 28 days will work better as that will compare the value against the same weekday to better support daily patterns.
EDIT2: New patch uploaded that changes these to use the trends table per Alexei's request. Additionally, these new functions will make adding to them much easier in the future.

Comment