Ad Widget

Collapse

Mass update used templates of a host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raskas
    Junior Member
    • Feb 2007
    • 6

    #1

    Mass update used templates of a host

    Hi All,


    I have configured many host and they are using different templates.

    I want to add a new template to some hosts that already have configured some templates.

    I used the Mass update button to perform this action and selected only the new template (thinking that it will be added).

    Apparently it doesn't add it but replaces the templates in use for that host with the new selected templates.
    Is this a bug? or just an annoyance?

    But the really bad thing is that when I add the old templates to the host the data is gone? Is it really gone or can I link it somehow back to the host?

    Please help

    Johan
  • arli
    Member
    • Jan 2008
    • 71

    #2
    I had the same situation that you described and I think you can't get data back unless you restore database from last backup before the new template linkage - which is what I did.
    I lost half day data for entire zabbix, but at least longer history was saved.
    One of the many reasons you can't restore that data is housekeeper that is kicking in and deleting old and unlinked items.

    I think there should be at least warning in front-end, that this could happen, because I could not suspect that kind of behavior either.
    Last edited by arli; 19-02-2009, 12:52.

    Comment

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

      #3
      most likely zabbix interpreted your action as unlinking unselected templates (though this is just a guess).

      in this case a red background warning at the top of the mass update section that "unselected templates will be unlinked" could be helpful.

      ideally, frontend would only apply changes that are marked - that is, if selected hosts have different template linkage, marking single checkbox would only link hosts missing this template to it, but not change any other template linkage.
      yeah, i know i'm dreaming
      Zabbix 3.0 Network Monitoring book

      Comment

      • arli
        Member
        • Jan 2008
        • 71

        #4
        Grrrrr

        I learned another lesson hard way just yesterday. The same sort of replacement behavior also applies when using "template linkage".
        I had template CHECK_PING that was linked to all the 400 hosts that I had. And then thought that it would be nice to link another template CHECK_ZBX_AGENT_VERSION to that ping template, so I wouldn't have to do it by hand.

        And guess what happened? Agent version template was linked to the ping template, but ping wasn't linked to the hosts anymore...

        Comment

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

          #5
          Originally posted by arli
          And guess what happened? Agent version template was linked to the ping template, but ping wasn't linked to the hosts anymore...
          could you list exact steps to reproduce the problem ?
          i couldn't verify that with 1.6 branch, revision 6868
          Zabbix 3.0 Network Monitoring book

          Comment

          • arli
            Member
            • Jan 2008
            • 71

            #6
            But ofcourse, here we go...

            First of all I created 2 templates:
            Check_PING with item Simple check - icmpping
            Zabbix_Agent_Version with item ZABBIX Agent - agent.version

            Then I add 3 hosts like this:
            Configuration > Hosts > Hosts (from the drop down) > Create Host
            Fill in all the nessesary fields for host and select:
            Link with Template > Add ... and select Check_PING
            I do this for all 3 hosts
            And now I see the following picture: Image 1

            Then I want to link another template to Check_PING template. I go
            Configuration > Hosts > Template linkage (from the drop down)
            And now I see the following picture: Image 2
            Everything looks good so far.

            But then it gets interesting - I click on the Check_PING template and I see this: Image 3
            There doesn't apear to be any hosts linked with this template, but well hey, I try to link this template to anoter template anyway. Image 4
            And click Save.

            It returns me to template linkage page, where I see Image 5... all the previous linked hosts are gone.

            I'm getting same kind of behavior with 1.6.3 pre relase (few weeks old nightly build) and with 1.6.2 stable.
            Attached Files
            Last edited by arli; 06-03-2009, 10:49.

            Comment

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

              #7
              ahh, you click on template name in 'template linkage' screen... yes, it seems that i can reproduce this problem in 1.6 branch, revision 6868.

              that linkage screen does not even offer me hosts to add, templates only - and there is no way to select group.

              looks like a bug, i'd suggest filing a report on the tracker.
              Zabbix 3.0 Network Monitoring book

              Comment

              • arli
                Member
                • Jan 2008
                • 71

                #8
                I'd like to fill the report, but I'm not sure, where this tracker is located. Could someone point me in the right direction?

                Comment

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

                  #9
                  Zabbix 3.0 Network Monitoring book

                  Comment

                  • Aly
                    ZABBIX developer
                    • May 2007
                    • 1126

                    #10
                    registered as ZBX-882, fixed in rev. 7209
                    Zabbix | ex GUI developer

                    Comment

                    Working...