Remove bad fix, and add SQL

This commit is contained in:
Dave Bell
2016-05-24 17:42:14 +01:00
parent 45b331b100
commit d809276e2b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ function GenSQL($rule) {
return false;
}
//Pretty-print rule to dissect easier
$pretty = array('*' => '*', '(' => ' ( ', ')' => ' ) ', '/' => '/ ', '&&' => ' && ', '||' => ' || ', 'DATE_SUB ( NOW ( )' => 'DATE_SUB( NOW()');
$pretty = array('*' => '*', '(' => ' ( ', ')' => ' ) ', '/' => '/', '&&' => ' && ', '||' => ' || ', 'DATE_SUB ( NOW ( )' => 'DATE_SUB( NOW()');
$rule = str_replace(array_keys($pretty),$pretty,$rule);
$tmp = explode(" ",$rule);
$tables = array();
+1
View File
@@ -0,0 +1 @@
UPDATE `config` SET `config_value` = '((%ports.ifInOctets_rate*8) / %ports.ifSpeed)*100' WHERE `config_name` = 'alert.macros.rule.port_usage_perc';