title: Check if values of two string-type items are equal in a Zabbix trigger
body: <p>I am monitoring an application using Zabbix and have defined a custom item which returns a string value. Since my item's values are actually checksums, they will only contain the characters <code>[0-9a-f]</code>. Two mirror copies of my application are running on two servers for the sake of redundancy. I would like to create a trigger which would take the item values from both machines and fire if they are not the same.</p>
  
  <p>For a moment, let's forget about the moment when values change (it's not an atomic operation, so the system may see inconsistent state, which is not a real error, for a short time), since I could work around it by looking at several previous values.</p>
  
  <p>The crux is: <strong>how to write a Zabbix trigger expression which could compare for equality the string values of two items (the same item on two mirror hosts, actually)?</strong></p>
  
  <p>Both according to <a href="http://www.zabbix.com/documentation/1.8/manual/config/triggers" rel="nofollow">the fine manual</a> and as I confirmed in praxis, the standard operators <code>=</code> and <code>#</code> only work on numeric values, so I can't just write the natural <code>{host1:myitem[param].last(0)} # {host2:myitem[param].last(0)}</code>. Functions such as <code>change()</code> or <code>diff()</code> can only compare values of the same item at different points in time. Functions such as <code>regexp()</code> can only compare the item's value with a constant string/regular expression, not with another item's value. This is very limiting.</p>
  
  <p>I could move the comparison logic into the script which my custom item executes, but it's a bit messy and not elegant, so if at all possible, I would prefer to have this logic inside my Zabbix trigger.</p>
  
  <p>Perhaps despite the limitations listed above, someone can come up with a workaround?</p>