[ZBX-6294] Nodata trigger is "fired" immediately after maintenance ends Created: 2013 Feb 19  Updated: 2019 Apr 02  Resolved: 2013 Oct 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.5
Fix Version/s: 2.1.8

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: maintenance, nodata
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File events.png     PNG File maintenance_settings.png     PNG File trigger_settings.png    
Issue Links:
Duplicate

 Description   

Nodata function behavior is not correspond with documentation: https://www.zabbix.com/documentation/2.0/manual/maintenance

When "no data" maintenance ends, triggers using nodata() function will not fire before new data arrives during the period they are checking.

So nodata function should not be fired while new data is not arrived.

Look screenshots for getting more information.



 Comments   
Comment by Aleksandrs Saveljevs [ 2013 Oct 08 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-6294 .

Comment by Alexander Vladishev [ 2013 Oct 09 ]

(1) Incorrect condition. We can change a maintenance type within a maintenance.

For example:

 maintenance without       maintenance with    no maintenance
 data collection           data collection
1-------------------------2-------------------3--------------->
if (HOST_MAINTENANCE_STATUS_ON == dc_host->maintenance_status &&                                        
                MAINTENANCE_TYPE_NODATA == dc_host->maintenance_type &&                                 
                HOST_MAINTENANCE_STATUS_OFF == maintenance_status)                                      
        dc_host->maintenance_until = maintenance_until;                                                 
else                                                                                                    
        dc_host->maintenance_until = 0;                                                                 

asaveljevs RESOLVED in r39176.

sasha REOPENED

  • dc_host->maintenance_util shouldn't be cleared anyway

asaveljevs RESOLVED in r39238, together with renaming of "time_added" and "maintenance_until" to "data_expected_from" and another bug with setting "data_expected_from" if maintenance type is changed.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 09 ]

(2) We should use braces in case "if" condition takes several lines.

  • src/libs/zbxdbcache/dbconfig.c:4576

asaveljevs RESOLVED in r39176.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 09 ]

(3) Two functions DCconfig_get_maintenance_until() and DCget_item_time_added() should be merged.

asaveljevs RESOLVED in r39176.

sasha CLOSED

Comment by Aleksandrs Saveljevs [ 2013 Oct 10 ]

(4) You suggested removing "where value in (TRIGGER_VALUE_OK, TRIGGER_VALUE_PROBLEM)" clauses in SQL queries. Please take a look at r39225.

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 11 ]

(5) Please review my changes in r39248.

asaveljevs Thank you! CLOSED.

Comment by Alexander Vladishev [ 2013 Oct 11 ]

Successfully tested!

Comment by Aleksandrs Saveljevs [ 2013 Oct 14 ]

Fixed in pre-2.1.8 (trunk) r39257.

Generated at Thu Apr 25 04:36:18 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.