1

I'm looking for a way to look for if a text value hasn't changed in an amount of time, and to throw a trigger if it hasn't. For example, if I'm reading the value 'foo' from a file, and it's still 'foo' in 8 hours, I want to trigger an alert. However, it doesn't appear that I can use {app_name:text[item].delta(288000)}=0.

Is there a novel way to do this?

EDIT:

Okay, someone asked for the root problem we're trying to solve, so here's what we've got. We're running an environment on Amazon EC2 that is dynamically spun up / down based on CloudFormation and Chef. Sometimes, the Chef client just gets stuck because of an unknown quantity with our apt cacher server. When this happens, our development environments stop getting new software builds that are deployed with Chef, and if it goes too long our "node sentry" will kick machines out of Chef because they haven't checked in for too long, and it figures they are instances that no longer exist.

On each Chef client run, a file is written that contains JSON of the node name of the instance, the GUID of the chef client run, the run start time, and the run stop time. I have these values coming into Zabbix as text, and was looking for a way to see if they don't change for a few hours so I can trigger on it.

That JSON looks like:

{ "node_name": "testnode.domain.local", "run_id": "4aa6c9d6-f97a-494a-9a4f-d72fc69e341b", "start_time": "2015-09-03 16:57:08 +0000", "end_time": "2015-09-03 16:57:47 +0000" }

Helpful? Unclear? Completely overthought? Convert the timestamp into a serial date and compare using that?

  • It looks like you have 80 hours there, not 8. – dimir Sep 03 '15 at 07:19
  • Here at Zabbix, we currently do not have a solution for this particular case. Maybe you could describe the real problem that you are trying to solve and we could work from there? Maybe a different solution is possible? – asaveljevs Sep 03 '15 at 14:34
  • One approach, though, would be to have not only a text item, but also a numeric item - e.g., if you are reading "foo" from a file, then you can also do vfs.fs.cksum[] of that file. Then, you can use the text item for readability, but the numeric item for triggering - use delta(8h) exactly as you suggested. – asaveljevs Sep 03 '15 at 14:52
  • That should have been vfs.file.cksum[] instead, see https://www.zabbix.com/documentation/2.4/manual/config/items/itemtypes/zabbix_agent . – asaveljevs Sep 03 '15 at 15:09
  • Added more detail above, as asked. – MachineShedFred Sep 03 '15 at 18:35

0 Answers0