Ad Widget

Collapse

Monitoring network interfaces

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarcoUK
    Junior Member
    • Oct 2021
    • 26

    #1

    Monitoring network interfaces

    Hi,
    I'm trying to migrate the monitoring interface from OPSview to Zabbix.

    I need to monitoring network usage for the networks in0 and out0:
    Code:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet xx.xx.xx.xx/32 brd xx.xx.xx.xx scope global lo:bgp
    valid_lft forever preferred_lft forever
    2: in0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:Xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.2/30 brd 192.168.10.3 scope global in0
    valid_lft forever preferred_lft forever
    3: out0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:Xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.6/30 brd 192.168.10.7 scope global out0
    valid_lft forever preferred_lft forever
    4: mgmt0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:Xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.10/30 brd 192.168.10.11 scope global mgmt0
    valid_lft forever preferred_lft forever
    5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0c:c4:7a:b2:31:e7 brd ff:ff:ff:ff:ff:ff
    6: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default
    link/ether xx:xx:xx:Xx:xx:xx brd ff:ff:ff:ff:ff:ff
    In OPSview I have this check:
    Code:
    check_sns_stats -r myservername.mydomain.com/interface-in0/if_octets -s rx --maxe 30000000
    I tried to configure in Zabbix in this way:
    Code:
    Name: interface_in0
    Type: SNMP agentKey: interface_in0
    SNMP OID: IF-MIB::ifInOctets.0
    Type of information: Numeric (float)
    Host interface: 192.168.10.10:161
    my expression in the trigger is:
    Code:
    ({host-servers:interface_in0.avg(1s)}) > 30000000
    But I receive the error:
    Code:
    No Such Instance currently exists at this OID
    and
    Code:
    Cannot evaluate expression: "Cannot evaluate function "hawkeye-co.bllon.isp.sky.com:interface_in0.avg(1s)": item is not supported."

    How can I fix it?
    Last edited by MarcoUK; 13-10-2021, 10:23.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Try use the snmpwalk command to check if the value can be obtained with the specified OID.
    ex.
    Code:
    snmpwalk -v 2c -c public <IP or Hostname> IF-MIB::ifInOctets

    Comment

    • MarcoUK
      Junior Member
      • Oct 2021
      • 26

      #3
      Hi,
      thanks for the reply.

      From which server I need to run this command? From the Zabbix server or the monitored server?

      Comment

      • MarcoUK
        Junior Member
        • Oct 2021
        • 26

        #4
        These are my output:
        Code:
        $ snmpwalk -v 2c -c public 192.168.10.10 IF-MIB::ifInOctets
        IF-MIB::ifInOctets.1 = Counter32: 119088285
        IF-MIB::ifInOctets.2 = Counter32: 887955173
        IF-MIB::ifInOctets.3 = Counter32: 77958608
        IF-MIB::ifInOctets.4 = Counter32: 1871342285
        IF-MIB::ifInOctets.5 = Counter32: 0
        IF-MIB::ifInOctets.6 = Counter32: 0
        $ snmpwalk -v 2c -c public 192.168.10.10 IF-MIB::ifOutOctets
        IF-MIB::ifOutOctets.1 = Counter32: 119088285
        IF-MIB::ifOutOctets.2 = Counter32: 364224
        IF-MIB::ifOutOctets.3 = Counter32: 1318454447
        IF-MIB::ifOutOctets.4 = Counter32: 3905322101
        IF-MIB::ifOutOctets.5 = Counter32: 0
        IF-MIB::ifOutOctets.6 = Counter32: 0
        What are for in0 and what are for out0 interface?

        Is it correct the expression in my trigger?

        Code:
        ({host-servers:interface_in0.avg(1s)}) > 30000000

        Comment

        • Atsushi
          Senior Member
          • Aug 2013
          • 2028

          #5
          Try check interface name.
          Code:
          snmpwalk -v 2c -c public <IP or Hostname> .1.3.6.1.2.1.31.1.1.1.1
          The last number in the OID is the index value. If you add the index value to the end of the OID, you can get the value of IF-MIB::ifInOctets for that interface.
          ex.
          Code:
          snmpwalk -v 2c -c public <IP or Hostname> IF-MIB::ifInOctets.1

          Comment

          • MarcoUK
            Junior Member
            • Oct 2021
            • 26

            #6
            Thanks for the reply, it works.

            But in my trigger how can check that the value is not > 30000000 for each 1 second?

            Comment

            • Hamardaban
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • May 2019
              • 2713

              #7
              I think it will be useful for you to read this

              Comment

              Working...