Ad Widget

Collapse

Cannot display values of external check data items on the map

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • allibek
    Junior Member
    • Aug 2019
    • 6

    #1

    Cannot display values of external check data items on the map

    Created script for measure inbound trafic(by the way not sure if its right) /usr/lib/zabbix/externalscripts/ifin.sh

    index=`snmpwalk -Oqv -v 2c -c ****** $1 IP-MIB::ipAdEntIfIndex.$1`
    data1=`snmpwalk -Oqv -v 2c -c ****** $1 IF-MIB::ifHCInOctets.$index`
    sleep 5
    data2=`snmpwalk -Oqv -v 2c -c ****** $1 IF-MIB::ifHCInOctets.$index`
    echo $(((8 * ($data2-$data1)) / 5))

    Created tamplate ifLoad with data item in and key ifin.sh["{HOST.CONN}"].
    Data are gathering and i even can build graphs. But i cannot display it on the map.
    Tryed:
    {ifLoad:ifin.sh["{HOST.CONN}"].last()}
    {ifLoad:ifin.sh["{HOST.CONN}"].last(0)}
    {{HOST.CONN}:ifLoad:ifin.sh["{HOST.CONN}"].last()}
    {{HOST.CONN}:ifLoad:ifin.sh["{HOST.CONN}"].last(0)}
    {{HOST.CONN}:ifin.sh["{HOST.CONN}"].last()}
    {{HOST.CONN}:ifin.sh["{HOST.CONN}"].last(0)}
    {{HOST.HOST}:ifin.sh["{HOST.CONN}"].last(0)}
    {{HOST.HOST}:ifin.sh["{HOST.HOST}"].last(0)}
    How to do it right?
    NEED HELP!!!!!
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Why you are using external checks to collect data over SNMP?
    You have SNMP item type.
    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

    • allibek
      Junior Member
      • Aug 2019
      • 6

      #3
      Hi kloczek! It seems there is no such MIB or OID which can display load on the routers port. There is only ifInOctets. So to calculate usage of port in bits per seconds you need delta(ifInOctets)/delta(time). If you know how to do it with SNMP item type please write.
      Last edited by allibek; 26-08-2019, 09:09.

      Comment

      Working...