extracted code to query trigger data with ZABBIX API as a function to be used conveniently from sub classes.