Ad Widget

Collapse

Time restrictions in trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • obiwanshanobi
    Junior Member
    • Jun 2014
    • 2

    #1

    Time restrictions in trigger

    I'm trying to setup a trigger to only alert between certain hours, but this formula is not working. Anyone done this before that can tell me what I'm doing wrong?

    This template is supposed to alert Monday - Friday, between 1-2pm.

    {Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].last(0)}>100&{Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].dayofweek(0)}=1-5&{Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].time(0)}>130000&{Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].time(0)}<140000
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome!

    There is a problem in your dayofweek(0)}=1-5 statement. You cannot give multiple values in your trigger expression like this. You did it correctly with setting time values, so do it the same for days. Or you can simply use dayofweek(0)}<6

    Code:
    {Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].last(0)}>100 & 
    {Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].dayofweek(0)}<6 & 
    {Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].time(0)}>130000 & 
    {Template TMS Alerts:zabbixTmsAlerts.sh[callsPerMinute].time(0)}<140000
    Best Regards,
    Ingus

    Comment

    • obiwanshanobi
      Junior Member
      • Jun 2014
      • 2

      #3
      Thanks Ingus, that seemed to do the trick. Much appreciated

      Comment

      Working...