Ad Widget

Collapse

Using self-defined macros/variables in items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mlange
    Member
    • Sep 2008
    • 78

    #1

    Using self-defined macros/variables in items

    I am currently creating templates for monitoring a large server landscape. Is there a way to use macros (if possible self-defined) in the key of an item? My problem is, that the keys of the items are highly dynamic e.g.

    jmx[jboss.web:name=ajp-IP_ADDRESS-8009,type=GlobalRequestProcessor][requestCount]

    In this item I want to set the IP and the Port dynamically, becaus it should be used by many hosts having a different configuration. What is the preferred way to do this? Can I use the template for it? I noticed that the default macros are not working in the key (e.g. {IPADDRESS}.

    Thanks,
    Marek
    Last edited by mlange; 25-09-2008, 13:53.
  • mlange
    Member
    • Sep 2008
    • 78

    #2
    Any idea how to realize this? To my mind this is a critical feature for setting up a large monitoring system. I am really stuck without this. If this is not possible yet, how can I create a feature request or get information on support conditions? We are very interested in the product and I would also be glad to contribute...Alexej?

    Comment

    • Kees Jan Koster
      Member
      • Oct 2007
      • 83

      #3
      Dear mlange,

      If you look at Zapcat (http://kjkoster.org/zapcat) you'll see that I solved this issue by writing a little servlet that generates a Zabbix template specifically for that host.

      So you install zapcat in your host and then have it generate its own template. You can then upload that template to Zabbix.

      Kees Jan

      Comment

      • mlange
        Member
        • Sep 2008
        • 78

        #4
        Thanks for your reply Jan I will check that out.

        Comment

        • mlange
          Member
          • Sep 2008
          • 78

          #5
          Ok I see how this works. It makes the generation of the template easier at the beginning. However the servlet generator has to be extended to include more items/triggers and the generated template has to be imported into Zabbix (this is a really annoying task if you have a lot of templates esp. when changing some items).

          Thanks

          Comment

          • mlange
            Member
            • Sep 2008
            • 78

            #6
            So to pick up my initial problem: to my mind it would make sense to be able to define variables on a host level (on top of the predefined like IP or DNS name). These variables could be used in the item/trigger definitions then. This avoids the annoying step to create/generate different templates for a host where the item/trigger definition differ. This includes not only host dependent values (like IP) but also other values needed (e.g. the jndi name of a connection pool of a java server). I really would like to see this as a feature request.

            Comment

            Working...