Do you have any triggers that you definitely know are in unknown state?
As a test you can create a item the checks the size of a test file, then add a trigger that check if the size is greater than a certain amount. Delete the file and the trigger will go into unknown state.
You could then go straight to the database and run the statement
I'm just trying it now and it seems to be reliable. Filtering by items in error (i.status=3) should have given the same results but it doesn't. Using t.value=2 (which I looks like triggers in error) works better.
As a test you can create a item the checks the size of a test file, then add a trigger that check if the size is greater than a certain amount. Delete the file and the trigger will go into unknown state.
You could then go straight to the database and run the statement
Code:
select h.host, t.description, i.key_ from items i left join hosts h on i.hostid = h.hostid left join functions f on i.itemid = f.itemid left join triggers t on f.triggerid = t.triggerid where t.status=0 and t.status=2 and h.status=0;
This is very useful, thanks for putting it together. This, along with the new 1.8.5 internal checks, I'm able to finally get this running like a well oiled machine.
Comment