Custom scheduling

The example of having a flexible interval of one minute works, but it's not very precise. For more exact timing, the other custom interval type can be used—scheduling. This enables you to obtain item values at an exact time. It also has one major difference from flexible intervals. Flexible intervals change how an item is polled, but custom scheduling does not change the existing polling. Scheduled checks are executed in addition to the normal or flexible intervals.

It may sound a lot like crontab, but Zabbix custom scheduling uses its own syntax. The time prefix is followed by a filter entry. Multiple time prefix and filter values are concatenated, going from the biggest to the smallest. The supported time prefixes are as follows:

  • md: month days
  • wd: weekdays
  • h: hours
  • m: minutes
  • s: seconds

For example, an entry of m13 will schedule this item to be polled every hour at the beginning of minute 13. If it is combined with a weekday specification such as wd3m13, it will be polled every hour at the beginning of minute 13 on Wednesdays only. Changing the weekday reference to the month day—or datereference as md13m13 would make this item be polled every hour at the beginning of minute 13 on the thirteenth day only.

The example of polling the item on Monday morning at 09:00 that we looked at before would be wd1h9:

The filter can also be a range. For example, polling an item at 09:00 on Monday, Tuesday, and Wednesday would be done as wd1-3h9.

At the end of the filter, we can also add a step through a slash. For example, wd1-5h6-10/2 would poll the item from Monday to Friday, starting at 06:00 every other hour until 10:00. The item would get polled at 06:00, 08:00, and 10:00. To make an item be polled every other hour all day long on all days, the syntax of h/2 can be used.

Multiple custom intervals may also be specified by separating them with a semicolon; wd1-5/2 and wd1;wd3;wd5 would both poll an item at the beginning of Monday, Wednesday, and Friday.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset