Page 1 of 1

Re: [Nagios-devel] Case-insensitive objects in NDOutils

Posted: Thu Oct 22, 2009 5:26 am
by Guest
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ton,

thanks for the remarks.

Am 22.10.09 05:33, schrieb Ton Voon:
> Quick note. I saw this change below and wondered if this is best done in
> the database. For Opsview, we made this change about 2 years ago for the
> same effect:
>
> 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;
>
> The code then stayed the same. Also it means anything trying to read the
> data doesn't need to remember to specify BINARY either.
>
Yes it looks nicer and will keep the code cleaner. Also I like the fact
to keep the work on the database.
One question back: If it uses COLLATE latin1_bin, the default sort thing
would be binary which is OK but afaik there are other associations with
the charset
(http://dev.mysql.com/doc/refman/5.1/en/ ... arset.html).

What will happen on a simplified chinese as default charset mysql if
ndoutils would try to set latin1_bin as collate?
There are missing MySQL international experiences on my side, but is it
a good practice to rule the charset?

Further comments on this?
I would prefer a database way to do this, but I wouldn't like to force
the user to use a charset which he doesn't know/like/can't use.

May be someone can say: "Every char in Nagios is in latin1, so it would
be ok for everyone"?

> I agree it is bad to consider them as the same object.
>
Yeah - I regarded the ticket some days ago and wasn't sure if it would
be good to break the historical refs to other tables.
Renaming a host in Nagios will loose all history and is a little pain
but regarding the "feature" to keep the object_id within ndoutils after
a nagios object renaming will cause a dangerous mix up between two
different nagios objects into one ndoutils object. That was the point
where I was sure to do it like nagios ;)

> I thought I had blogged about it, but maybe it was a permanent draft ...
>
Bad news - Since many month there is a "read Ton's Blog to see what they
have done" on my ToDo list. This task often felt of because less time.

- -
Hendrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkrf+ukACgkQlI0PwfxLQjnPlACeLHjeHwjMHGZddjQDkqMt4CNC
49IAoIBcpkPI5ioYgbf3uPkWc5D0x67V
=C0KS
-----END PGP SIGNATURE-----





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]