Hi Jimmy,
Ok the original problem was that the "Apply Thresholds" dropdown option in hosts.php. Before fiddling with this if I select a device by its check box then select "Apply Thresholds" in the dropdown at the bottom of the page and click "GO" the next page that comes up did not show a list of the devices for which tholds would be enabled. Clicking ok on this next page did not create any new tholds (I assume since the list of what to do with the tholds was blank)
I added some print statements into thold_device_action_prepare() to see what was going on and checked the function itself.
The contents of $save did not appear to be what it should have been. This test was not matching the entry 'thold' which it should if doing an "Apply Tholds" in host.php.
Code:
if ($save['drp_action'] != 'thold')
return $save;
as the contents of $save['drp_action'] was coming out as just 't' rather than 'thold'.
Furthermore $save['host_list'] also had a value of 't'
I traced this back into the cacti code and the variables where being filled out and passed into do_hook_function correctly but when they popped out the other side of this function the variables seemed to have become corrupted.
Adding an extra variable into do_hook_function so that $ret is not set based on a function of itself stopped the corruption of the variable.
So why does this break the arch by adding in an extra holder variable to this function?
Thanks
iain