Page 1 of 1

revisiting the Service Status display character limits

Posted: Thu Nov 15, 2018 11:31 am
by SteveBeauchemin
In the setup of a new server I get the default size for the Status column display. To change that in the past we had been given specific sql syntax to increase the size of the DB field for storing longer text. A new clean install has different DB construction from the old server. As such, I would like to verify some new syntax.

To have the Nagios XI Status Information column display more text, is this the 'new' way to get that done properly?

Code: Select all

mysql -u root -p
use nagios;
alter table nagios_hostchecks modify output text CHARACTER SET latin1 NOT NULL;
alter table nagios_hoststatus modify output text CHARACTER SET latin1 NOT NULL;
alter table nagios_servicechecks modify output text CHARACTER SET latin1 NOT NULL;
alter table nagios_servicestatus modify output text CHARACTER SET latin1 NOT NULL;
exit
Please let me know if this is how we expand that field on a new 5.x Nagios XI installation.

Thanks

Steve B

Re: revisiting the Service Status display character limits

Posted: Thu Nov 15, 2018 3:26 pm
by ssax
These should be what you're looking for, but yes, text is the same size as varchar(65535):

Code: Select all

echo "use nagios;alter table nagios_servicestatus modify output text not null;alter table nagios_servicestatus modify long_output text not null;alter table nagios_servicestatus modify perfdata text not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hoststatus modify output text not null;alter table nagios_hoststatus modify long_output text not null;alter table nagios_hoststatus modify perfdata text not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_servicechecks modify output text not null;alter table nagios_servicechecks modify long_output text not null;alter table nagios_servicechecks modify perfdata text not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hostchecks modify output text not null;alter table nagios_hostchecks modify long_output text not null;alter table nagios_hostchecks modify perfdata text not null;" | mysql -pnagiosxi
Or per your method:

Code: Select all

mysql -u root -p
use nagios;
alter table nagios_servicestatus modify output text not null;
alter table nagios_servicestatus modify long_output text not null;
alter table nagios_servicestatus modify perfdata text not null;
alter table nagios_hoststatus modify output text not null;
alter table nagios_hoststatus modify long_output text not null;
alter table nagios_hoststatus modify perfdata text not null;
alter table nagios_servicechecks modify output text not null;
alter table nagios_servicechecks modify long_output text not null;
alter table nagios_servicechecks modify perfdata text not null;
alter table nagios_hostchecks modify output text not null;
alter table nagios_hostchecks modify long_output text not null;
alter table nagios_hostchecks modify perfdata text not null;
exit

Re: revisiting the Service Status display character limits

Posted: Thu Nov 15, 2018 4:00 pm
by SteveBeauchemin
Aren't the long_output and perfdata already text? Why change them again?

Steve B

Re: revisiting the Service Status display character limits

Posted: Thu Nov 15, 2018 4:07 pm
by ssax
I just updated the commands from this KB article:

https://support.nagios.com/kb/article/n ... s-478.html

It doesn't matter as long as it's not shorter than the current setting, at that point you lose information.