zabbix_export:
  version: '6.0'
  date: '2021-11-21T21:22:14Z'
  groups:
    -
      uuid: 7df96b18c230490a9a0a9e2307226338
      name: Templates
  templates:
    -
      uuid: aeb61a427439443ca9f29407762eeb9c
      template: 'FreeBSD IP statistics'
      name: 'FreeBSD IP statistics'
      description: |
        ## Overview
        
        Keep track of IPv4 and IPv6 statistics on FreeBSD.
        
        
        
        
        ---
        
        
         
        
        
        In /usr/local/etc/zabbix3/zabbix\_agentd.conf, add:
        
        
        
        ```
        UserParameter=net.ip4[*],netstat -s -p ip | awk '/$1/{ print $$1}'  
        UserParameter=net.ip6[*],netstat -s -p ip6 | awk '/$1/{ print $$1}'
        ```
        
        
        
        ---
        
        
         
        
        
        Template might work on earlier Zabbix versions, only tested for 3.0.x
        
        
        
        ## Author
        
        RedShift
        
        
      groups:
        -
          name: Templates
      items:
        -
          uuid: b860380095ef4a95ae30564faee6d253
          name: 'U IPv4 Packet sent'
          type: ZABBIX_ACTIVE
          key: 'net.ip4[packets sent from this host]'
          delay: '30'
          value_type: FLOAT
          units: packets
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          tags:
            -
              tag: Application
              value: IPv4
        -
          uuid: 2da8bf7f23494598b2153f7bd853d2ca
          name: 'U IPv4 total packets received'
          type: ZABBIX_ACTIVE
          key: 'net.ip4[total packets received]'
          delay: '30'
          value_type: FLOAT
          units: packets
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          tags:
            -
              tag: Application
              value: IPv4
        -
          uuid: ca8b03d42d9d444eab3bfa4b4c450518
          name: 'U IPv6 Packets sent'
          type: ZABBIX_ACTIVE
          key: 'net.ip6[packets sent from this host]'
          delay: '30'
          value_type: FLOAT
          units: packets
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          tags:
            -
              tag: Application
              value: IPv6
        -
          uuid: 22589639953f48b9868646ab4abfe75d
          name: 'U IPv6 total packets received'
          type: ZABBIX_ACTIVE
          key: 'net.ip6[total packets received]'
          delay: '30'
          value_type: FLOAT
          units: packets
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          tags:
            -
              tag: Application
              value: IPv6
  graphs:
    -
      uuid: 38a0fa13e57e450dbcaf2f513fcf1dc2
      name: 'IPv4 traffic'
      graph_items:
        -
          drawtype: GRADIENT_LINE
          color: 00AA00
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip4[total packets received]'
        -
          sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 3333FF
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip4[packets sent from this host]'
    -
      uuid: 5b0e32fcb76548fabb15baf9f3105758
      name: 'IPv4 vs IPv6 traffic'
      height: '300'
      yaxismax: '0'
      show_work_period: 'NO'
      show_triggers: 'NO'
      type: EXPLODED
      show_3d: 'YES'
      graph_items:
        -
          drawtype: FILLED_REGION
          color: AA00AA
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip4[total packets received]'
        -
          sortorder: '1'
          drawtype: FILLED_REGION
          color: AAAA00
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip4[packets sent from this host]'
        -
          sortorder: '2'
          drawtype: FILLED_REGION
          color: 00AA00
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip6[total packets received]'
        -
          sortorder: '3'
          drawtype: FILLED_REGION
          color: 3333FF
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip6[packets sent from this host]'
    -
      uuid: 41266eae01d940a8a7ba7463e37813df
      name: 'IPv6 traffic'
      graph_items:
        -
          drawtype: GRADIENT_LINE
          color: 00AA00
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip6[total packets received]'
        -
          sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 3333FF
          item:
            host: 'FreeBSD IP statistics'
            key: 'net.ip6[packets sent from this host]'
