[ZBXNEXT-2128] Execution of an item at a specific time Created: 2014 Jan 23  Updated: 2018 Nov 13  Resolved: 2015 Dec 13

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), API (A), Frontend (F), Server (S)
Affects Version/s: None
Fix Version/s: 3.0.0alpha3

Type: New Feature Request Priority: Major
Reporter: Alexei Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 14
Labels: flexibleintervals, interval, item, scheduling
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
causes ZBX-13401 Successful items mass update with inv... Closed
Duplicate

 Description   

It would be great if Zabbix supported ability to execute item at a specific time. For example, daily at 09:00, every hour at 0 minutes, etc.

Specification https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-2128



 Comments   
Comment by richlv [ 2014 Jan 24 ]

as for syntax, safe way forward would be to use cron syntax

Comment by Dimitri Bellini [ 2014 Jun 10 ]

Another suggestion: "Ondemand" execution check.

Comment by jpka [ 2015 Apr 16 ]

It looks be great (if not ideal) if new 'Scheduler' menu item can be added to main Zabbix horizontal menu. It can hold and manage items needed for schedule.

Comment by Andris Zeila [ 2015 Apr 28 ]

(1) [S] Server part is ready for testing in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-2128

<dimir> Great. Please review my changes in r53687, r53886.

wiper Thanks, reviewed.
CLOSED

Comment by Oleksii Zagorskyi [ 2015 Apr 30 ]

(2) about graphing. Not directly related to current development !

I remembered about this feature development when was writing this comment https://support.zabbix.com/browse/ZBX-7821#comment-142824

Interesting - If I set update interval to 0 and use the new scheduling possibility, for example pool an item every minute or so.
Of course this case is actual even currently for currently supported flexible intervals ...

Maybe we would need to add new paragraph for example here https://www.zabbix.com/documentation/2.2/manual/config/visualisation/graphs/simple
and describe when and why graphs may show "dots" instead lines ?

Maybe wort to add those two definitions to https://www.zabbix.com/documentation/2.2/manual/web_interface/definitions because, as I see, they were explained in different issues to several users already.
And point then to the definition page from the simple graph page?
(see also ZBX-5834)

... discussion is welcome

iivs Scheduling intervals do not affect graphs. The documentation here and here could be improved. martins-v see if you can add descriptions there. Ask oleg.egorov if unclear.

martins-v I would prefer to deal with this in a separate issue.

iivs Then, I guess, we're done here.
CLOSED

Comment by dimir [ 2015 Jun 01 ]

Server side tested, front-end part still missing. For now the only way to use it is to edit the database manually according to the spec. The scheduled interval must be written to the delay_flex field, e. g.:

update items set delay_flex='wd1-5s/25;wd0-7m/2' where itemid=23661;

Both flexible and scheduled intervals may be used separated by semicolon.

Comment by Bruno Galindro da Costa [ 2015 Jul 07 ]

This is a nice feature. It will be available in 2.5.0? When 2.5.0 will be available for download?

Comment by Marc [ 2015 Jul 07 ]

bruno.galindro, see https://www.zabbix.org/wiki/Docs/roadmap

Comment by Bruno Galindro da Costa [ 2015 Jul 09 ]

Tks Marc

Comment by Andris Zeila [ 2015 Aug 20 ]

(3) [S] more filter combinations were clarified during frontend development. Server must be tested if they are parsed and processed correctly. Examples:

h1-1
m10-20,/5

wiper server accepts out of order intervals (s00h00 for example) while according to the specifications the intervals are listed in 'descending' order.
RESOLVED in r55739

<dimir> It's a bit weird that in case of invalid interval server reports 3 error messages:

 14109:20150928:165115.652 Invalid scheduling interval: "wd1m/2h16-18".
 14109:20150928:165115.652 wrong delay period format: "wd1m/2h16-18"
 14109:20150928:165115.652 wrong delay period format [wd1m/2h16-18]

This is with DebugLevel=3. I think one error message would be enough.

REOPENED

wiper Frontend is also doing interval validation, so those error messages can be generated only if the database was manually altered. The decision was to leave messages, but fix their style. RESOLVED in r55807

<dimir> Right, CLOSED

Comment by Ivo Kurzemnieks [ 2015 Aug 28 ]

(4)
Removed translation strings:

  • Incorrect flexible interval in item "%1$s". Flexible interval must be a string.
  • Incorrect flexible interval "%1$s".
  • No flexible intervals defined.
  • Maximum number of flexible intervals added
  • New flexible interval
  • Invalid time period
  • Flexible intervals
  • Interval (in sec)

Added translation strings:

  • unexpected end of interval
  • Custom intervals
  • Flexible
  • Scheduling
  • Invalid interval "%1$s": %2$s.
  • Invalid interval "%1$s".
  • Invalid flexible interval delay "%1$s": exceeds maximum delay of "%2$s".
  • Invalid interval "%1$s": invalid month day "%2$s".
  • Invalid interval "%1$s": invalid month day step "%2$s".
  • Invalid interval "%1$s": starting month day must be less or equal to ending month day.
  • Invalid interval "%1$s": invalid week day "%2$s".
  • Invalid interval "%1$s": invalid week day step "%2$s".
  • Invalid interval "%1$s": starting week day must be less or equal to ending week day.
  • Invalid interval "%1$s": invalid hours "%2$s".
  • Invalid interval "%1$s": invalid hour step "%2$s".
  • Invalid interval "%1$s": starting hour must be less or equal to ending hour.
  • Invalid interval "%1$s": invalid minutes "%2$s".
  • Invalid interval "%1$s": invalid minute step "%1$s".
  • Invalid interval "%1$s": starting minute must be less or equal to ending minute.
  • Invalid interval "%1$s": invalid seconds "%2$s".
  • Invalid interval "%1$s": invalid second step "%1$s".
  • Invalid interval "%1$s": starting second must be less or equal to ending second.

oleg.egorov CLOSED

<richlv> looks like this also removed translatable string "Interval (in sec)"
REOPENED

iivs Thanks! Indeed removed. RESOLVED

<richlv> thanks for checking this
CLOSED

Comment by Ivo Kurzemnieks [ 2015 Aug 28 ]

Frontend ready for testing.

Comment by Oleg Egorov (Inactive) [ 2015 Sep 03 ]

(5) Items custom intervals
Type: Flexible
Interval: 99999
Period: 1-7,00:00-24:00

Invalid interval "99999/1-7,00:00-24:00": incorrect syntax near "9/1-7,00:00-24:00".

But syntax is ok

Other question

Scheduling interval Invalid interval "wd1-5h23-22": incorrect syntax near "2".

Syntax is correct, but till is less than since.

iivs RESOLVED in r55543, r55552

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Sep 03 ]

(6) Possible create interval = 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Missed length/value validation

{
    "itemid": "23663",
    "delay_flex": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/1-7,00:00-24:00"
}

And after this item possible update via frontend

Create interval "0" is not allowed, but allow 00...0.

I think 0 and 00...0 is same, and possible errors/problems with "0" interval

iivs Zero interpretation is fixed in r55502, r55510. About frontend displaying the field with charaters more than maxlength, should be discussed.

oleg.egorov Frontend displaying the field with charaters more than maxlength, was discussed and CLOSED.

Comment by Oleg Egorov (Inactive) [ 2015 Sep 08 ]

(7) As discussed, please add length validation.
Now is "incorrect syntax near"

iivs Length validation occurrs on database level.

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Sep 08 ]

(8) Please improve getItemDelay()

if (!empty($delay) || !$flexibe_intervals) {

!empty($delay) is check for $delay != 0

iivs RESOLVED in r55493

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Sep 08 ]

(9) Please review my minor changes in r55487

iivs Some changes were incorrectly changed and some were reverted automatically by merge from trunk. Global coding style issues should be addressed to either ZBX-954 or DEV-534
I corrected the faulty places. Please, review my minor changes in r55494

oleg.egorov Thanks, please review other minor changes in r55629, r55649, r55692

And as discussed, please rename month_step to month_days_step

iivs Renamed and fixed various typos. RESOLVED in r55722

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2015 Sep 23 ]

Frontend: TESTED

Comment by dimir [ 2015 Sep 28 ]

(10) [F] Delay=0 must be allowed with scheduling intervals as well as it is currently with flexible (spec updated).

iivs RESOLVED in r55876

oleg.egorov CLOSED

Comment by Ivo Kurzemnieks [ 2015 Oct 02 ]

Implemented in pre-3.0.0alpha3 (trunk) r55922

Comment by Andris Zeila [ 2015 Oct 05 ]

(11) Documentation:

martins-v Updated also:

  • formatting at the item and custom interval pages
  • What's new entry renamed to emphasize the new functionality
  • LLD section

iivs
API documentation updated:

martins-v Reviewed. CLOSED.

Comment by Andris Zeila [ 2015 Oct 08 ]

(12) [S] If item does not have custom intervals the configuration syncer calls calculate_item_nextcheck() with empty string as custom interval parameter. But when calling calculate_item_nextcheck() from DCget_reachable_nextcheck() NULL is used if item does not have custom interval defined.

We should use single approach and better would be to fix configuration syncer so it will also pass NULL as non defined custom interval.

wiper RESOLVED in r56014

<dimir> CLOSED

Comment by dimir [ 2015 Oct 09 ]

Tested. Please review r56023.

wiper Thanks

Comment by Andris Zeila [ 2015 Oct 09 ]

Released in:

  • pre-3.0.0alpha3 r56025
Comment by richlv [ 2015 Oct 22 ]

(13) removed string "Interval (in sec)" still seems to be present in these test files :

  • tests/selenium/testFormDiscoveryRule.php
  • tests/selenium/testFormItemPrototype.php
  • tests/selenium/testFormItem.php

didn't check where exactly these forms were changed, but let's deal with the tests here

<richlv> changed in r56434, RESOLVED

iivs The string was non-translatable and most of the test files are completely broken anyway. Doesn't really matter if the string is changed in test file or the line is just deleted, this will not repair the test files and they will still be broken. To properly fix this, either old selenium tests should be repaired or new ones should be written. I guess we can leave it as it is for now.

CLOSED

Comment by richlv [ 2015 Oct 29 ]

subissues still open : 2, 11, 12, 13

Generated at Fri Apr 26 13:46:59 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.