Imported Configuration Truncated?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Imported Configuration Truncated?

Post by XenoPhage »

mguthrie wrote:Interesting trick we discovered from this thread. If you're using *only* service->hostgroup assignments in a service definition, you can actually pass exclusions as a free variable and Nagios Core will honor the definition. So if you don't have any inclusive host assignments in a service definition you could add as a free variable:

host_name
!host1,!host2,!host3

You would of course be subject to the VARCHAR limit of that table, but that could easily be remedied with an ALTER TABLE query.
This would work perfectly for us. Where can I find the password to access the mysql tables so I can make this alter? And will this affect support at all?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Imported Configuration Truncated?

Post by mguthrie »

Tested and this should get you what you need. If you need more than 1024 go ahead and bump it up larger.

Code: Select all

mysql -pnagiosxi nagiosql
ALTER TABLE tbl_variabledefinition MODIFY COLUMN value varchar(1024);
This is such a minor alteration it shouldn't have any adverse effects for the software or support. We'll definitely tell you if it's something that affects support ;)
XenoPhage
Posts: 56
Joined: Sun Jun 03, 2012 11:37 am

Re: Imported Configuration Truncated?

Post by XenoPhage »

mguthrie wrote:Interesting trick we discovered from this thread. If you're using *only* service->hostgroup assignments in a service definition, you can actually pass exclusions as a free variable and Nagios Core will honor the definition. So if you don't have any inclusive host assignments in a service definition you could add as a free variable:

host_name
!host1,!host2,!host3

You would of course be subject to the VARCHAR limit of that table, but that could easily be remedied with an ALTER TABLE query.
Glad to be of help! I have this in operation now.. There's more to do, of course, but the config is loaded now.. yay!

Now on to making our various plugins work...

Thanks for the help!
Locked