Page 1 of 1

!host_name 255 Character Limit

Posted: Wed Oct 07, 2015 3:23 am
by spurrellian
Hi,

I have a host group for MS SQL Servers and against that Host Group I have a numerous service checks.

On of the service checks against these SQL Servers is for disk space on P:

Around 30 of these servers don't have P: setup.

I have excluded most of these by using host_name !SERVERNAME in the service manage variables but noticed there is a limit on 255 characters so is missing some off

I tried manually importing the file using CCM but it doesn't let you import exclusions.

Any way I can change the limit?

Thanks

Re: !host_name 255 Character Limit

Posted: Wed Oct 07, 2015 4:00 pm
by tgriep
Can you provide a screen capture here showing the issue you are having?

Re: !host_name 255 Character Limit

Posted: Thu Oct 08, 2015 2:08 am
by spurrellian
I'm trying to add the following list of servers to the service check
hostname1.PNG
Once I save and click apply it cuts it down to 255 characters
hostname2.PNG

Re: !host_name 255 Character Limit

Posted: Thu Oct 08, 2015 11:39 am
by tgriep
Make sure you run a full backup of your system before running the following.
If you run the following command on the XI system in a shell, it will increase the size if that field to 510 characters.

Code: Select all

echo "use nagiosql;alter table tbl_variabledefinition modify value varchar(510) not null;" | mysql -pnagiosxi
Let us know if this works for you.

Re: !host_name 255 Character Limit

Posted: Fri Oct 09, 2015 6:32 am
by spurrellian
That worked brilliantly

Thank you very much