Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an item in zabbix 2.0 with "Type of information" set to text.

When everything is normal, it should say "optimal". How do I create a trigger for it saying anything other than "optimal"?

I know how to work with triggers for numeric data types, but I haven't worked with text based ones before.

share|improve this question
up vote 2 down vote accepted

Considering your item key is


your trigger should be something like,

{some_server:log["/path/to/your/file.txt"].str("optimal")}#1 & {some_server:log["/path/to/your/file.txt"].nodata(600)}#1

The .nodata function triggers if you get 600 seconds without receiving new data.

If you want to only check for optimal at the beginning of the string, instead of .str("optimal"), use .regexp(^optimal)

share|improve this answer
Will .str("optimal") work if it comes back with something like "Failure: system is not optimal"? ie. will it match anywhere in the text, or just at the beginning? – Grant Sep 12 '12 at 19:29
It will match any string occurrence. If you need to catch it a the beginning you should use something like (untested): .regexp(^optimal) – Joao Figueiredo Sep 13 '12 at 18:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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