[ZBXNEXT-1220] Monitoring of log files more than 2GB Created: 2012 May 14  Updated: 2012 Oct 31  Resolved: 2012 May 18

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Installation (I), Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 2.0.0

Type: Change Request Priority: Critical
Reporter: Alexander Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: logmonitoring
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

Currently monitoring of log-files is limited by 2 gigabytes since a field of a database has the 32-bbit signed integer type.

The size of this field shall be increased to 64-bit integer type.



 Comments   
Comment by Alexander Vladishev [ 2012 May 14 ]

Available in the development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1220

Comment by dimir [ 2012 May 15 ]

(1) On a 32-bit system agent fails when doing stat() of the log file in a process_log() function, which results in an item becoming NOTSUPPORTED:

[...]
/tmp/zabbix_agentd.log- 26150:20120515:163247.537 In process_log() filename:'/tmp/big.log' lastlogsize:2110251579
/tmp/zabbix_agentd.log: 26150:20120515:163247.537 cannot stat '/tmp/big.log': [75] Value too large for defined data type
/tmp/zabbix_agentd.log- 26150:20120515:163247.537 Active check [log[/tmp/big.log,foobjcode,,1000,skip]] is not supported. Disabled.
[...]

$ ls -l /tmp/big.log
rw-rr- 1 vl vl 2156040848 May 15 16:32 /tmp/big.log

$ ls -lh /tmp/big.log
rw-rr- 1 vl vl 2.1G May 15 16:32 /tmp/big.log

<Sasha> RESOLVED in r27551.

<dimir> CLOSED

Comment by Alexander Vladishev [ 2012 May 16 ]

Related issue: ZBX-3151

Comment by dimir [ 2012 May 16 ]

Successfully tested. Log monitoring is working for files over 2GB on 32-bit systems. Also confirm that this fixes vfs.file.size[] report for files over 2GB (was ZBX_UNSUPPORTED before).

Comment by dimir [ 2012 May 16 ]

(1) This enables general support for files larger than 2GB on Zabbix side (all components), I suggest this be documented as new 2.0 feature.

<richlv> documented in http://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew200 -> RESOLVED
<Sasha> CLOSED

Comment by Alexander Vladishev [ 2012 May 16 ]

(2) Should be documented DB upgrade patches from 2.0.0rc4 to 2.0.0rc5 in the release notes.

IBM DB2:
ALTER TABLE items ALTER COLUMN lastlogsize SET DATA TYPE bigint
REORG TABLE items

MySQL:
ALTER TABLE items MODIFY lastlogsize bigint unsigned DEFAULT '0' NOT NULL;

Oracle:
ALTER TABLE items MODIFY lastlogsize number(20);

PostgreSQL:
ALTER TABLE items ALTER lastlogsize TYPE numeric(20);

<dimir> While at it, could next info also added?

When upgrading from 2.0.0rc2 to 2.0.0rc3, if proxy is used and proxy uses MySQL:
ALTER TABLE proxy_history MODIFY value longtext NOT NULL;

<Sasha> we supports incremental patches only from version 2.0.0rc4
<Sasha> CLOSED patches will be published in the release notes

Comment by Alexander Vladishev [ 2012 May 16 ]

Available in version pre-2.0.0 r27570.

Comment by dimir [ 2012 May 18 ]

Reopening because of regression. After this fix Zabbix will not compile on Solaris (SPARC) anymore.

Comment by dimir [ 2012 May 18 ]

(3) Disable large file support on 32-bit Solaris.

On a 32-bit Solaris large file support is incompatible with procfs and swapctl. There is a way to do that though by using transitional compilation environment but this has to wait at least till 2.0 is out. See lfcompile64(5) for details.

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBXNEXT-1220

<Sasha> CLOSED
I removed the message on support of large files. The call of AC_SYS_LARGEFILE doesn't guarantee it.

Comment by richlv [ 2012 May 18 ]

(4) document "(3)"

<dimir>
http://www.zabbix.com/documentation/2.0/manual/appendix/items/large_file_support (new page)
http://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew200#monitoring_of_files_larger_than_2gb (add link to lfs)
http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/log_items#overview (add note about lfs)

RESOLVED

<martins-v>CLOSED

Comment by Alexander Vladishev [ 2012 May 18 ]

Available in version pre-2.0.0 r27637.

Generated at Thu Apr 25 11:22:01 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.