[ZBX-11191] The monitor data cannot be correctly received after update web scenario steps Created: 2016 Sep 12  Updated: 2017 May 30  Resolved: 2016 Nov 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Server (S)
Affects Version/s: 3.0.3
Fix Version/s: 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1

Type: Incident report Priority: Blocker
Reporter: haifeng Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File cannot-update-web-scenario.png     PNG File web-scenario-added.png     PNG File web-scenario-updated.png    

 Description   

When i create one web scenario with a step, the monitor data can be correctly received.But i modify remove the step and add the step with same name with previous step. The monitor data can not be correctly received.

I query the item from the database , and the web scenario item also not be created for the steps.

The detail steps:
1. create web scenario 1 - step 1 — monitor data ok
2. modify web scenario 1 - delete step 1 and add step1 — monitor data nok

The issue can be reproduced on zabbix version 3.0.3.



 Comments   
Comment by haifeng [ 2016 Sep 12 ]

Up...

Comment by richlv [ 2016 Sep 12 ]

i seem to recall something similar being reported before, but can't find it right now - issues like ZBX-8265 and ZBX-8280 seem to be different

Comment by richlv [ 2016 Sep 12 ]

sorry, what do you mean by "Up" ?

Comment by haifeng [ 2016 Sep 12 ]

I want not let the issue down to unvisible, so comment it with up to set it up.
The issue may be similar issue with ZBX-8280, but there still no be the solution.

Comment by haifeng [ 2016 Sep 12 ]

When i update the https steps, the items(download speed, response time) for http step not be created for the modify.
That's why the issue occured.
But why the items not be created when update the http steps with same step names?
I think there is one bug.

Comment by richlv [ 2016 Sep 12 ]

oh, there probably is a bug, but just spamming issues with comments doesn't make them more visible - the opposite, it makes them harder to read

Comment by haifeng [ 2016 Sep 12 ]

Ok, i will not do it next time.
But how to make the issue be assigned and be processed by someone?

Comment by richlv [ 2016 Sep 12 ]

for guaranteed response you'd have to look into commercial support: http://www.zabbix.com/support.php

Comment by Aleksandrs Saveljevs [ 2016 Sep 12 ]

With the latest Zabbix 3.0, there is the following error in the frontend when editing a Web scenario by removing and adding the same step back:

Comment by Aleksandrs Saveljevs [ 2016 Sep 12 ]

Therefore, setting to "Confirmed".

Comment by haifeng [ 2016 Sep 12 ]

But i can not get the update error alert when i do the update, and the response of update is success.
the issue can be reproduced by web page or api.
So is it the same issue?

Comment by Aleksandrs Saveljevs [ 2016 Sep 12 ]

Well, we have to fix the SQL error before we try to reproduce your case.

Comment by Ivo Kurzemnieks [ 2016 Sep 29 ]

Frontend SQL errors RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-11191

Comment by Ivo Kurzemnieks [ 2016 Sep 29 ]

(1) Translation strings added:

  • Cannot update step name for a templated web scenario "%1$s".
  • Incorrect templated web scenario step count.
  • Web scenario step is missing parameters: %1$s

gunarspujats CLOSED

Comment by Aleksandrs Saveljevs [ 2016 Oct 04 ]

(2) There is now the following undefined index when creating a simple Web scenario on a host:

iivs RESOLVED in r62977

gunarspujats CLOSED

Comment by Aleksandrs Saveljevs [ 2016 Oct 04 ]

(3) Edit a step in an existing Web scenario, then update that scenario. Observe the following:

iivs RESOLVED in r62984

gunarspujats CLOSED

Comment by Aleksandrs Saveljevs [ 2016 Oct 04 ]

haihaifeng, could you please try the fixed frontend from the development branch (svn://svn.zabbix.com/branches/dev/ZBX-11191) and see if the problem is still present? If so, what are the exact steps to reproduce it? (We tried the steps from the original description as we understood them, but we got a SQL error which you did not have.)

Comment by haifeng [ 2016 Oct 06 ]

Seems the issue can not be reproduced in the new branch.

Comment by Gunars Pujats (Inactive) [ 2016 Oct 17 ]

(4) Coding style
As discussed with sasha and oleg.egorov function checkRequiredKeys() should be replaced with array_diff()

iivs We make these functions for the sake of convenience. Why don't we remove other one-line functions then?

RESOLVED in r63220

gunarspujats CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Oct 18 ]

Tested.

Comment by Ivo Kurzemnieks [ 2016 Oct 18 ]

(5) SQL errors already merged in ZBX-10842. Merging results in difficult conflicts. This issue needs to be re-done and re-tested, if at all.

iivs it seems like the SQL errors were already gone, but the code added in this branch offers several other web scenario API fixes. Conflicts and semantic erros resolved in r63268. Please review.

gunarspujats CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Oct 20 ]

(6) Coding style flaws were introduced in ZBX-10842 :

  • CHttpTestManager
    :205-206 - redundant code, assignment of same step multiple times.
    :244-271 - redundant code
    :709 - redundat variable testItemIds
    :730 - superfluous call of array_merge()

Could be fixed in this task.

gunarspujats RESOLVED in r63344

iivs The removed code was not redundant. It was working just fine. Not step items are broken. Assigning application and status change does not work correctly for step items.

REOPENED

gunarspujats RESOLVED in r63410

iivs CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Oct 31 ]

Tested

Comment by Ivo Kurzemnieks [ 2016 Oct 31 ]

Fixed in:

  • pre-3.0.6rc1 r63441
  • pre-3.2.2rc1 r63442
  • pre-3.3.0 (trunk) r63443

The original issue seems fixed in ZBX-10842. In this issue, however, we fixed miscellaneous bugs and undefinded indexes regarding the web scenarios.

Q: What is fixed?
A: Web scenarios now properly update step items when given only applicationid and steps with httpstepid. Now it's not possible to update a templated scenario step name or give a different amout of steps and in the original template. Additionally improved web scenario step validation by adding required fields.

Comment by Ivo Kurzemnieks [ 2016 Oct 31 ]

(7) [D] API documentation updated:

sasha CLOSED

Comment by Alexander Vladishev [ 2016 Nov 01 ]

(8) broken 3.2 and trunk:

Fatal error: Uncaught Error: Call to undefined function checkRequiredKeys() in include/classes/api/services/CHostGroup.php:686 Stack trace: #0 include/classes/api/services/CHostGroup.php(359): CHostGroup->validateCreate(Array) #1 include/classes/api/clients/CLocalApiClient.php(123): CHostGroup->create(Array) #2 include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod('hostgroup', 'create', Array, 'ae836cfa071d15d...') #3 include/classes/api/wrappers/CApiWrapper.php(94): CFrontendApiWrapper->callClientMethod('create', Array) #4 include/classes/api/wrappers/CFrontendApiWrapper.php(63): CApiWrapper->callMethod('create', Array) #5 include/classes/api/wra in include/classes/api/services/CHostGroup.php on line 686

Affected methods: hostgroup.create() and correlation.create()

iivs Fixed directly in 3.2 r63463 and trunk r63464

RESOLVED

sasha CLOSED

Comment by Oleksii Zagorskyi [ 2016 Dec 04 ]

About new strings.
I suppose that:
"Incorrect templated web scenario step count."
should be in plural form:
"Incorrect templated web scenario stepS count."

No?

Comment by richlv [ 2016 Dec 05 ]

zalex_ua, no, that's one of the relative peculiarities of english, singular is correct here (actually, plural would be wrong).
similar cases have been wrong in the zabbix frontend - like the recently changed "multiple problem events generation" was finally fixed to be "multiple problem event generation"

Generated at Thu Apr 25 03:16:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.