You are here

function dba_report_alert in Database Administration 7

Helper function, return TRUE if current values are above thresholds.

2 calls to dba_report_alert()
dba_mysql_report_output in database/mysql.report.inc
Build mysqlreport output.
dba_pgsql_report_output in database/pgsql.report.inc
PostgreSQL report.

File

./dba.report.inc, line 146

Code

function dba_report_alert($actual, $limits, $operator = '>=') {
  foreach ($actual as $key => $value) {
    $comparison = "return {$value} {$operator} " . $limits[$key] . ';';
    if (eval($comparison)) {
      return TRUE;
    }
  }
  return FALSE;
}