Hi,
I've created the following item:
logrt[/var/log/syslog,"(?i)error:"]
It works perfectly. Whenever the word "error" appers in my logs, I get a bunch of items appear in "Latest Data"
Now I want to trigger when one comes in.
Reading the docs it seems as simple as:
length(last(/x.y.z/logrt[/var/log/syslog,"(?i)error:"]))>=1
If the length of the last item in x.y.z/logrt[/var/log/syslog,"(?i)error:"] is greater or equal to 1, then trigger!
But whenever I put this expression in, I'm told "Cannot convert expression result of type "string" to floating point value"
What am I doing wrong here? Shouldn't length look at the string and tell me, in a number, how long the string is? If the string is 20 characters long, haven't I just said "if 20 >=1 then trigger"?
I feel really stupid and I'm sure I am being. But I can't understand why.
Please help if possible
Thank you.
I've created the following item:
logrt[/var/log/syslog,"(?i)error:"]
It works perfectly. Whenever the word "error" appers in my logs, I get a bunch of items appear in "Latest Data"
Now I want to trigger when one comes in.
Reading the docs it seems as simple as:
length(last(/x.y.z/logrt[/var/log/syslog,"(?i)error:"]))>=1
If the length of the last item in x.y.z/logrt[/var/log/syslog,"(?i)error:"] is greater or equal to 1, then trigger!
But whenever I put this expression in, I'm told "Cannot convert expression result of type "string" to floating point value"
What am I doing wrong here? Shouldn't length look at the string and tell me, in a number, how long the string is? If the string is 20 characters long, haven't I just said "if 20 >=1 then trigger"?
I feel really stupid and I'm sure I am being. But I can't understand why.
Please help if possible
Thank you.
Comment