PDA

View Full Version : Host Name Case Sensitive ?


maruscya
22-09-2008, 14:37
Hello Guys..

after upgrade, some host stop sending data. After some test, the problem seem a hostname.


homer etc # zabbix_sender -vv -z ****.**********.net -p 5001 -s mailgateway -k agent.version -o 1
zabbix_sender [18141]: DEBUG: Answer [{
"response":"success",
"info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000774"}]
Info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000774"
sent: 1; skipped: 0; total: 1
homer etc # zabbix_sender -vv -z ****.**********.net -p 5001 -s Mailgateway -k agent.version -o 1
zabbix_sender [18150]: DEBUG: Answer [{
"response":"success",
"info":"Processed 1 Failed 0 Total 1 Seconds spent 0.006914"}]
Info from server: "Processed 1 Failed 0 Total 1 Seconds spent 0.006914"
sent: 1; skipped: 0; total: 1


In the first case zabbix_sender report 1 error...

Could you confirm that the hostname is now case sensitive ??

AndreA

Alexei
23-09-2008, 10:48
I was pretty sure the host names were always case sensitive in both 1.4.x and 1.6.x :)

maruscya
23-09-2008, 11:05
I was pretty sure the host names were always case sensitive in both 1.4.x and 1.6.x :)

I don't no why, but in 1.4.5 hostname is "MailGateway" on agent side.... but on server is "mailgateway" (it is a real example !! )

And all works fine.

IMHO is not a real problem, but is only a question, because some hosts stop sending data after upgrade... I 'll rename all hosts asap.

I made the same question during the training ... (4 & 5 of March) and your answer is "....mmmm .... i think ! .." :)

anyway... thank for your good job!

Alexei
23-09-2008, 11:20
Mmmmm ... I think the answer depends on how database engine handles operator '='. ;)

ad@kbc-clearing.com
29-10-2008, 14:00
We use MYSQL/InnoDB and migrated recently from 1.4.2 to 1.6

I don't think this issue is caused by the DBengine; this has not changed during the migration.
In 1.4.2 we had no problems.
In 1.6 we found, that not only hostname but also key is case-sensitive.

Renaming our hosts to all lowercase is not an option.

maruscya
29-10-2008, 15:04
I'm starting migration hosts from "mixed case" to "lower case" .

This is not a good solution, but imho is it the only way !

AndreA

ad@kbc-clearing.com
30-10-2008, 22:08
We just renamed all hosts to lowercase (sql update query) -> no more problems.
Not happy with that, but i'm afraid the only option.

Alexei
31-10-2008, 16:34
Case sensitivity depends on settings of your database only. I do not believe that upgrade from 1.4.x to 1.6.x affected this in any way. Blame your database or database admin. :)

Calimero
10-12-2008, 14:48
Case sensitivity depends on settings of your database only. I do not believe that upgrade from 1.4.x to 1.6.x affected this in any way. Blame your database or database admin. :)

I have to disagree.


if (0 == strcmp(item.host_name, values[i].host_name) && 0 == strcmp(item.key_orig, values[i].key))


That's line 216 of trapper.c (v1.6.1)

And that means that both hostname and key indeed are case sensitive, regardless of database engine (which could also be case-sensitive of course).