[ZBX-7822] MySQL insert into "alerts" table fails with "[Z3005] query failed: [1406] Data too long for column 'message'" in case of very long alert messages Created: 2014 Feb 17 Updated: 2017 Aug 01 Resolved: 2014 Feb 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.9 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Gabriele Armao | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Zabbix Server 2.0.9 using MySQL 5.6.12-56 Percona Server |
Attachments: |
![]() ![]() |
||||||||
Issue Links: |
|
Description |
in this case, I have a trigger that sends out an email including the item.lastvalue, the problem is that the item is set as "text", so it's limited to 65535 chars, no problem here, the problem arises when that item generates and event and a trigger fires, making an action take place, the action is to send an email with some informative text, the alert is then stored by Zabbix into the alerts table, along with the full message sent by the action, and here's the problem, the "item.lastvalue" + the action text is bigger than 65535 chars, thus generating a MySQL error while zabbix tries to insert the alert entry, since that column is also defined as "text". Attacched a txt with the full error from zabbix_server.log |
Comments |
Comment by Nikolajs Agafonovs (Inactive) [ 2014 Feb 26 ] |
Attached log file shows that you have Oracle, but description say about MySQL. What DB there is anyway? |
Comment by Gabriele Armao [ 2014 Feb 26 ] |
Zabbix server uses MySQL, the error you see is coming from a text item checking an external Oracle database through system.run, so the Oracle messages there are the actual item lastvalue. |
Comment by Nikolajs Agafonovs (Inactive) [ 2014 Feb 27 ] |
We tried to repeat this error (Zabbix 2.0.9, MySQL 5.5.35). Used expression: "item.lastvalue" + the action text (bigger than 65535 chars). Message was trimmed to 65535 chars and inserted in DB with no error. |
Comment by Gabriele Armao [ 2014 Feb 27 ] |
ok some more background: the system.run[check_alert "{$CONNSTR1}"] item, is configured as Zabbix Agent item, with type of information "text" (not log[]), it runs every 600 seconds, it is a script that reads the Oracle alert.log file and look for "ORA-" errors (using some combination of "cat" and "grep" and "awk"), it keeps track of the last line read, so the next time it runs, it starts from that point (yes I know I could've used zabbix log[] item, but for few reasons this was a better choice for us). This is how the action is configured: Default Subject: [XXXXXX] {TRIGGER.STATUS}: {HOST.NAME} {TRIGGER.NAME}Default Message: Trigger: {TRIGGER.NAME} Livello: {TRIGGER.SEVERITY} Valore che ha generato l'allarme: {ITEM.NAME1}: {ITEM.VALUE} Eventuale descrizione aggiuntiva: {TRIGGER.DESCRIPTION} Recovery subject: [XXXXXX] {TRIGGER.STATUS} : {HOST.NAME}{TRIGGER.NAME} Recovery Message: Valore attuale: {ITEM.NAME1}: {ITEM.VALUE}Eventuale descrizione aggiuntiva: {TRIGGER.DESCRIPTION}the action is then escalated, every 3600 seconds to infinite, until the problem is solved. I attached to this ticket the relevant part of the alert.log that was parsed at that moment. Zabbix MySQL server is: Server version: 5.6.12-56 Percona Server (GPL), Release rc60.4, Revision 393 I haven't seen the problem again, but I also never received such long values again. |
Comment by Alexander Vladishev [ 2014 Feb 28 ] |
Already fixed under |