Ad Widget

Collapse

Unlinking templates leaves item on host?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Justleen
    Junior Member
    • Jan 2009
    • 20

    #1

    Unlinking templates leaves item on host?

    Hi All,

    I've just upgraded everything to zabbix 1.9.4, and I noticed that when I now unlink a template, all the items are "moved" to the host.


    This works quite counter-intuitive if you ask me. I'd expect the items to be removed when I unlink a template.

    Fix for this is to "unlink and clear" instead of just removing template linkage.
    Or unlink, go the to host and remove the items.
    This last fix is really a pain when a host already has untemplated items.

    Im not sure if this is working as intended, or an issue with 1.9.4.


    Leen
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    I've noticed the same thing, and I also dislike this. Unlinking a template should do unlink and clear. Why do we even have an unlink without clear?

    Comment

    • richlv
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2005
      • 3112

      #3
      i'm a bit puzzled here

      first, 1.9.4 is alpha release. like, totally, feature-not-complete, totally no bug-free expectations (more like lots of known bugs and so on). it's cool to test it - but please, don't use it even near production

      second, regarding unlinking. that's how it has been working for ages. unlink leaves elements on the host, "unlink and clear", well, clears them.

      the benefit for just unlinking is that you can keep those items and their history - for example, when reconfiguring the templates, this allows you to unlink one template, link another and have items linked to the new template without any loss of the historical data.
      Zabbix 3.0 Network Monitoring book

      Comment

      • Justleen
        Junior Member
        • Jan 2009
        • 20

        #4
        I know 1.9.4 is beta (hence in feedback, there is no section for beta/testing?), but I was fed up with zapcat. I had to define each host twice, and that was starting to get really annoying. The builtin jmx queries of 194 are much easier in configuring.
        And yes, Im running it on production, with a "shadow" 1.8.5.


        In the past when I unlinked the items would be gone, and when I would re-add them the historical data would still be there. When using clear it would clear the historical data too. As expected.

        If I now unlink a template, the items are simply "moved out of the template" to the host.
        On a template with a few hunderd items its quite a lot of clicking to get rid of the items.

        I dont see the logic in this. I can understand that historical data is kept when not clearing. But if I have app specific template, unlink it because I want to use the node for a different app, I then have to manually remove the items from the node because they will still be there, just not in a template.
        Im quite sure that this new behavior in the beta.

        Leen

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          Originally posted by Justleen
          In the past when I unlinked the items would be gone, and when I would re-add them the historical data would still be there. When using clear it would clear the historical data too. As expected.
          actually... no

          when you unlinked, items always stayed there. maybe you had item filter set to only show templated items or so ?

          otherwise it would not be possible to keep history - if items would be created again, they would have different ids and no way to associate to old ids. it would also mean that you could have some historical data that would never get deleted and be invisible...
          Zabbix 3.0 Network Monitoring book

          Comment

          • zychonatic
            Member
            • Jun 2010
            • 52

            #6
            hi,

            i´m having the same problem in 1.8.4.
            i know what reasons are there to leave the item on the host (keep history).
            But when i unlink the template, i think the items should be kept on the host, but should be disabled.
            So you can keep the history, but you don´t have any problems anymore.

            that´s my suggestion of solution.

            br matthias

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              hmm. maybe a better solution might be having an option to choose to disable them... but it's not that simple. should we also disable triggers ? what about items linked to applications from this template ?
              Zabbix 3.0 Network Monitoring book

              Comment

              • Yello
                Senior Member
                • Apr 2011
                • 309

                #8
                Hi,
                The current mechanism works well if you ask me and needs little change. I have nested templates that sometime need reworking. By being able to unlink the template I can keep collecting data under the old item scheme until I'm ready to plug the new version back in.

                Automatically disabling those items will prevent me from continuing to collect data. That would not be good.


                Regards,
                David
                Last edited by Yello; 31-07-2011, 19:35.

                Comment

                • zychonatic
                  Member
                  • Jun 2010
                  • 52

                  #9
                  hi,

                  @richlv: a seperate option to disable the item would be a very good solution. i think there is no problem if you just disable the items. ATM i´m doing the same manually an there is no problem.

                  @Yello: good reason to keep the actual mechanism as it is, but with an addition option to disable them it would be more useful for all of us.


                  br matthias

                  Comment

                  • tatapoum
                    Senior Member
                    • Jan 2014
                    • 185

                    #10
                    I have added a patch for this :

                    Comment

                    • kloczek
                      Senior Member
                      • Jun 2006
                      • 1771

                      #11
                      Originally posted by untergeek
                      I've noticed the same thing, and I also dislike this. Unlinking a template should do unlink and clear. Why do we even have an unlink without clear?
                      Because sometimes is useful to apply after this another template with more/different items/triggers/graphs/web scenarios and reuse all historic data. It allows easy to roll back change if it is needed as well.
                      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                      https://kloczek.wordpress.com/
                      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                      My zabbix templates https://github.com/kloczek/zabbix-templates

                      Comment

                      • kloczek
                        Senior Member
                        • Jun 2006
                        • 1771

                        #12
                        Originally posted by tatapoum
                        I have added a patch for this :
                        https://support.zabbix.com/browse/ZBXNEXT-543
                        You are waisting your time.
                        This is not a bug. This useful feature.
                        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                        https://kloczek.wordpress.com/
                        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                        My zabbix templates https://github.com/kloczek/zabbix-templates

                        Comment

                        • tatapoum
                          Senior Member
                          • Jan 2014
                          • 185

                          #13
                          Sorry ???

                          If you had looked at the link, you would have seen that the patch adds a checkbox to allow this behavior or not.
                          What is useful for you may be annoying for others. My patch gives you the choice.

                          Comment

                          • kloczek
                            Senior Member
                            • Jun 2006
                            • 1771

                            #14
                            Originally posted by tatapoum
                            Sorry ???

                            If you had looked at the link, you would have seen that the patch adds a checkbox to allow this behavior or not.
                            What is useful for you may be annoying for others. My patch gives you the choice.
                            What is the problem with choosing between existing "unlink" and "unlink and clear"? Why do you need here check box?
                            "unlink and clear" does not leaves not templated items after unlinking host from template.
                            http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                            https://kloczek.wordpress.com/
                            zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                            My zabbix templates https://github.com/kloczek/zabbix-templates

                            Comment

                            • tatapoum
                              Senior Member
                              • Jan 2014
                              • 185

                              #15
                              I think you don't get it.
                              The patch doesn't modify the host configuration screen. The "unlink" and "unlink and clear" buttons are still there.

                              However, how do you unlink and clear a template from several hosts at the same time ?
                              Without the patch, removing the hosts from the template configuration screen only unlinks them. The items don't get cleared. The other possibility is to go on each host to unlink and clear the template. But it's a pain!
                              The patch adds a "unlink and clear" checkbox in the template configuration screen. This allows you to unlink and clear a template from 100+ hosts at the same time.

                              Comment

                              Working...