I was trying to add a new trigger via the frontend and was receiving an error that it didn't match the required expression. Well it turned out the regular expression I had used in the item key (vfs.file.regexp[/tmp/md0.txt,.*]) was failing the "validate_simple_expression($expression)" because it contained an asterick. Here's a patch to add astericks to the regular expression check in that method.
cameron
Code:
--- zabbix-1.1/frontends/php/include/config.inc.php 2006-06-02 07:11:36.000000000 -0400
+++ /var/www/html/zabbix/include/config.inc.php 2006-06-28 08:35:00.000000000 -0400
@@ -651,7 +651,7 @@
// Before str()
// if (eregi('^\{([0-9a-zA-Z[.-.]\_\.]+)\:([]\[0-9a-zA-Z\_\/\.\,]+)\.((diff)|(min)|(max)|(last)|(prev))\(([0-9\.]+)\)\}$', $expression, $arr))
// if (eregi('^\{([0-9a-zA-Z[.-.]\_\.]+)\:([]\[0-9a-zA-Z\_\/\.\,]+)\.((diff)|(min)|(max)|(last)|(prev)|(str))\(([0-9a-zA-Z\.\_\/\,]+)\)\}$', $expression, $arr))
- if (eregi('^\{([0-9a-zA-Z\_\.-]+)\:([]\[0-9a-zA-Z\_\/\.\,\:\(\) -]+)\.([a-z]{3,11})\(([#0-9a-zA-Z\_\/\.\,]+)\)\}$', $expression, $arr))
+ if (eregi('^\{([0-9a-zA-Z\_\.-]+)\:([]\[0-9a-zA-Z\_\*\/\.\,\:\(\) -]+)\.([a-z]{3,11})\(([#0-9a-zA-Z\_\/\.\,]+)\)\}$', $expression, $arr))
{
$host=$arr[1];
$key=$arr[2];
Comment