Tune state-history information characters

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
michaelli
Posts: 115
Joined: Thu Jan 29, 2015 11:21 am

Tune state-history information characters

Post by michaelli »

Hi Box293,

Is it possible to change the state-history "information" field character length?
I find it can display 256 characters in maximum.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Tune state-history information characters

Post by Box293 »

This will adjust the database:

Code: Select all

echo "use nagios;alter table nagios_statehistory modify output varchar(65535) not null;alter table nagios_statehistory modify long_output varchar(65535) not null;" | mysql -pnagiosxi
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
michaelli
Posts: 115
Joined: Thu Jan 29, 2015 11:21 am

Re: Tune state-history information characters

Post by michaelli »

Hi Box293,

Thank you so much again. It can display full messages in state-history now.

And Can you teach me how to check how many characters set in the dump screen messages log field and how to set it bigger. Because I increase the max-length in nrpe to 35536. But I find it maximum display no more than 6000 characters.

Sorry for I always make you trouble.
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Tune state-history information characters

Post by tmcdonald »

You might need to alter some other tables for that. Check out this post: http://support.nagios.com/forum/viewtop ... 05#p103608
Former Nagios employee
michaelli
Posts: 115
Joined: Thu Jan 29, 2015 11:21 am

Re: Tune state-history information characters

Post by michaelli »

Hi tmcdonald,

I have no right to access below link

"You might need to alter some other tables for that. Check out this post: viewtopic.php?f=16&t=27918&p=103505#p103608"

Actually, Our company has subscription for xi enterprise
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Tune state-history information characters

Post by tmcdonald »

Relevant post in the thread:
scottwilkerson wrote:This would not need to be changed between upgrades, it would stick.

Other implications could be a slight db performance decrease when searching in these fields. somewhat negligible as you would never find the info searched for if it was truncated...

Yes, 65535 would become the limit for each of these fields.

The default was 255.


I will say, however, there is a bug in the SQL that was posted, and it should read:

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_hoststatus modify long_output varchar(65535) not null;alter table nagios_hoststatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

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

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

Code: Select all

echo "
alter table nagios_servicestatus modify output varchar(65535) not null,modify long_output varchar(65535) not null,modify perfdata varchar(65535) not null;
alter table nagios_hoststatus modify output varchar(65535) not null, modify long_output varchar(65535) not null,modify perfdata varchar(65535) not null;
alter table nagios_servicechecks modify output varchar(65535) not null,modify long_output varchar(65535) not null,modify perfdata varchar(65535) not null;
alter table nagios_hostchecks modify output varchar(65535) not null,modify long_output varchar(65535) not null,modify perfdata varchar(65535) not null;
" | mysql -pnagiosxi nagios
And if you are a current customer, you should speak with [email protected] and make sure they add your forum username to the Customer group so you get access to that forum. Our SLA applies there, so it only makes sense to post there since you're paying for it!
Former Nagios employee
Locked