I just installed the zabbix 1.1 version and wsa busy installing some triggers for windows systems. I'm monitoring the cpu with the item:
system.cpu.util[*]
But I couldn't install a trigger. Seems the * wsa not accepted. I added the
* to regular expression check in the config.inc.php file and now it seems to
work.
Would this change have some other byeffects?
Regards,
Geert
// Does expression match server:key.function(param) ?
function validate_simple_expression($expression)
{
// echo "Validating simple:$expression<br>";
// 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))
// Added the * in the key expression
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];
$function=$arr[3];
$parameter=$arr[4];
//SDI($host);
//SDI($key);
//SDI($function);
//SDI($parameter);
system.cpu.util[*]
But I couldn't install a trigger. Seems the * wsa not accepted. I added the
* to regular expression check in the config.inc.php file and now it seems to
work.
Would this change have some other byeffects?
Regards,
Geert
// Does expression match server:key.function(param) ?
function validate_simple_expression($expression)
{
// echo "Validating simple:$expression<br>";
// 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))// Added the * in the key expression
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];
$function=$arr[3];
$parameter=$arr[4];
//SDI($host);
//SDI($key);
//SDI($function);
//SDI($parameter);