Ad Widget

Collapse

Deleted Host still shows in DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JJJ
    Junior Member
    • Sep 2017
    • 4

    #1

    Deleted Host still shows in DB

    Hello Everyone,

    I was deleting some old data from our Zabbix installation and hit the wall of not being able to delete the host group, even though I had unliked any host and / or template from it.

    Checking this further I saw my deleted hosts are still in the database and also part of the host group , see the images.

    By the way, per my zabbix_server conf I am not running any kind of HouseKeeper.



  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Hi JJJ,
    actually you (or Zabbix Server) should run Housekeeper and thats why
    9.3.2 Housekeeper
    The housekeeper is a periodical process, executed by Zabbix server. The process removes outdated information and information deleted by user.
    Reference: https://www.zabbix.com/documentation...ration/general

    if you aren't using the Partitioning for your Database.



    Regards,
    Alex!
    Last edited by allexpetrov; 05-09-2017, 13:48. Reason: additional info

    Comment

    • JJJ
      Junior Member
      • Sep 2017
      • 4

      #3
      hey Allex, thanks for your reply.

      Actually my Housekeeping configuration is exacly as shown in the 9.3.2 section of the link you provided (default I guess).

      I'm bit confused, the .conf has the HouseKeeping lines commented but if I understand you correctly I can run the Housekeeping with my admin user, is that right?

      If so, which value should I lower so I can get rid of old host and host groups? Audit? My plan is to run this one time and get to back to a default value.

      Thanks.

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        The default value for your HousekeepingFrequency parameter is 1 , so it is actually running.

        If you want to execute the housekeeper run this coomand:
        Code:
        zabbix_server -R housekeeper_execute
        But I don't think this would be a solution, but in any case - try it. Second thing, I've noticed that your host which you are showing on screenshot is just in not monitored state, but not deleted. Could you doublecheck that your host is:
        1. Deleted
        2. Unlinked from group?

        Regards,
        Alex!

        Comment

        • JJJ
          Junior Member
          • Sep 2017
          • 4

          #5
          Allex,

          From the GUI I really cannot find that host, actually not even in the DB, but somehow the host is still part of the group in the DB, see image.




          With the housekeeper table empty I take your command won't do much, right?
          Last edited by JJJ; 05-09-2017, 16:43. Reason: missing link

          Comment

          • allexpetrov
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • May 2017
            • 361

            #6
            In this case this won't help, actually. Sorry for disinformation.
            So, in this case you can dump your database in case of glitches and delete that host value manually, but you will perform this on your own risk!

            Code:
            UPDATE hosts_groups SET hostid ='NULL' where hostgroupid = 140 and groupid = 37;
            Although it is not the best way how to get rid of this, IMHO I don't see any other options.

            But once again - do this on your own risk because I can't guarantee that this method is safe enough!

            Regards,
            Alex!

            Comment

            • JJJ
              Junior Member
              • Sep 2017
              • 4

              #7
              Hey Allex, I appreciate your take on this.

              I reallty don't feel like removing this manually, I'll probably just let that going.

              Now I'm really concerned in keeping cleaning my hosts and end up with more inconsistency data.

              Either way, I'll let this hanging here in case anyone has some other suggestion, unless this was expected behavior

              Thanks

              Comment

              Working...