I have an item that execute an sql query to check the last time we have data on hive. When we pass a limit of don´t have new data the trigger activates. But my problem is that the query uses the actual date to calculate the time withouth new data:
select round((unix_timestamp()-to_unix_timestamp(max(date_creation)))/60) from db.my_table where date_load=date_format(current_date(),'yyyyMMdd');
so if it's 00:30 and the process that put data on hive is not working yet I will have a NULL that in zabbix is a nodata because the item reads numbers, but I want to sum the last data of the day before until 23:59 for example:
ITEM.LASTVALUE+TIME_OF_NODATA, this to alarm when pass my limit but I don't now how to do it. I try with trigger functions and Item preprocessing as you can see on image attached to this post. Sorry of my poor english I try to do my best. In the preprocessing I try sum the last value with "n" and every "n" minutes (n is the update interval of the item) add more time to recreate the query that increase until there are new data.
select round((unix_timestamp()-to_unix_timestamp(max(date_creation)))/60) from db.my_table where date_load=date_format(current_date(),'yyyyMMdd');
so if it's 00:30 and the process that put data on hive is not working yet I will have a NULL that in zabbix is a nodata because the item reads numbers, but I want to sum the last data of the day before until 23:59 for example:
ITEM.LASTVALUE+TIME_OF_NODATA, this to alarm when pass my limit but I don't now how to do it. I try with trigger functions and Item preprocessing as you can see on image attached to this post. Sorry of my poor english I try to do my best. In the preprocessing I try sum the last value with "n" and every "n" minutes (n is the update interval of the item) add more time to recreate the query that increase until there are new data.
Comment