mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Save application metrics to db for alerting (#7828)
* feature: save application metrics to db for alerting However, alerting will not work because ResolveGlues() is broken. Can add workaround after state_translations alerting is merged Does not update all applications yet, not sure if that should be done here or in another PR. Introduces two handy functions dbDeleteOrphans() and array_by_column(). Will replace those in other locations after this is merged or separate them out if this is not merged. * remove accidental inclusions * Add db schema
This commit is contained in:
committed by
Neil Lathwood
parent
edf26c1106
commit
4a03e7838e
@@ -1866,3 +1866,15 @@ function check_file_permissions($file, $mask)
|
||||
|
||||
return ($perms & $mask) === $mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* Index an array by a column
|
||||
*
|
||||
* @param array $array
|
||||
* @param string|int $column
|
||||
* @return array
|
||||
*/
|
||||
function array_by_column($array, $column)
|
||||
{
|
||||
return array_combine(array_column($array, $column), $array);
|
||||
}
|
||||
|
Reference in New Issue
Block a user