check_iftraffic

  • Hello, tell me why the value of traffic goes into negative?

    Average Traffic: -61867.39 kB/s (-4.8%) in, -73489.45 kB/s (-5.7%) out


    The value is not constant, it changes.



    Is it possible to advise another plug-in to remove traffic on the port or interface?

  • It could have something to do with the tmp files.

    maybe you tried to execute the script as the root user and now the monitoring user can not change the file on the disk.

  • 1 check Ok is UP at 1410 Mbit/sAverage Traffic: 38031427 B/s (3.0%) in, 2415116 B/s (0.2%) out

    2 chek warn UP at 1410 Mbit/sAverage Traffic: 54788498391954 B/s (4383079.9%) in, 2306614569981 B/s (184529.2%) out


    Maybe I did not correctly indicate the data for the check? Tell me, port 10 GB?

    Code
    1. object Service "iftrafficnew" { host_name = "X" import "iftrafficnew"
    2. vars.bandwidth = "10" vars.community = "S" vars.hostname = "10.10.10.7" vars.interface = "ix1" vars.max = "10000"
    3. }
  • I can't see what you do with this values, but you need to set -I and/or -O to "10000" while -u is set to "m"


    Code
    1. -u, --units STRING
    2. g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Required if -b, -I, -M,
    3. or -O are used.
    4. -I, --inBandwidth INTEGER
    5. Interface maximum speed in kilo/mega/giga/bits per second. Applied to
    6. both IN and OUT if out (-O) max speed is not provided. Requires -u.
    7. -O, --outBandwidth INTEGER
    8. Interface maximum speed in kilo/mega/giga/bits per second. Applied to
    9. OUT traffic. Uses the same units value given for -b. Requires -u.
  • There already is a template for check_iftraffic64.

    As newer Versions of this plugin supports more options including snmpv3 I added these values to my check-template:

    The post was edited 1 time, last by unic ().

  • Sounds like a PR.

    No, no, it's not PR, I really can not figure out why the mapping is not correctly going, for me it's very important to set up a quality plug-in.

  • I can't see what you do with this values, but you need to set -I and/or -O to "10000" while -u is set to "m"


    Code
    1. -u, --units STRING
    2. g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Required if -b, -I, -M,
    3. or -O are used.
    4. -I, --inBandwidth INTEGER
    5. Interface maximum speed in kilo/mega/giga/bits per second. Applied to
    6. both IN and OUT if out (-O) max speed is not provided. Requires -u.
    7. -O, --outBandwidth INTEGER
    8. Interface maximum speed in kilo/mega/giga/bits per second. Applied to
    9. OUT traffic. Uses the same units value given for -b. Requires -u.



    I indicated such values, the result

    Average Traffic: 219550868686768 bit/s (2195508.7%) in, 9251793171368 bit/s (92517.9%) out


    Next check its OK

    OK: i1 is UP at 1410 Mbit/sAverage Traffic: 32910778 B/s (2.6%) in, 1907865 B/s (0.2%) out


    1 check Warning, 1 check OK.




    My options


    The post was edited 2 times, last by jkvint ().