[ZBX-1117] Remote command truncated to 244 characters Created: 2009 Oct 20 Updated: 2017 May 30 Resolved: 2012 Jan 03 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Agent (G), Server (S) |
| Affects Version/s: | 1.6.2 |
| Fix Version/s: | None |
| Type: | Incident report | Priority: | Critical |
| Reporter: | Luisma Arranz | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | remotecommands | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Tested on RHEL AS 3 & 4 |
||
| Description |
|
When running a remote command from an action it is truncated to 244 characters. Seen that OPERATIONS.LONGDATA, where the command is stored, is VARCHAR2(2048) but it produces an error when running commands longer than 244 characters. Example: 1.- Working command: Remote command: {HOSTNAME}: /usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Short text `<command_that_produces_an_output>`"
zabbix_agentd.log: 3081:20091008:133401 Requested [system.run[/usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Short text `<command_that_produces_an_output>`",nowait]]
3081:20091008:133401 Run command '/usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Short text `<command_that_produces_an_output>`"'
3081:20091008:133401 Sending back [1]
2.- Non-working command: Remote command: {HOSTNAME}: /usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Very long text inserted to exceed 244 characters `<command_that_produces_an_output>`"
zabbix_agentd.log: 3083:20091008:133514 Requested [system.run[/usr/local/sbin/zabbix_sender -z <zabbix_server> -p 10051 -s {HOSTNAME} -k <trapper> -o "Very long text inserted to exceed 244 characters `<command_that_produces_an_o]
3083:20091008:133514 Sending back [ZBX_NOTSUPPORTED]
Found that DB field ITEMS.KEY_ is limited to 255 characters. Extended to 1024 to leave enough room for commands and changed ITEM_KEY_LEN in zabbix-1.6.2/include/db.h from 255 to 1024 #define ITEM_KEY_LEN 1024 Characters from 244 to 255 may be used for control or similar? |
| Comments |
| Comment by Viktors Kohanovskis (Inactive) [ 2011 Oct 26 ] |
|
Note: in branch/1.8 and trunk (both rev.22676) include/db.h ITEM_KEY_LEN is 1020 |
| Comment by Alexander Vladishev [ 2012 Jan 03 ] |
|
Fixed in version 1.8, r8552 with DEV-357. Size of the remote command has increased to 1KB. In version 1.8.3 has been increased to 2KB (limited by agent) with |