Ad Widget

Collapse

How to monitor NIC Traffic Load on FreeBSD 6.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • overrider
    Member
    • Oct 2006
    • 36

    #1

    How to monitor NIC Traffic Load on FreeBSD 6.1

    Hello all,

    i would like to use the netloadin15[eth0] Item on my FreeBSD Server. However, my interface is not eth0 , but vrl0. Simply renaming the Item to reflecct my device just results in a Not Supported Message in the Trigger Status View. Any ideas?

    Thanks,
  • DiedX
    Senior Member
    • Oct 2004
    • 106

    #2
    which version of server and client do you use?
    https://www.diederik.nl

    Comment

    • overrider
      Member
      • Oct 2006
      • 36

      #3
      freebsd 6.1 and zabbix-1.1.1

      Comment

      • AlexWhite
        Member
        • Jun 2006
        • 31

        #4
        eth0 Is for Linux.
        I do simply. I set a rule
        Code:
        ipfw count in me out !me via re0
        which then and I process by means of zabbix_agentd.conf.

        Comment

        • overrider
          Member
          • Oct 2006
          • 36

          #5
          oh i thought one could just change the name of the nic somewhere.

          Comment

          • overrider
            Member
            • Oct 2006
            • 36

            #6
            can someone shed some more light on this? i would really like to get my zabbix to produce graphs for freebsd. my firewall in use is pf.

            particularly i am interested that once i have such a rule as described above, how can i process it from withing zabbix_agentd.conf?

            thanks and best regards,
            overrider

            Comment

            • overrider
              Member
              • Oct 2006
              • 36

              #7
              Hi,

              until we get Zabbix to support all those nifty net. items, here is what i did to monitor Bandwidth on FreeBSD with Zabbix, without needing to setup SNMP.

              1. vi /usr/local/bin/bwpoll_in.sh
              2. Copy and paste below into the File and save it

              #!/bin/sh
              /usr/bin/netstat -I fxp0 -b -f inet | grep fxp0 | awk '{print $7}'

              3. vi /usr/local/bin/bwpoll_out.sh
              4. Copy and paste below into the File and save it

              #!/bin/sh
              /usr/bin/netstat -I fxp0 -b -f inet | grep fxp0 | awk '{print $10}'

              5. chmod +x /usr/local/bin/bwpoll*
              6. vi /usr/local/bin/zabbix/zabbix_agentd.conf
              7. append these two lines to the end of the file and save it

              UserParameter=netfxp0in,/bin/sh /usr/local/bin/bwpoll_in.sh
              UserParameter=netfxp0out,/bin/sh /usr/local/bin/bwpoll_out.sh

              8. /usr/local/etc/rc.d/zabbix_agentd restart
              9. Login to your Zabbix Webinterface
              10. Create a new Item which looks like this
              Describtion: NIC Load IN
              Type: Zabbix Agent
              Key: netfxp0in
              Type of Information: Numeric Float
              Units: bps
              Use multiplier: Do not use
              Update interval (in sec): 60
              Keep history (in days): 7
              Keep trends (in days): 90
              Status: Monitored
              Store Value: Delta(Speed per second)

              11. Create a new Item which looks like this
              Describtion: NIC Load OUT
              Type: Zabbix Agent
              Key: netfxp0out
              Type of Information: Numeric Float
              Units: bps
              Use multiplier: Do not use
              Update interval (in sec): 60
              Keep history (in days): 7
              Keep trends (in days): 90
              Status: Monitored
              Store Value: Delta(Speed per second)

              Note that wherever it says fxp0, you must change this to the Name of the NIC you want to monitor. Get the info using ifconfig.

              I you find an error or a better way to do this, please let me know.

              I have also posted this on my Website: Overridersworld

              Comment

              Working...