Hi, i have problem with my Zabbix 6.4, when i Add Host, later i can;t find them in HOSTS -> NAME, result is empty but I'm sure the name of host is correct. The same situatuion is, when i try find Template in Host Configuration, when i write the name in search field, i get result "no matches found", but when I click select, my Template is there and I can sattach it.
Ad Widget
Collapse
Zabbix not showing Hosts, Templates..
Collapse
X
-
Tags: None
-
Eariler i had zabbix serv, db and front on 1 vm, so i Create 3 VM's , and install DB on 1, SERV on 1 and Front on 1, then i migrate database from old server, after that, hosts that create on old server i Can search, but I can't search New added hosts. But earlier version mysql and zabbix-server was the same.
Update: I found problem, Zabbix not update upper_name field in database, when i manually update this field, everything is working but how repair this ? Is this possible without reinstall db server ?Last edited by twiecaszek; 23-08-2024, 11:53.Comment
-
I was expecting exact that issue..
check db creation scripts, there are some "triggers" created. You are missing those. if you create those it should work for all new stuff you enter. Old things need some manual update on DB side... ie. "update hosts set name_upper = UPPER(name)" or something like that... basically that trigger should show you the needed query...Comment
-
So do you think, can I on working database do:
shell> mysql -uzabbix -p<password> zabbix < database/mysql/schema.sql
and this update my DB schema ? Or this Crash my DB ?Comment
-
no .. do not run it fully... I don't know mysql too much ..
But you should get away with running
you probably have same issue with items also... so you might needCode:create trigger hosts_name_upper_insert before insert on hosts for each row set new.name_upper=upper(new.name) $$ create trigger hosts_name_upper_update before update on hosts for each row begin if new.name<>old.name then set new.name_upper=upper(new.name); end if; end;$$
and then to backfill all missing data you need to run that update (check the syntax first just in case) what I mentioned earlier...Code:create trigger items_name_upper_insert before insert on items for each row set new.name_upper=upper(new.name) $$ create trigger items_name_upper_update before update on items for each row begin if new.name<>old.name then set new.name_upper=upper(new.name); end if; end;$$
Comment
-
Comment