[ZBX-10761] clean wrong values in "triggers" table (for trigger prototypes) using db patches Created: 2016 May 06 Updated: 2017 May 30 Resolved: 2016 Aug 11 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.17, 2.2.11, 2.4.8, 3.0.2 |
Fix Version/s: | 3.2.0alpha2 |
Type: | Incident report | Priority: | Major |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | dbpatches, triggerprototypes | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
In I believe such wrong entries have to be fixed using upgrade patches. From a production installation: mysql> select count(*) from triggers where flags=2; +----------+ | count(*) | +----------+ | 4512 | +----------+ 1 row in set (0.48 sec) mysql> select error, count(*) from triggers where flags=2 and error not like "" group by error; +----------------------------+----------+ | error | count(*) | +----------------------------+----------+ | Agent is unavailable. | 2481 | | SNMP agent is unavailable. | 53 | +----------------------------+----------+ 2 rows in set (0.58 sec) mysql> select state, count(*) from triggers where flags=2 group by state; +-------+----------+ | state | count(*) | +-------+----------+ | 0 | 1978 | | 1 | 2534 | +-------+----------+ 2 rows in set (0.49 sec) |
Comments |
Comment by Oleksii Zagorskyi [ 2016 May 06 ] |
One more point to discuss and decide: This sub issue could be closed as won't fix (when original bug will be fixed) but it have to be diced by frontend devs. |
Comment by Sergejs Paskevics [ 2016 Aug 01 ] |
Added upgrade patch in development branch svn://svn.zabbix.com/branches/dev/ZBX-10761 |
Comment by Alexander Vladishev [ 2016 Aug 01 ] |
(1) Please do not use constants like TRIGGER_STATE_NORMAL and ZBX_FLAG_DISCOVERY_PROTOTYPE in the upgrade patches s.paskevics RESOLVED in r61302, r61314 sasha CLOSED with fix in r61547, r61548. |
Comment by Alexander Vladishev [ 2016 Aug 01 ] |
(2) This patch is optional. Please remove mandatory flag . s.paskevics RESOLVED in r61302, r61303, r61314 sasha CLOSED |
Comment by Alexander Vladishev [ 2016 Aug 01 ] |
(3) Space between updated fields should be removed
s.paskevics RESOLVED in r61302, r61314 sasha CLOSED |
Comment by Sergejs Paskevics [ 2016 Aug 11 ] |
Fixed in 3.2.0alpha2 (trunk) r61582. |