Re: [Nagios-devel] NDO increase nagios_servicechecks/output size
Posted: Fri Oct 19, 2007 11:00 am
Michael Streb wrote:
> Hi,
>
> Out of the mysql docs:
>
> Values in VARCHAR columns are variable-length strings. The length can be
> specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in
> 5.0.3 and later versions. (The maximum effective length of a VARCHAR in
> MySQL 5.0.3 and later is determined by the maximum row size and the
> character set used. The maximum column length is subject to a row size of
> 65,535 bytes, which is shared among all columns.)
>
> Regards,
>
> Michael
>
>
> Am 13.09.2007 15:21 Uhr schrieb "Andreas Ericsson" unter :
>
>> Michael Streb wrote:
>>> Hi Ethan,
>>> Hi list,
>>>
>>> recently went into problems with the "output" field in the
>>> nagios_servicechecks table so i had a deeper look and it turned out that the
>>> field size is set to "varchar(255)" only, i think this should be increased
>>> to something like "varchar(4096)" to make use of the longer serviceoutput in
>>> nagios3x.
>>>
>>> I don`t know right now if 4k is the maximum serviceoutput in 3x.
>>>
>> It's not, as it's dynamically allocated. 255 is the maximum size for varchar
>> in databases though. Anything larger than that has to be stored as "TEXT"
>> or "BLOB" objects, which means a fairly serious hit to performance (as all
>> those objects get stored in one or more separate files on disk).
>
I'll change these to TEXT types, as VARCHAR types are limited to 255
bytes prior to MySQL 5.
Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> Hi,
>
> Out of the mysql docs:
>
> Values in VARCHAR columns are variable-length strings. The length can be
> specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in
> 5.0.3 and later versions. (The maximum effective length of a VARCHAR in
> MySQL 5.0.3 and later is determined by the maximum row size and the
> character set used. The maximum column length is subject to a row size of
> 65,535 bytes, which is shared among all columns.)
>
> Regards,
>
> Michael
>
>
> Am 13.09.2007 15:21 Uhr schrieb "Andreas Ericsson" unter :
>
>> Michael Streb wrote:
>>> Hi Ethan,
>>> Hi list,
>>>
>>> recently went into problems with the "output" field in the
>>> nagios_servicechecks table so i had a deeper look and it turned out that the
>>> field size is set to "varchar(255)" only, i think this should be increased
>>> to something like "varchar(4096)" to make use of the longer serviceoutput in
>>> nagios3x.
>>>
>>> I don`t know right now if 4k is the maximum serviceoutput in 3x.
>>>
>> It's not, as it's dynamically allocated. 255 is the maximum size for varchar
>> in databases though. Anything larger than that has to be stored as "TEXT"
>> or "BLOB" objects, which means a fairly serious hit to performance (as all
>> those objects get stored in one or more separate files on disk).
>
I'll change these to TEXT types, as VARCHAR types are limited to 255
bytes prior to MySQL 5.
Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]