Ad Widget

Collapse

Dynamic type of information for item prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hpeti2
    Junior Member
    • Jul 2015
    • 29

    #1

    Dynamic type of information for item prototype

    Dear Community!

    I use ubuntu and I want to make discovery function for bond interfaces. For example the returned json object is this:

    Code:
    {"data":[
    {"{#BOND_IF}": "bond1", "{#SLAVE_IF}": "eth0", "{#PARAMETER_IF}": "Speed"},
    {"{#BOND_IF}": "bond1", "{#SLAVE_IF}": "eth0", "{#PARAMETER_IF}": "Link Failure Count"},
    {"{#BOND_IF}": "bond1", "{#SLAVE_IF}": "eth0", "{#PARAMETER_IF}": "Partner Churn State"},
    {"{#BOND_IF}": "bond1", "{#SLAVE_IF}": "eth1", "{#PARAMETER_IF}": "Speed"},
    {"{#BOND_IF}": "bond1", "{#SLAVE_IF}": "eth1", "{#PARAMETER_IF}": "Link Failure Count"},
    {"{#BOND_IF}": "bond1", "{#SLAVE_IF}": "eth1", "{#PARAMETER_IF}": "Partner Churn State"}
    ]}
    How can I set different "type of information" for these discovered key-value pairs?
    I want that "Link Failure Count" be numeric, others are text.

    thanks
  • hpeti2
    Junior Member
    • Jul 2015
    • 29

    #2
    Thanks Cyber!

    I read this article. I hope that somebody has a useful trick or method for this problem.

    Comment

    • hpeti2
      Junior Member
      • Jul 2015
      • 29

      #3
      I can not define filter on item prototype level. Just on dicovery rule level. Only these filter expressions can be used inside one discovery rule.
      I use 5.0.7.

      PS. I found a workaround solution, manually create item prototypes for different type of information. {#PARAMETER_IF} only used for one type of information.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        Prototype has fixed type of information...
        https://www.zabbix.com/documentation...ros/lld_macros
        I don't see "type of information" in the list .. Make your conclusions..

        Only by separate prototype... and filters.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Well, adding another prototype with different type of info to same discovery and making filters to both of them based on {#PARAMETER_IF} should do the trick for you. In one you "Match" in other "Don't match". Not really a rocket science..

          Comment

          Working...