0

I have a Zabbix monitoring template, which defines a number of items, plus an additional calculated item.

The template is T extern.

This defines some active checks using an external script, that run every 10min, return a single integer, and have the name formats:

T extern:script.pl["{HOST.IP}","foo"]
T extern:script.pl["{HOST.IP}","foo"]

So far, this all works, the checks run correctly, and data is updated.

Now I try and define a calculate field in the template called T extern:summary, updating every 5min, with the formula:

( last("T extern:script.pl[\"{HOST.IP}\",\"foo\"]") + last("T 
extern:script.pl[\"{HOST.IP}\",\"bar\"]") ) / 2

However, this fails to work and the item always has an unknown value.

What am I doing wrong in the configuration?

  • I can always tell when I'm about to solve a problem - its just after I get to the point where I post the question on stackexchange ... – Steve Shipway Mar 5 '18 at 3:22
1

The problem was that, when defining a calculated field in a template, you do not include the template name (though you do include it if you're defining a trigger). So, the correct formula was:

( last("script.pl[\"{HOST.IP}\",\"foo\"]")
    + last("script.pl[\"{HOST.IP}\",\"bar\"]")
) / 2

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.