Ad Widget

Collapse

Host group macros?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akapap
    Member
    • Nov 2009
    • 35

    #1

    Host group macros?

    Is there sth like macros from hostgroup in 1.8?

    Best regards,
    e.
  • akapap
    Member
    • Nov 2009
    • 35

    #2
    I double checked the docs and I can't see info about host group macro?

    Is it right, that 1.8 does not support host group macro?

    So if I would like to change behavior for example cpu load of my 100 node's I will have to do it by hand? I can't do in template because I use one base template to all hosts.

    Best regards,
    e.

    Comment

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

      #3
      you can use template level usermacro, which should should allow to set a macro on group level then by linking this template to the group. if all machines fall under some class, i'd suggest nested templating and creating application 'class' template
      Zabbix 3.0 Network Monitoring book

      Comment

      • akapap
        Member
        • Nov 2009
        • 35

        #4
        I do not get your point.

        I find that in the Host grup I can create templete with the group of hosts and there apply macro. It works.

        Best regards,
        e.

        Comment

        • akapap
          Member
          • Nov 2009
          • 35

          #5
          I was wrong, creating template and adding it to the group doesn't help.

          Please give mi a hint how to achieve group macro in 1.8. I don't want to copy default template and put macro in there. I'd be a waste of time and I will hit the poor management case.

          I my scenario I want to put group level macro to the several host. Now they only have one base template_linux. I would like to overlay in that template the value of cpu load.

          I don't want to sound rude but more and more I use zabbix I have a deep doubt if it is a good monitoring system. I know, now my case is only pointed to the GUI but nevertheless there is now any doc, good doc with example. I am also afraid that there is not sth like group macro. That I will have to prepare workaround and that sucks.

          Best regards,
          e.

          Comment

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

            #6
            it's hard to understand why proposed solution won't work for you. let me rehash it anyway.

            so currently you have a large group of devices, and you have linked only single template, template_linux, to them. i would suggest actually breaking this down, as single template is too generic and inflexible - split it up for something like base linux stuff and separate templates for specific services (db, other services etc).
            then, create another template and link it to linux, db and whatever services these servers are running - essentially, creating a device class template. now you can add user macros to this template.
            for other server classes you would use a different template, utilising the nested templating functionality.
            Zabbix 3.0 Network Monitoring book

            Comment

            • akapap
              Member
              • Nov 2009
              • 35

              #7
              Originally posted by richlv
              it's hard to understand why proposed solution won't work for you. let me rehash it anyway.
              In that case it is the best solution. I doing that with some application. But in my previous post I've written that problem stick with the CPU LOAD that goes to the core of template_linux. And the problem stills remains.

              Best regards,
              e.

              Comment

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

                #8
                you can overwrite macros with downstream templates, so it should work with cpu related entities as well
                Zabbix 3.0 Network Monitoring book

                Comment

                • akapap
                  Member
                  • Nov 2009
                  • 35

                  #9
                  Originally posted by richlv
                  you can overwrite macros with downstream templates, so it should work with cpu related entities as well
                  If I put another template with only one macro ({$CPU_LOAD}) to the host group it will not be notice by the generic template_linux. If I link with template_linux it probably will be notice by all the hosts with that template.

                  What is your advice with the overwite macros?

                  Best regards,
                  e.

                  Comment

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

                    #10
                    i'm not sure whether cross-template macros would work, but i'd suggest creating templates like template_linux_base, template_mysql (or whatever services you have), then create template_my_100_servers and attach macro to the latter one. it also has the benefit that adding or removing a service from that class of servers becomes as easy as linking it to this collecting template.
                    Zabbix 3.0 Network Monitoring book

                    Comment

                    • akapap
                      Member
                      • Nov 2009
                      • 35

                      #11
                      But like I said. The problems begins with the core items, like CPU LOAD. In your scenario it will goes to the core/base template.

                      And the plan with different template will fail.

                      Best regards,
                      e.

                      Comment

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

                        #12
                        just tested this and it works as expected. what exactly does not work for you ?
                        Zabbix 3.0 Network Monitoring book

                        Comment

                        • akapap
                          Member
                          • Nov 2009
                          • 35

                          #13
                          What have you tested? Cross-template macro?

                          In my scenario I need a way to put a macro into the group host, not to every host, but one level higher.

                          Comment

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

                            #14
                            a cross-template usage of macro, where one template defines an item with macro, and another - macro itself.

                            and that's why i suggested creating a device class template for that group. so far you have not explained what or why does not work for you
                            Zabbix 3.0 Network Monitoring book

                            Comment

                            • akapap
                              Member
                              • Nov 2009
                              • 35

                              #15
                              The scenario:

                              1. 60 hosts,
                              2. 20 off them are linux base statsion - so I apply Templete_Linux to them,
                              3. Into Tepmplete_Linux I put {$SYSLOG_NAME} with default "syslog",
                              4. 10 hosts from Linux are running syslog-ng and exists in the same host group,
                              5. I don't want to put in every one of ten hosts macro by hand, I would like to apply host group macro to the group off 10 hosts.

                              I've tried to apply template with one one macro inside {$SYSLOG_NAME} and the default syslog-ng but it does not work.

                              What is the solution, if exists.

                              Best regards,
                              e.

                              Comment

                              Working...