Ad Widget

Collapse

Zabbix not showing Hosts, Templates..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twiecaszek
    Junior Member
    • Aug 2024
    • 6

    #1

    Zabbix not showing Hosts, Templates..

    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.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2
    is it something that just appeared, or has it been like that since you did something... like upgraded?

    Comment

    • twiecaszek
      Junior Member
      • Aug 2024
      • 6

      #3
      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

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4806

        #4
        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

        • twiecaszek
          Junior Member
          • Aug 2024
          • 6

          #5
          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

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4806

            #6
            no .. do not run it fully... I don't know mysql too much ..
            But you should get away with running
            Code:
            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;$$
            you probably have same issue with items also... so you might need
            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;$$
            and then to backfill all missing data you need to run that update (check the syntax first just in case) what I mentioned earlier...

            Comment

            • twiecaszek
              Junior Member
              • Aug 2024
              • 6

              #7
              I Execute all create trigerr scripts from server.sql file and ALL WORKS! Thank You!

              Comment

              Working...