Ad Widget

Collapse

Delete an item in a template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leonlaf
    Junior Member
    • May 2013
    • 15

    #1

    Delete an item in a template

    I am using the default OS Linux template for all our linux servers, and we have more than 1000 hosts are monitored by our Zabbix server. Our Zabbix server had 30+ mins outage when I tried to delete the FS discovery rule in the OS Linux template, I think that's because this discovery rule = 20+ items on each hosts, then Zabbix DB went crazy. Because of I don't want to unlink the template, so I want to know is it possible to delete the discovery rule for each host group piece by piece?

    Thank you!
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello!

    Such situations may happen if you delete rule which affects many hosts and Zabbix server cannot handle the amount of changes it has to make. There is no possibility to delete the rule for specific host groups either because it is done on template level for all hosts in this template.

    What about your Zabbix server performance? Can you check if the following parameters meet at least the values below?
    Code:
    HistoryCacheSize=64M
    TrendCacheSize=64M
    HistoryTextCacheSize=64M
    ValueCacheSize=64M
    Best Regards,
    Ingus

    Comment

    • Koral
      Member
      • Oct 2012
      • 30

      #3
      I can see that some time has passed but just for others:

      You could:
      Method A:
      Step 1:
      - create new template which will only have the discovery rule (and item prototypes,triggers etc.), builded exactly the same as the rule from "linux template" - you can do this by making clone of that original template, without hosts added.
      Step 2:
      - unlink all hosts from that "linux template" but don't clear them - just unlink
      Step 3:
      - delete discovery in original template
      Step 4:
      - link part of those hosts (100, 250, 500 hosts? depends on your server performance) to new template then unlink them from that new template with clearing hosts so the items should vanish
      Step 5:
      - repeat step 4 until you will clear all hosts
      Step 6:
      - link all cleared hosts to the original template again

      Method B:
      Step 1:
      - clone original template without adding hosts, delete the discovery rule
      Step 2:
      - unlink all hosts without clearing
      Step 3:
      - link all hosts to new template
      Step 4:
      - delete the unwanted rule one by one on each host
      Last edited by Koral; 06-06-2014, 21:17.

      Comment

      Working...