[ZBXNEXT-1675] Add macros support for update intervals Created: 2013 Mar 20 Updated: 2024 Apr 10 Resolved: 2017 Jul 06 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A), Frontend (F), Proxy (P), Server (S), Templates (T) |
Affects Version/s: | 2.0.5 |
Fix Version/s: | 3.4.0alpha1, 3.4 (plan) |
Type: | New Feature Request | Priority: | Trivial |
Reporter: | Cristian Mammoli | Assignee: | Gregory Chalenko |
Resolution: | Fixed | Votes: | 33 |
Labels: | interval, macros | ||
Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
Environment: |
CentOS 6.4 |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub-Tasks: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Team: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sprint: | Sprint 1, Sprint 2, Sprint 3, Sprint 4, Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Story Points: | 28 |
Description |
Hi, having the possibility to define update intervals with macros would be a nice addition. Example: {$FAST} = 60 sec With this interval I can cover 99% of my items and changing one of them would update all the hosts within a template. Furthermore I could easily relax checks for specific hosts with slow connectivity or behind proxies. |
Comments |
Comment by richlv [ 2013 Mar 20 ] |
somewhat similar to |
Comment by Vladimir Goncharov [ 2013 Apr 18 ] |
It's great for some cases to use predefined timerange. For example: some template,10 hosts with this template. One host have problems. I'm replace (with macros) timeranges for more precision monitoring this host. When problems has gone, I can quiqly change back timeranges. |
Comment by Cristian [ 2013 May 07 ] |
The feature will be very useful. Currently hard codding the time intervals is less flexible. |
Comment by Linus Brimstedt [ 2013 Sep 10 ] |
I realize its not the original request; but for discovery, it would be very useful to be able to put lld macros in interval field. |
Comment by Mike Yurlov [ 2016 Nov 03 ] |
Real case: Theoretically we can do but we can't. Therefore we do separate "rock solid" template "template access" and "template distribution". Every template contain copy of all elemets from Template ICMP and Template SNMP Device. And here we can set different update intervals in every template separately. You lose the advantage of the inheritance patterns. Huh? |
Comment by romale [ 2016 Nov 18 ] |
+1 Expr: Descr: |
Comment by Alexander [ 2016 Nov 28 ] |
Yes, when this will introduced? |
Comment by Raymond Kuiper [ 2016 Nov 28 ] |
This would also be a very nice place to be abe to use context aware macros. |
Comment by Alexei Vladishev [ 2016 Dec 08 ] |
Raymond, that's exactly the plan. The functionality is in our roadmap for Zabbix 3.4. |
Comment by Raymond Kuiper [ 2016 Dec 08 ] |
Very nice, thanks for the feedback Alexei! Unfortunately, I don't see this ZBXNEXT on http://zabbix.org/wiki/Docs/roadmap#Zabbix_3.4_roadmap. |
Comment by romale [ 2016 Dec 16 ] |
It's also needed for calculation interface utilization, here is cisco formula: |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Dec 16 ] |
Dear romale, Store as set to Delta (speed per second) in item configuration will do the job for you. |
Comment by Vjaceslavs Bogdanovs [ 2017 Jan 31 ] |
(1) [S] Integer overflow is possible in:
as lifetime type changed from unsigned short to int with allowed upper limit defined (when checking user input) as 2147483647 (0x7fffffff). glebs.ivanovskis Current approach relies heavily on frontend-side validation and few more assumptions. I got your point, we need more robust time arithmetic. glebs.ivanovskis RESOLVED in r65533. vjaceslavs Thanks! CLOSED |
Comment by Vjaceslavs Bogdanovs [ 2017 Feb 01 ] |
(2) [S] Flexible interval parsing (flexible_interval_parse) and zbx_check_time_period fails because time_period_parse fails: if (SUCCEED != time_parse(&period->start_time, text, len, &parsed_len)) return FAIL; text += parsed_len; len -= parsed_len; if (0 >= len-- || '-' != *text) return FAIL; if (SUCCEED != time_parse(&period->end_time, text, len, &parsed_len)) return FAIL; There is a missing increment of pointer text in: if (0 >= len-- || '-' != *text) When checking time period like "00:00-24:00", first time_parse call is made with text "00:00-24:00", but second time_parse call is made with text "-24:00". glebs.ivanovskis Thank you! RESOLVED in r65525. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 02 ] |
(3) [S] When item becomes "not supported" due to invalid update interval it never gets polled again (unless server is restarted). And there are two ways to fix the issue:
So the problem is that "not supported" state does not really suit invalid interval case. Introducing new state might be a tall order. glebs.ivanovskis Finally RESOLVED in r67780. (There were actually many changes leading to this fix, I can't even name them all. It's probably better to review difference between dbconfig.c in development branch and trunk@<latest merge revision>.) vjaceslavs Looks like constants are copy-pasted in dbsync_item_preproc_row (lines 1556 - 1563) as there are different flags set by dbsync_check_row_macros, but only one constant (ZBX_DBSYNC_ITEM_COLUMN_DELAY) is used in checks. REOPENED glebs.ivanovskis Silly mistake, thank you for keeping an eye on me! RESOLVED in r67810. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 07 ] |
(4) [A][F][I][PS] There used to be very limited validation of History storage period and Trend storage period in frontend and API. Server should prevent potential overflows in housekeeper by limiting these fields during upgrade. glebs.ivanovskis However, this shouldn't cause any data loss, just annoying log messages if there are some bogus housekeeping settings (anything up to 24855 days will be fine). Some additional protection on server side is added in r65720. RESOLVED ([PS]) glebs.ivanovskis As discussed, housekeeping settings should be limited to 25 * 365 days. DB upgrade updated in r65729. Still RESOLVED (I mean [I] part.) sasha RESOLVED [AF] in r65940, r65947 iivs With minor coding style fixes in r66252, r66225 glebs.ivanovskis [I][PS] is still RESOLVED vjaceslavs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Feb 13 ] |
(5) [A][F][I][PS] For the sake on consistency, should we change web scenario step timeout to also support time unit suffixes? The default is 15 seconds. Instead of 15, the user could enter it as 15s. The validation of maximum timeout could be adjusted later. For example maximum could be entered as 1m. glebs.ivanovskis RESOLVED [I] in r65743 and [PS] in r65764. sasha RESOLVED [AF] in r66092 iivs With minor coding style fix in r66252 glebs.ivanovskis [IPS] are still RESOLVED vjaceslavs [I] is ok glebs.ivanovskis Which messages are you talking about? Web scenario errors like "cURL library is required for Web monitoring support" are not capitalized or ended with a dot as they are part of a longer message like "Step n of m failed: ..." vjaceslavs I was talking about messages like "update interval "XXX" is invalid", but I get the point. Messages are a part of a longer message, but this message does not end with the dot (Step "bebebe" [1 of 1] failed: update interval "33 cows" is invalid). But I agree, that it is not related to this subissue, so |
Comment by Ivo Kurzemnieks [ 2017 Feb 13 ] |
(6) [I] As discussed, the filter and subfilter in item list should be cleared on DB upgrade.
glebs.ivanovskis RESOLVED in r65714. vjaceslavs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Feb 13 ] |
(7) [I] Seems like some table columns still have old default values in data.tmpl although the new format is expected. glebs.ivanovskis There are two main reasons why it hasn't been done yet:
glebs.ivanovskis RESOLVED in r66079, r66209. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 13 ] |
(9) [F] Clean install of svn://svn.zabbix.com/branches/dev/ZBXNEXT-1675 r65686, went straight to graphs: frontends/php/include/graphs.inc.php:164 */ function get_min_itemclock_by_graphid($graphid) { $items = DBfetchArray(DBselect( - 'SELECT DISTINCT i.itemid,i.value_type,i.history,i.trends'. + 'SELECT DISTINCT i.itemid,i.value_type,i.history,i.trends,i.hostid'. ' FROM items i,graphs_items gi'. ' WHERE i.itemid=gi.itemid'. ' AND gi.graphid='.zbx_dbstr($graphid) sasha RESOLVED in r65938 iivs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 14 ] |
(10) [FS] Frontend fails to calculate required performance. glebs.ivanovskis Responding to frontend pings implemented in r66143, getting status information from server's cache is implemented in r66172. [S] RESOLVED sasha crash occurred while getting user stats ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f3073fd8725] /lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7f3073fe0f4a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f3073fe4abc] sbin/zabbix_server: trapper #3 [processing data](DBfree_result+0x82)[0x51bff4] sbin/zabbix_server: trapper #3 [processing data](status_user_stats+0x20c)[0x43917c] sbin/zabbix_server: trapper #3 [processing data][0x43948e] sbin/zabbix_server: trapper #3 [processing data][0x439c5c] sbin/zabbix_server: trapper #3 [processing data][0x43a04d] sbin/zabbix_server: trapper #3 [processing data](trapper_thread+0x1e8)[0x43a23a] sbin/zabbix_server: trapper #3 [processing data](zbx_thread_start+0x37)[0x4a480d] sbin/zabbix_server: trapper #3 [processing data](MAIN_ZABBIX_ENTRY+0x5d8)[0x41ee3d] sbin/zabbix_server: trapper #3 [processing data](daemon_start+0x30a)[0x496d73] sbin/zabbix_server: trapper #3 [processing data](main+0x281)[0x41e84f] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f3073f81830] sbin/zabbix_server: trapper #3 [processing data](_start+0x29)[0x412499] sasha REOPENED glebs.ivanovskis Crashing issue RESOLVED in r66174. sasha RESOLVED [F] in r66189 iivs Dashboard widget empty. In screens, the error is more visible: file_put_contents(/tmp/php.log): failed to open stream: No such file or directory [screenedit.php:283 → CView->render() → include() → CScreenBuilder->show() → CScreenServerInfo->get() → make_status_of_zbx() → get_status() → CZabbixServer->getStatus() → CZabbixServer->request() → file_put_contents() in include\classes\server\CZabbixServer.php:282] file_put_contents(/tmp/php.log): failed to open stream: No such file or directory [screenedit.php:283 → CView->render() → include() → CScreenBuilder->show() → CScreenServerInfo->get() → make_status_of_zbx() → get_status() → CZabbixServer->getStatus() → CZabbixServer->request() → file_put_contents() in include\classes\server\CZabbixServer.php:345] file_put_contents(/tmp/php.log): failed to open stream: No such file or directory [screenedit.php:283 → CView->render() → include() → CScreenBuilder->show() → CScreenServerInfo->get() → make_status_of_zbx() → get_status() → CZabbixServer->getStatus() → file_put_contents() in include\classes\server\CZabbixServer.php:184] REOPENED sasha RESOLVED in r66269 iivs CLOSED glebs.ivanovskis Improved server-side implementation in r67147. [S] is still RESOLVED vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 14 ] |
(11) [F] Error message can be improved. iivs The validation is on API side. Same validator used in other places that use the same syntax, so the error message is the same and won't be changed. Discussed with sasha. |
Comment by Ivo Kurzemnieks [ 2017 Feb 14 ] |
(12) [D] API documentation updated:
Additional changes: These pages needs to be updated:
REOPENED iivs RESOLVED sasha Thanks! CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Feb 14 ] |
(13) [F] Translation string changes. Strings added:
Strings deleted:
sasha Updated translation strings. CLOSED |
Comment by Natalja Romancaka [ 2017 Feb 14 ] |
(14) [F] The same error message for incorrect "Update interval" and "Custom intervals". iivs Now in API and DB there is only one field called "delay" that contains both delay and intervals separated by a semicolon. Visualy we didn't change this. Message comes from API as it should be. So... |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 16 ] |
(15) [D][I] Error "Incorrect value for field "lifetime": invalid lifetime" in LLD rule configuration when "{$M}d" is entered as Keep lost resources period. Database upgrade depends on this construction to work since macros were supported in this field before and there is no chance we can update macro value without breaking it's usage in other places. glebs.ivanovskis It was decided to overwrite all macros used in this field with maximum allowed value during upgrade and document this in Upgrade notes. glebs.ivanovskis RESOLVED in r65746. vjaceslavs CLOSED |
Comment by Alexander Vladishev [ 2017 Feb 16 ] |
(16) [F] r65757: Reduced the amount of code in CSimpleIntervalParser class. Please review. iivs CLOSED |
Comment by Alexander Vladishev [ 2017 Feb 16 ] |
(17) [F] r65766,r65767: Reduced the amount of code in CTimePeriodParser class. Please review. iivs CLOSED |
Comment by Alexander Vladishev [ 2017 Feb 16 ] |
(18) [F] r65768,r65989: Fixed parsing of time periods by CTimePeriodsParser class. Updated unit tests. iivs Removed unused variable in r66078, otherwise good. |
Comment by Natalja Romancaka [ 2017 Feb 17 ] |
(19) [F] can't use time unit in User profile → Messaging - Message timeout. Also not changed string Message timeout (seconds) → Message timeout sasha RESOLVED in r65898 (string), r66118 (time suffix) iivs With minor coding style fix in r66232 |
Comment by Natalja Romancaka [ 2017 Feb 17 ] |
(20) [F] error message "Incorrect method "user.resetErrors"." when try to update user profile with wrong (e.g. empty) "Refresh" or "Auto-logout" sasha RESOLVED in r66074 natalja.zabbix if wrong "Auto-logout" error: Undefined offset: 0 [profile.php:197 → CView->render() → include() → timeUnitToSeconds() in include/func.inc.php:777] sasha RESOLVED in r66190 iivs Another problem with autologout in users and profile pages: REOPENED sasha RESOLVED in r66469 iivs CLOSED |
Comment by Alexander Vladishev [ 2017 Feb 17 ] |
(21) [F] r65809: Fixed parsing of scheduled intervals by CSchedulingIntervalParser class. Updated unit tests. iivs Interval md1md2 is invalid. There cannot be another month day. Other time units are affected as well. Added unit tests (that currently fail) in r66098 REOPENED sasha Thanks a lot! RESOLVED in r66103 iivs Great! |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 21 ] |
(22) [S] Host/template macros do not work in item update intervals and history/trend storage period. RESOLVED in r65870, r66223. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 21 ] |
(23) [F] We need to display minutes and months differently. Here I have 180s update interval an 90d history storage period: Also frontend does not use week suffix at all. It shows 1m 5d for 5w. Also (I guess it's an old issue) it shows 1y for 360d - 365d and 52w. Personally, I would not use months and years as time units because of their ambiguity. For example, Zabbix year is neither astronomical nor calendar one on ~25% of occasions. glebs.ivanovskis (31) will partially resolve the problem. sasha It is duplicate of CLOSED |
Comment by richlv [ 2017 Feb 21 ] |
subissue (23) seems to be a duplicate of glebs.ivanovskis But at the time of <richlv> ...and also graph titles like (1h 3m) or (3m) - and possibly other places |
Comment by Alexander Vladishev [ 2017 Feb 21 ] |
(24) [F] r65880: Fixed parsing of scheduled intervals by CUpdateIntervalParser class. Updated unit tests. iivs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 21 ] |
(25) [S] Probably LLD should validate intervals and history/trend storage period and either not update these fields with invalid values for existing items or fail to create new items with invalid settings. Although it will come with additional cost of user macro resolving. glebs.ivanovskis We discussed it and decided that it is not 100% necessary to have such validation right now. So we decided to postpone this subissue. CLOSED |
Comment by Alexander Vladishev [ 2017 Feb 22 ] |
(26) [F] r65902: Disabled default support of macros by new parsers. iivs With minor fix in r66106 |
Comment by Alexander Vladishev [ 2017 Feb 22 ] |
(27) [F] r65914: API validator improvements iivs CLOSED |
Comment by Alexander Vladishev [ 2017 Feb 22 ] |
(28) [I] config.refresh_unsupported in data.tmpl must be changed from 600 to 10m glebs.ivanovskis Duplicates (7). I haven't touched much of data.tmpl, but I keep that in mind. glebs.ivanovskis As discussed, changed config.refresh_unsupported and config.work_period defaults in r66048, r66049, r66055, r66108. RESOLVED glebs.ivanovskis Reworked DCsync_config() to use defaults from DB schema in r66090. Still RESOLVED sasha ZBX_PROXY flag must be removed from dbupgrade scripts glebs.ivanovskis RESOLVED in r66113. sasha CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 27 ] |
(29) [FI] Slide show delay should support time unit suffixes for consistency. glebs.ivanovskis Database upgrade and schema updates in r66056, r66096. Partially RESOLVED sasha [F] RESOLVED in r66110 iivs CLOSED glebs.ivanovskis [I] is still RESOLVED. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 27 ] |
(30) [FIS] The syntax of multiple periods must prohibit trailing ';' (working hours, action condition time period, user media activity period). Database upgrade must delete trailing ';' from these fields. glebs.ivanovskis Database patch added in r66067 and fixed by sasha in (35) r66076. Server already prohibits trailing semicolon. Partially RESOLVED iivs Trailing semicolon RESOLVED by sasha in (18) [AF] r65989. Upgrade patch needs testing. RESOLVED glebs.ivanovskis One more fix in r66115. Still RESOLVED vjaceslavs [IS] CLOSED, [F] still RESOLVED sasha [AF] already tested by iivs under (18). [AFIS] CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 28 ] |
(31) [F] In Configuration->Templates/Hosts->Items update intervals and history/trend storage periods should be viewed as they are displayed in item edit form to avoid confusion. Subfilters should still use conversions. sasha RESOLVED in r66077 natalja.zabbix In Configuration->Templates/Hosts->Items prototypes update intervals still converted to seconds. sasha RESOLVED in r66306 iivs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 28 ] |
(32) [I] New limits in action and operation step durations require database upgrade to crop values exceeding new limits to the maximum allowed value. glebs.ivanovskis RESOLVED in r66068. vjaceslavs CLOSED |
Comment by Alexander Vladishev [ 2017 Mar 01 ] |
(33) [F] r65873: minor code improvements in CFlexibleIntervalParser() class iivs CLOSED |
Comment by Alexander Vladishev [ 2017 Mar 01 ] |
(34) [AF] r65923, r65938, r65940, r65947, r65953, r65954, r65955, r66074: code improvements during code review iivs Some improvements and fixes from my side in r66098, r66106, r66185, r66196, r66208, r66210, r66225, r66232, r66252, r66260, r66283, r66285, r66288, r66299, r66300. Please, review. sasha I accept all changes, except changes in r66283. These changes broke API tests and absolutely useless. REOPENED sasha RESOLVED in r67665 iivs Really sorry about that. Thanks for fixing this. CLOSED |
Comment by Alexander Vladishev [ 2017 Mar 01 ] |
(35) [I] r66076: fixed SQL error in database upgrade patch glebs.ivanovskis Thank you! |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 02 ] |
(36) Blank screen on login page after successful setup on a clean install of r66093 (PostgreSQL). [Thu Mar 02 09:45:48.431702 2017] [:error] [pid 4622] [client 127.0.0.1:60804] PHP Fatal error: Uncaught DBException: Table "profiles" does not exist. in /var/www/html/ZBXNEXT-1675/include/classes/db/DB.php:81\nStack trace:\n#0 /var/www/html/ZBXNEXT-1675/include/classes/db/DB.php(216): DB::exception(3, 'Table "profiles...')\n#1 /var/www/html/ZBXNEXT-1675/include/classes/user/CProfile.php(34): DB::getSchema('profiles')\n#2 /var/www/html/ZBXNEXT-1675/include/classes/user/CProfile.php(211): CProfile::init()\n#3 /var/www/html/ZBXNEXT-1675/include/menu.inc.php(393): CProfile::update('web.menu.login....', 'index.php', 3)\n#4 /var/www/html/ZBXNEXT-1675/include/page_header.php(127): zbx_construct_menu(Array, Array, Array)\n#5 /var/www/html/ZBXNEXT-1675/include/views/general.login.php(30): require_once('/var/www/html/Z...')\n#6 /var/www/html/ZBXNEXT-1675/include/classes/mvc/CView.php(139): include('/var/www/html/Z...')\n#7 /var/www/html/ZBXNEXT-1675/index.php(116): CView->render()\n#8 {main}\n thrown in /var/www/html/ZBXNEXT-1675/include/classes/db/DB.php on line 81, referer: http://localhost/ZBXNEXT-1675/setup.php It complains about missing profiles, but everything seems to be fine in the database: zbxnext_1675=> \d profiles Table "public.profiles" Column | Type | Modifiers -----------+------------------------+---------------------------------------- profileid | bigint | not null userid | bigint | not null idx | character varying(96) | not null default ''::character varying idx2 | bigint | not null default '0'::bigint value_id | bigint | not null default '0'::bigint value_int | integer | not null default 0 value_str | character varying(255) | not null default ''::character varying source | character varying(96) | not null default ''::character varying type | integer | not null default 0 Indexes: "profiles_pkey" PRIMARY KEY, btree (profileid) "profiles_1" btree (userid, idx, idx2) "profiles_2" btree (userid, profileid) Foreign-key constraints: "c_profiles_1" FOREIGN KEY (userid) REFERENCES users(userid) ON DELETE CASCADE zbxnext_1675=> select * from profiles; profileid | userid | idx | idx2 | value_id | value_int | value_str | source | type -----------+--------+-----+------+----------+-----------+-----------+--------+------ (0 rows) sasha Cannot reproduce. WON'T FIX glebs.ivanovskis Issue resolved all by itself around r66108. |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 02 ] |
(37) [I] As discussed, upgrade patch should not change default filed values like 0 -> 0s, 0 -> 0d, etc. Upgrade patch should not change 0 to 0s or 0d, especially in those places where 0 is used as a special value (e.g. 0 - use default). glebs.ivanovskis RESOLVED in r66108. vjaceslavs CLOSED |
Comment by Alexander Vladishev [ 2017 Mar 02 ] |
(38) [F] r66114: removed useless ZBX_DEFAULT_OPERATION_STEP_DURATION iivs Removed few more unused defines in r66916. |
Comment by Alexander Vladishev [ 2017 Mar 02 ] |
(39) [I] Upgraded PostgreSQL database has some differences: items.delay, operations.esp_period and slides.delay --- upg.dump 2017-03-02 17:50:34.665301640 +0200 +++ new.dump 2017-03-02 17:26:02.271114696 +0200 @@ -1237,7 +1237,7 @@ hostid bigint NOT NULL, name character varying(255) DEFAULT ''::character varying NOT NULL, key_ character varying(255) DEFAULT ''::character varying NOT NULL, - delay character varying(1024) DEFAULT 0 NOT NULL, + delay character varying(1024) DEFAULT '0'::character varying NOT NULL, history character varying(255) DEFAULT '90d'::character varying NOT NULL, trends character varying(255) DEFAULT '365d'::character varying NOT NULL, status integer DEFAULT 0 NOT NULL, @@ -1474,7 +1474,7 @@ operationid bigint NOT NULL, actionid bigint NOT NULL, operationtype integer DEFAULT 0 NOT NULL, - esc_period character varying(255) DEFAULT 0 NOT NULL, + esc_period character varying(255) DEFAULT '0'::character varying NOT NULL, esc_step_from integer DEFAULT 1 NOT NULL, esc_step_to integer DEFAULT 1 NOT NULL, evaltype integer DEFAULT 0 NOT NULL, @@ -1945,7 +1945,7 @@ slideshowid bigint NOT NULL, screenid bigint NOT NULL, step integer DEFAULT 0 NOT NULL, - delay character varying(32) DEFAULT 0 NOT NULL + delay character varying(32) DEFAULT '0'::character varying NOT NULL ); glebs.ivanovskis RESOLVED in r66119. sasha To prevent such problems in future it must be fixed in DBmodify_field_type_sql() function REOPENED glebs.ivanovskis Please review r66120, r66131. 8405:20170303:115007.227 query [txnlev:1] [alter table users alter autologout type varchar(32); alter table users alter autologout set default '15m'] ... 8405:20170303:115007.244 query [txnlev:1] [alter table users alter autologout set default '15m'] Also removed redundant ;\n so that 6275:20170303:094409.617 query [txnlev:1] [alter table globalvars alter snmp_lastsize type numeric(20); alter table globalvars alter snmp_lastsize set default '0'; ] becomes 8405:20170303:115007.132 query [txnlev:1] [alter table globalvars alter snmp_lastsize type numeric(20); alter table globalvars alter snmp_lastsize set default '0'] RESOLVED sasha Thanks! CLOSED |
Comment by Natalja Romancaka [ 2017 Mar 08 ] |
(40) [I] missed time unit 'd' for existing Template->Discovery rule in field "Keep lost resources period" glebs.ivanovskis Related to (7). RESOLVED in r66209. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 08 ] |
(41) [F] Latest data shows nothing even though I can see data in graphs and screens. Results for this query are not empty. select i.key_,hi.clock,hi.ns,hi.value from history hi,items i,hosts h,items_applications ia,applications a where h.name='Zabbix server' and i.hostid=h.hostid and a.name='CPU' and a.applicationid=ia.applicationid and i.itemid=ia.itemid; sasha RESOLVED in r66268 iivs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 08 ] |
(42) [AF] Mass update of update interval drops item preprocessing options. I have not checked in trunk, could be a common issue. glebs.ivanovskis Same thing in trunk. |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 09 ] |
(43) Updated to the latest trunk in r66242, conflicting files were:
Please review. iivs PHP code REVIEWED. glebs.ivanovskis Another non-trivial merge from trunk in r67523. Resolved conflicts in:
Please have a look, particularly at CHttpTest.php. sasha Excellent! CLOSED |
Comment by Alexander Vladishev [ 2017 Mar 09 ] |
(44) [S] Server crash. Probably related to update in r66242. 16271:20170309:152755.893 === Backtrace: === 16271:20170309:152755.894 12: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](zbx_log_fatal_info+0x169) [0x498000] 16271:20170309:152755.894 11: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history]() [0x49846c] 16271:20170309:152755.894 10: /lib/x86_64-linux-gnu/libc.so.6(+0x354a0) [0x7f4da292f4a0] 16271:20170309:152755.894 9: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](zbx_determine_items_in_expressions+0x215) [0x46ac9e] 16271:20170309:152755.894 8: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history]() [0x46fceb] 16271:20170309:152755.894 7: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](DCsync_history+0x51a) [0x472d60] 16271:20170309:152755.894 6: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](dbsyncer_thread+0x169) [0x4202b1] 16271:20170309:152755.894 5: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](zbx_thread_start+0x37) [0x4a502b] 16271:20170309:152755.894 4: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](MAIN_ZABBIX_ENTRY+0x73d) [0x41f092] 16271:20170309:152755.894 3: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](daemon_start+0x300) [0x497464] 16271:20170309:152755.894 2: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](main+0x281) [0x41e93f] 16271:20170309:152755.894 1: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f4da291a830] 16271:20170309:152755.894 0: sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000008 sec, syncing history](_start+0x29) [0x412589] glebs.ivanovskis Root cause: |
Comment by Natalja Romancaka [ 2017 Mar 10 ] |
(45) [F] Sorting by intervals/history/trend doesn't work correctly with time units iivs Another problem related to sorting. For example, trapper item types have no delay and it's displayed empty. The sorting by delay is now random. Those trapper items are somewhere in the middle after "0", "0d", "0m" but before "0s", "0w". This affects items, item prototypes and LLD rules. Sorting by trends is also affected. sasha RESOLVED in r66306, r66341 and r66342 iivs Sorting by trends, empty values may still appear somewhere in the middle. REOPENED sasha RESLOVED in r67265 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(46) [F] In latest data with enabled show details and enabled housekeeping, the values for history and trends are shown in seconds. sasha RESOLVED in r66341 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(47) [F] Latest data (latest.php):
sasha RESOLVED in r66306, r66341, r66342 and r66397 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(48) [AF] Maybe let's trim leading zeroes like we used to before and save them in DB. 000 and 0 means the same thing. Also we have suffixes like 0d, 0m, 0w that also mean the same thing. Thus searching by 0, nothing is found and the sorting is also alphabetical. sasha RESOLVED in r66484 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(49) [F] Searching by delay has become hard if we have flexible or scheduling intervals. If delay is 0, it's not possible to seach by 0. Also if delay is any other value, since it's now one field and we search the exact match. sasha RESOLVED in r66483 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(50) [F] In edit form the history and trends (if enabled) consolidates the value 69d -> 2m 9d. We could display the value only in days, by extending the conversion function with additional parameter to display the desired output. sasha RESOLVED in r66424 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(51) [F] T_ZBX_PERIOD and T_ZBX_PERIOD_MACRO is actually interval and can be mistaken with time period. Let's rename it to time unit like T_ZBX_TU, for example. sasha RESOLVED in r66426, r66429 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(52) [F] Several places use strpos(), for example in forms.inc.php L684, but we already know that it's a string and cannot contain macros in the middle of the string. So we can change (strpos($trends, '{') === false) to $trends[0] === '{'. Please, check other places as well. sasha RESOLVED in r66397 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(53) [F] Status of Zabbix available in screens for all users and it's the same widget used in other places. We could show that widget in reports page and dashboard now too. sasha Let's make it under more related task! Moved to WON'T FIX iivs Good idea. |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(54) [F] In items, item prototypes, discovery that uses custom intervals, we could use additional validation in check_fields() for "delay", since we have a separate temporary parameter "delay_flex". That way we can no longer enter full update interval in small delay field. sasha RESOLVED in r66429 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(55) [F] Replace hardcoded 2147483647 with something different. sasha RESOLVED in r66415 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(56) [A] CItemGeneral.php L285: That causes a new bug. When scheduling interval exists, but all other delays (also flexible is given) are 0, the string passes validation. sasha RESOLVED in r66422 iivs CLOSED |
Comment by Ivo Kurzemnieks [ 2017 Mar 10 ] |
(57) [F]
sasha RESOLVED in r66434 iivs CLOSED |
Comment by Vjaceslavs Bogdanovs [ 2017 Mar 30 ] |
(59) [F] SQL error in problem view (Monitoring -> Problems): vjaceslavs Looks like there was a was some problem with a DB migration from previous tests. Recreated DB, problem is gone, so |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Apr 25 ] |
(64) [AF] Next check of web scenarios and network discoveries is not being reset on changes of update interval. iivs RESOLVED in r67619 sasha Successfully tested! Have a look at my changes in r67666. iivs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Apr 25 ] |
(65) [AF] Range checking is broken in web scenario step timeout and user profile refresh and auto-logout settings. It cannot be fully explained by my stupidity in r67523, because I touched only web scenario step timeout validation there. iivs It was due to incorrect define. RESOLVED in r67568 sasha CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Apr 27 ] |
(66) [D] Related to (64). Resetting nextcheck to 0 will help in case of network discovery and web scenario update interval changes like 1w->1h. However, if a user macro is used in update interval and its value changes 1w->1h, nextcheck will remain far in the future. Proper fix would involve moving discovery rules and web scenarios into server's configuration cache and will not happen within this task. For now it should be documented as a limitation. martins-v Added to:
RESOLVED glebs.ivanovskis Thank you! |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Apr 27 ] |
(67) [PS] Another error message wasn't properly formatted. RESOLVED in r67618. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Apr 28 ] |
(68) [PS] Handling of invalid intervals in web scenarios and network discovery was not ideal. Server used to set next check to year 2038 with no way back. Now it will use Refresh notsupported items setting to schedule next check of "unschedulable" network discovery or web scenarios (without actually executing them). This should both give user a chance to fix configuration and protect server from excessive load. RESOLVED in r67667. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 03 ] |
(69) [S] Server complains about 0 in global history/trends storage period override: 3560:20170503:133528.624 history data housekeeping will be disabled and all items will store their history due to invalid global override settings Thanks to vjaceslavs for spotting missing '*'! RESOLVED in 67806. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 03 ] |
(71) [FS] SQL errors in Administration->Proxies, frontend tries to calculate required proxy performance like that: SELECT h.proxy_hostid,SUM(1.0/i.delay) AS qps FROM hosts h,items i WHERE h.hostid=i.hostid AND h.status=0 AND i.status=0 AND i.delay<>0 AND i.flags<>2 AND h.proxy_hostid='10108' GROUP BY h.proxy_hostid glebs.ivanovskis Server will now provide necessary per-proxy information within status.get protocol. [S] RESOLVED in r67938, r67944, r67954, r67955, r67959, r67960, r67966, r67971. sasha [F] RESOLVED in r67974 oleg.egorov [F] CLOSED glebs.ivanovskis [S] now properly RESOLVED after r68087, r68101, r68102, r68109. Note that there were two significant changes in behavoiur: LLD rules are no longer counted in required performance and web scenario items will be now counted along with other types of items. And we now count all items on disabled hosts as disabled. glebs.ivanovskis Stylistic improvements in r68199. [S] is still RESOLVED vjaceslavs Looks good to me! CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 03 ] |
(72) [P] Proxy is crashing when syncing configuration from the empty database for the first time. Problem is that if there are no rows in config table we try to take data from schema defaults and there is no default for discovery_groupid. RESOLVED in r67829. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 13 ] |
(73) [PS] Please have a look at my minor changes in r68097 and r68096. sasha I don't see sense in these changes. Please describe it! +#if USER_TYPE_UNDEFINED != 0 +# error "expression below assumes that atoi() of non-numeric value will yield USER_TYPE_UNDEFINED too" +#endif glebs.ivanovskis Well, maybe I went too paranoid. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 13 ] |
(74) [D] Status of Zabbix and Administration->Proxies descriptions will need an update after (71) is settled down. Seems no need to update internal item documentation and no need to mention this in upgrade notes. glebs.ivanovskis Please review my changes to the aforementioned pages. RESOLVED martins-v Looking good to me. I know that sasha wanted to have a look, too. glebs.ivanovskis He had and he wanted to drop one sentence in Number of items:
I have no strong objections against it. So it's up to you. martins-v I've removed the sentence. glebs.ivanovskis CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 17 ] |
Available in pre-3.4.0alpha1 (trunk) r68215. |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 17 ] |
(75) [S] Defect reported by Coverity (CID 162508). Invalid user media activity period is not handled properly. glebs.ivanovskis RESOLVED in a new svn://svn.zabbix.com/branches/dev/ZBXNEXT-1675 r68223. vjaceslavs CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 17 ] |
Fix for (75) is available in pre-3.4.0alpha1 (trunk) r68228. |
Comment by Gregory Chalenko [ 2017 May 30 ] |
Fixed in:
|