Ad Widget

Collapse

How i can calculate items in a interface Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • othin
    Junior Member
    • May 2016
    • 14

    #1

    How i can calculate items in a interface Discovery

    Hi all, i have a question about a interface discovery of a my template that i use for my switches.
    I want to monitor my swtiches and calculate the total traffic inbound and outbound

    My interface discovery find well -> ifOutOctets[{#SNMPVALUE}] and ifInOctets[{#SNMPVALUE}]
    so the template is correctly for find the total of each ports

    I would create a calculate item for the total of each inbound ports or the total of each ports of the switch

    If i create a item -> last("ifInOctets[{#SNMPVALUE}]")+last("ifOutOctets[{#SNMPVALUE}]") but is wrong

    How i can do it?

    I have a lot of switches, i can't do all in manual with an item (for example) :
    last("ifHCInOctets[1/g1]")+last("ifHCInOctets[1/g2]")+last("ifHCInOctets[1/g3]")+last("ifHCInOctets[1/g4]")+last("ifHCInOctets[1/g5]")+last("ifHCInOctets[1/g6]")+last("ifHCInOctets[1/g7]")+last("ifHCInOctets[1/g8]")+last("ifHCInOctets[1/g9]")+last("ifHCInOctets[1/g10]")+last("ifHCInOctets[1/g11]")+last("ifHCInOctets[1/g12]")+last("ifHCInOctets[1/g13]")+last("ifHCInOctets[1/g14]")+last("ifHCInOctets[1/g15]")+last("ifHCInOctets[1/g16]")+last("ifHCInOctets[1/g17]")+last("ifHCInOctets[1/g18]")+last("ifHCInOctets[1/g19]")+last("ifHCInOctets[1/g20]")+last("ifHCInOctets[1/g21]")+last("ifHCInOctets[1/g22]")+last("ifHCInOctets[1/g23]")+last("ifHCInOctets[1/g24]")+last("ifHCInOctets[1/g25]")+last("ifHCInOctets[1/g26]")+last("ifHCInOctets[1/g27]")+last("ifHCInOctets[1/g28]")+last("ifHCInOctets[1/g29]")+last("ifHCInOctets[1/g30]")+last("ifHCInOctets[1/g31]")+last("ifHCInOctets[1/g32]")+last("ifHCInOctets[1/g33]")+last("ifHCInOctets[1/g34]")+last("ifHCInOctets[1/g35]")+last("ifHCInOctets[1/g36]")+last("ifHCInOctets[1/g37]")+last("ifHCInOctets[1/g38]")+last("ifHCInOctets[1/g39]")+last("ifHCInOctets[1/g40]")+last("ifHCInOctets[1/g41]")+last("ifHCInOctets[1/g42]")+last("ifHCInOctets[1/g43]")+last("ifHCInOctets[1/g44]")+last("ifHCInOctets[1/g45]")+last("ifHCInOctets[1/g46]")+last("ifHCInOctets[1/g47]")+last("ifHCInOctets[1/g48]")+last("ifHCInOctets[1/xg49]")+last("ifHCInOctets[1/xg50]")+last("ifHCInOctets[1/xg51]")+last("ifHCInOctets[1/xg52]")

    This metod run, but if i use the template on a netgear,hpo,tplink,cisco ecc... the name of items change,

    Anyone can help me?
    Thanks all
    (i use zabbix 3.2)
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    No offence Q: what is the sense calculating such values and what you are trying to archive?
    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

    • othin
      Junior Member
      • May 2016
      • 14

      #3
      Originally posted by kloczek
      No offence Q: what is the sense calculating such values and what you are trying to archive?
      Absolutely no offense! i want to know the total traffic on my switch because i want to know if it is oversized for the position it is located

      My idea is to have a template for any switch that i'm going to use (any model and brand) and have i grafic for the total traffic for each port and the total in the switch (the sum of every ports)

      at the moment i can have the total traffic for every ports with this "discovery item" (inside: ifOutOctets[{#SNMPVALUE}] and ifInOctets[{#SNMPVALUE}]) ...but how i can put a discovery item for the calculate of this ports?

      Sorry if i explain myself bad, be patient
      Last edited by othin; 07-09-2018, 08:20.

      Comment

      • othin
        Junior Member
        • May 2016
        • 14

        #4
        Click image for larger version

Name:	calculated.JPG
Views:	1303
Size:	66.9 KB
ID:	365517Click image for larger version  Name:	Item prototypes.JPG Views:	1 Size:	71.1 KB ID:	365516Click image for larger version  Name:	template1.JPG Views:	1 Size:	44.8 KB ID:	365515
        Last edited by othin; 07-09-2018, 08:34.

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by othin

          Absolutely no offense! i want to know the total traffic on my switch because i want to know if it is oversized for the position it is located

          My idea is to have a template for any switch that i'm going to use (any model and brand) and have i grafic for the total traffic for each port and the total in the switch (the sum of every ports)

          at the moment i can have the total traffic for every ports with this "discovery item" (inside: ifOutOctets[{#SNMPVALUE}] and ifInOctets[{#SNMPVALUE}]) ...but how i can put a discovery item for the calculate of this ports?

          Sorry if i explain myself bad, be patient
          Such things depends on switches backplain architecture. Usually other factors are more important like ints/s or other or even CPU usage than total bandwidth.
          In other words sum of all HCIn/s or HCOut/s IMO has very limited possibility to use on trying to evaluate is exact switch is OK in exact part of the network.
          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

          • othin
            Junior Member
            • May 2016
            • 14

            #6

            I understand what you mean and you are not in wrong, thanks

            Comment

            Working...