summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-14 17:39:51 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-14 17:39:51 +0000
commit8ad4b9220731f78f154bbb913ed23f87ab201e5c (patch)
tree5cda2e21554d23223413f76fd21efb273e394134 /frontends/php/include
parent1e52f7bdc061611eb2d11e8634b3261f9d34d5fa (diff)
- support for function nodata() added (Alexei)
- minimum number of zabbix_suckerd that can be started is 4 (Alexei) - simplified function update_triggers(). (Alexei) - fixed situation when Service is linked to a trigger. Service name is correct now. (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@457 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index a581eccd..48371611 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -376,7 +376,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
// 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,4})\(([0-9a-zA-Z\_\/\.\,]+)\)\}$', $expression, &$arr))
+ if (eregi('^\{([0-9a-zA-Z[.-.]\_\.]+)\:([]\[0-9a-zA-Z\_\/\.\,]+)\.([a-z]{3,6})\(([0-9a-zA-Z\_\/\.\,]+)\)\}$', $expression, &$arr))
{
$host=$arr[1];
$key=$arr[2];
@@ -401,6 +401,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
($function!="min") &&
($function!="max") &&
($function!="prev")&&
+ ($function!="nodata")&&
($function!="str"))
{
$ERROR_MSG="Unknown function [$function]";
@@ -1453,7 +1454,13 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
{
if( isset($linktrigger)&&($linktrigger=="on") )
{
- $sql="insert into services (name,triggerid,status,algorithm) values ('$name',$triggerid,0,$algorithm)";
+ $trigger=get_trigger_by_triggerid($triggerid);
+ $description=$trigger["description"];
+ if( strstr($description,"%s"))
+ {
+ $description=expand_trigger_description($triggerid);
+ }
+ $sql="insert into services (name,triggerid,status,algorithm) values ('$description',$triggerid,0,$algorithm)";
}
else
{