PDA

View Full Version : Triggers contingent on local time.


malcontent
14-04-2008, 04:16
Hi.

I want to define a trigger for a group of machines which is based on time of day. For example alert me if less than 10 users are present except at night and weekends.

The problem is that each machine is in a different timezone. The localtime parameter gives me a unix timestamp so I can't create a trigger based on that. I can create triggers based on the time of the monitor server but that doesn't really help me because it does not track time zone changes.

How do I extract the time and the date (and possibly the day of the week) from the localtime?

What other alternatives do I have?

niekie
21-04-2008, 20:35
I don't think Zabbix offers date and time conversions natively, but if all else fails, write your own item (a small shell script) and define a trigger on that. That'll give you all the flexibility you need.