Page 1 of 1

Status Information cut off at 256 characters

Posted: Sun Jan 05, 2014 7:56 pm
by Box293
I've been writing a plugin for which some of the returned Status Information is longer than 256 characters.

I've observed in the Nagios XI interface, the Status Information shown for a service stops at 256 characters (anything after is cut off). When I look at the service in Nagios Core I can see the entire Status Information.

Is there an option in Nagios XI GUI to increase the amount of characters displayed for the Status Information?

This is in Nagios XI 2012R2.3.

Re: Status Information cut off at 256 characters

Posted: Mon Jan 06, 2014 11:14 am
by scottwilkerson
You would need to resize the output column in the following tables in the nagios DB
nagios_servicestatus
nagios_hoststatus
nagios_servicechecks
nagios_hostchecks

Re: Status Information cut off at 256 characters

Posted: Tue Jan 07, 2014 5:48 am
by Box293
Cheers Scott, I'll have a play.

Re: Status Information cut off at 256 characters

Posted: Tue Jan 07, 2014 10:43 am
by abrist
Let us know if you have issues with these php/css edits. Stay warm!

Re: Status Information cut off at 256 characters

Posted: Mon Jun 02, 2014 12:44 am
by Box293
I finally got around to sorting this out.

The commands I needed to perform were as follows:

To check the current size:

Code: Select all

echo "use nagios;desc nagios_servicestatus" | mysql -pnagiosxi | grep "output\|perfdata"
echo "use nagios;desc nagios_hoststatus" | mysql -pnagiosxi | grep "output\|perfdata"
echo "use nagios;desc nagios_servicechecks" | mysql -pnagiosxi | grep "output\|perfdata"
echo "use nagios;desc nagios_hostchecks" | mysql -pnagiosxi | grep "output\|perfdata"
To alter the size:

Code: Select all

echo "use nagios;alter table nagios_servicestatus modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hoststatus modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_servicechecks modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hostchecks modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi
As soon as the check was next executed the output showed correctly in the XI interface (not cut off).