PDA

View Full Version : Trigger Expressions


PBG
10-06-2005, 21:35
Hi,
Just wondering if Zabbix supports more than one item in an arithmetic expression. I'm looking to do the following...

{HOST1:filesize[C:\fileone.dat].last(0)}+{HOST1:filesize[C:\filetwo.dat].last(0)}-{HOST2:syslog[exchws].last(0)}>16000000000

I get ERROR:Invalid trigger expression when I try to add it.

I'm trying to monitor the size of a Microsoft Exchange database, which requires the size of two files to be added together and then the whitespace in those files to be subtracted. So, DBFile1 + DBFile2 - WhiteSpace.

As you can see, the whitespace value is actually retrieved from another host, so is that maybe the problem? Or can I not have three items in a trigger expression?

I can get it to work this way:
((DBFile1 + DBFile2)>16000000000)&(Whitespace<100)

But this isn't ideal... I'd rather track the actual size.

Any thoughts?

kurt
13-08-2005, 22:36
{HOST1:filesize[e:\\Program Files\\Exchsrvr\\mdbdata\\priv1.edb].last(0G)}+{HOST1:filesize[e:\\Program Files\\Exchsrvr\\mdbdata\\priv1.stm].last(0G)}>16000G

Its works like a charm

Nate Bell
15-08-2005, 16:59
Just taking a stab here, but maybe you need to specify the order of operations:

((({HOST1:filesize[C:\fileone.dat].last(0)}+{HOST1:filesize[C:\filetwo.dat].last(0)})-{HOST2:syslog[exchws].last(0)})>16000000000)

Nate

innomedia
16-08-2005, 09:54
If it's anything like what I've encountered in the past, the culprit is the minus sign. I solved that problem by bypassing the expression validity check in triggers.php.