[Nagios-devel] Case sensitivity in object names
Posted: Mon Apr 02, 2007 12:47 pm
Hi!
We noticed a problem with the storage of objects in the
nagios_objects table. If you had two hosts with the same name, but in
different cases, then only one row would be created for the both of
them. This is because the = and LIKE operator in mysql is case
insensitive: http://dev.mysql.com/doc/refman/4.1/en/case-
sensitivity.html
As nagios considers these as two different objects, ndo should do too.
We fixed by altering the nagios_objects table so that the name1 and
name2 columns were always case sensitive:
ALTER TABLE nagios_objects MODIFY name1 varchar(128) COLLATE
latin1_bin NOT NULL default '';
ALTER TABLE nagios_objects MODIFY name2 varchar(128) COLLATE
latin1_bin default NULL;
Is this a valid fix?
Ton
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
We noticed a problem with the storage of objects in the
nagios_objects table. If you had two hosts with the same name, but in
different cases, then only one row would be created for the both of
them. This is because the = and LIKE operator in mysql is case
insensitive: http://dev.mysql.com/doc/refman/4.1/en/case-
sensitivity.html
As nagios considers these as two different objects, ndo should do too.
We fixed by altering the nagios_objects table so that the name1 and
name2 columns were always case sensitive:
ALTER TABLE nagios_objects MODIFY name1 varchar(128) COLLATE
latin1_bin NOT NULL default '';
ALTER TABLE nagios_objects MODIFY name2 varchar(128) COLLATE
latin1_bin default NULL;
Is this a valid fix?
Ton
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]