zabbix监控交换机通用模板

zabbix_export:
  version: '6.0'
  templates:
    -
      uuid: a7e5e31b514644ea990eb5527163aabb
      template: 'LW_Template SNMP Network Topology x64'
      name: 网络端口通用模板64位_V2
      groups:
        -
          name: Templates/Network devices
      items:
        -
          uuid: 68ac22e019cd49a19cb10675273f749c
          name: 端口数量
          type: SNMP_AGENT
          snmp_oid: 'IF-MIB::ifNumber.0'
          key: ifNumber
          delay: '3600'
          history: 7d
          description: 'The number of network interfaces (regardless of their current state) present on this system.'
          tags:
            -
              tag: Application
              value: 端口信息
      discovery_rules:
        -
          uuid: 07a3be5410f8431a9db7cdfcf1e83069
          name: '端口表 UP'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},IF-MIB::ifName,{#SNMPOPEN},IF-MIB::ifOperStatus]'
          key: ifDescr
          delay: '3600'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#SNMPVALUE}'
                value: '@Network interfaces for discovery'
                formulaid: B
              -
                macro: '{#SNMPOPEN}'
                value: (1|3)
                formulaid: A
          lifetime: 3d
          description: 端口表
          item_prototypes:
            -
              uuid: 4ec940b171e947e48c9476219d57cbc6
              name: '{#SNMPVALUE}(端口启用管理状态)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifAdminStatus.{#SNMPINDEX}'
              key: 'ifAdminStatus[{#SNMPVALUE}]'
              delay: 2m
              history: 7d
              valuemap:
                name: 'SNMP 接口状态 (ifAdminStatus)'
              tags:
                -
                  tag: Application
                  value: 端口状态
            -
              uuid: 7d9849c4177d4b5b939b645f01cabf39
              name: '{#SNMPVALUE}(端口描述)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifAlias.{#SNMPINDEX}'
              key: 'ifAlias[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              description: 端口描述
              tags:
                -
                  tag: Application
                  value: 端口信息
            -
              uuid: 5b82edea1ab6476eaaee13c810fb2482
              name: '{#SNMPVALUE}(端口每秒接收速率)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifHCInOctets.{#SNMPINDEX}'
              key: 'ifHCInOctetsPersecond[{#SNMPVALUE}]'
              delay: 2m
              history: 7d
              units: bps
              description: 端口每秒接收速率
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                -
                  tag: Application
                  value: 端口速率
            -
              uuid: a75b74cf201f4b4b919889fd6c3ffbac
              name: '{#SNMPVALUE}(端口接收总流量)(5分钟)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifHCInOctets.{#SNMPINDEX}'
              key: 'ifHCInOctets[{#SNMPVALUE}]'
              delay: 5m
              history: 7d
              status: DISABLED
              discover: NO_DISCOVER
              units: B
              preprocessing:
                -
                  type: SIMPLE_CHANGE
                  parameters:
                    - ''
              tags:
                -
                  tag: Application
                  value: 端口速率
            -
              uuid: a8850a46ec77413bbd708ebeece730dc
              name: '{#SNMPVALUE}(端口每秒发送速率)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifHCOutOctets.{#SNMPINDEX}'
              key: 'ifHCOutOctetsPersecond[{#SNMPVALUE}]'
              delay: 2m
              history: 7d
              units: bps
              description: |
                端口每秒发送速率
                .
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
                -
                  type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                -
                  tag: Application
                  value: 端口速率
            -
              uuid: f2bffca3ce4f407098a772ef60f08973
              name: '{#SNMPVALUE}(端口发送总流量)(5分钟)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifHCOutOctets.{#SNMPINDEX}'
              key: 'ifHCOutOctets[{#SNMPVALUE}]'
              delay: 5m
              history: 7d
              status: DISABLED
              discover: NO_DISCOVER
              units: B
              preprocessing:
                -
                  type: SIMPLE_CHANGE
                  parameters:
                    - ''
              tags:
                -
                  tag: Application
                  value: 端口速率
            -
              uuid: 1e60cc96677547caa1a5d7b487179762
              name: '{#SNMPVALUE}(端口带宽)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifHighSpeed.{#SNMPINDEX}'
              key: 'ifHighSpeed[{#SNMPVALUE}]'
              delay: 5m
              history: 7d
              units: bps
              description: 端口带宽
              preprocessing:
                -
                  type: MULTIPLIER
                  parameters:
                    - '1000000'
              tags:
                -
                  tag: Application
                  value: 端口带宽
            -
              uuid: ef8769075a554cb1ab4989b4fe0e4970
              name: '{#SNMPVALUE}(端口序号)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifIndex.{#SNMPINDEX}'
              key: 'ifIndex[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              description: 端口序号
              tags:
                -
                  tag: Application
                  value: 端口信息
            -
              uuid: 8a82b964a8db4f7eb969176db36d8dda
              name: '{#SNMPVALUE}(端口每秒接收丢包数)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifInDiscards.{#SNMPINDEX}'
              key: 'ifInDiscards[{#SNMPVALUE}]'
              delay: 10m
              history: 7d
              description: 端口每秒接收丢包数
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              tags:
                -
                  tag: Application
                  value: 端口错丢包
            -
              uuid: b490aef6c24b4afabadec122e64c4aa9
              name: '{#SNMPVALUE}(端口每秒接收错误包数)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifInErrors.{#SNMPINDEX}'
              key: 'ifInErrors[{#SNMPVALUE}]'
              delay: 10m
              history: 7d
              description: 端口每秒接收错误包数
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              tags:
                -
                  tag: Application
                  value: 端口错丢包
            -
              uuid: 68ef0065bcd14910a281ea1c631ac1c1
              name: '{#SNMPVALUE}(端口名称)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifName.{#SNMPINDEX}'
              key: 'ifName[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              description: 端口名称
              tags:
                -
                  tag: Application
                  value: 端口信息
            -
              uuid: 468f508478e74e2ca801ce6e1e7344ec
              name: '{#SNMPVALUE}(端口物理连接状态)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifOperStatus.{#SNMPINDEX}'
              key: 'ifOperStatus[{#SNMPVALUE}]'
              delay: 2m
              history: 7d
              valuemap:
                name: 'SNMP 接口状态 (ifOperStatus)'
              tags:
                -
                  tag: Application
                  value: 端口状态
              trigger_prototypes:
                -
                  uuid: 80897834772d483ca19610433d4d6e18
                  expression: 'last(/LW_Template SNMP Network Topology x64/ifOperStatus[{#SNMPVALUE}])=2'
                  name: '[网络设备]{HOST.NAME}设备端口{#SNMPVALUE}处于DOWN状态'
                  priority: AVERAGE
                  description: |
                    状态值表示:
                    1⇒正常
                    2⇒关闭
                    {HOST.NAME}设备端口{#SNMPVALUE}状态不正常,可能连线松动、未启用、对端设备重启、端口损坏等
                  manual_close: 'YES'
            -
              uuid: 98561ef86fe94c7885f616fb81543f87
              name: '{#SNMPVALUE}(端口每秒发送丢包数)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifOutDiscards.{#SNMPINDEX}'
              key: 'ifOutDiscards[{#SNMPVALUE}]'
              delay: 10m
              history: 7d
              description: 端口每秒发送丢包数
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              tags:
                -
                  tag: Application
                  value: 端口错丢包
            -
              uuid: 7fab833777974b2b8890027f77aed040
              name: '{#SNMPVALUE}(端口每秒发送错误包数)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifOutErrors.{#SNMPINDEX}'
              key: 'ifOutErrors[{#SNMPVALUE}]'
              delay: 10m
              history: 7d
              description: 端口每秒发送错误包数
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              tags:
                -
                  tag: Application
                  value: 端口错丢包
            -
              uuid: 28209208530343a79111ee98baae4f1b
              name: '{#SNMPVALUE}(端口每秒接收速率)-p95'
              type: CALCULATED
              key: 'ifp95ifInOctetsPersecond[{#SNMPVALUE}]'
              units: bps
              params: 'percentile(//net.if.in[ifInOctets.{#SNMPINDEX}],1d,95)'
              tags:
                -
                  tag: Application
                  value: 端口-P95
            -
              uuid: eaa0dd4bd02242cdbb6cc24284a730e9
              name: '{#SNMPVALUE}(端口每秒发送速率)-p95'
              type: CALCULATED
              key: 'ifp95ifOutOctetsPersecond[{#SNMPVALUE}]'
              units: bps
              params: 'percentile(//net.if.out[ifOutOctets.{#SNMPINDEX}],1d,95)'
              tags:
                -
                  tag: Application
                  value: 端口-P95
            -
              uuid: 94fa085a1c4947c8b0717aa40494d84d
              name: '{#SNMPVALUE}(端口物理地址)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifPhysAddress.{#SNMPINDEX}'
              key: 'ifPhysAddress[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              description: 端口物理地址
              tags:
                -
                  tag: Application
                  value: 端口信息
            -
              uuid: e535b379b48844a499ea1a0cb99833d7
              name: '{#SNMPVALUE}(端口带宽接收利用率)'
              type: CALCULATED
              key: 'ifSpeedifHCInOctetsPersecond[{#SNMPVALUE}]'
              delay: 2m
              history: 7d
              status: DISABLED
              discover: NO_DISCOVER
              units: '%'
              params: '100*last(//ifHCInOctetsPersecond[{#SNMPVALUE}])/last(//ifHighSpeed[{#SNMPVALUE}])'
              description: 端口带宽利用率
              tags:
                -
                  tag: Application
                  value: 端口带宽
            -
              uuid: b0279cfb1d2a4465b26a090f381c50ee
              name: '{#SNMPVALUE}(端口带宽发送利用率)'
              type: CALCULATED
              key: 'ifSpeedifHCOutOctetsPersecond[{#SNMPVALUE}]'
              delay: 2m
              history: 7d
              status: DISABLED
              discover: NO_DISCOVER
              units: '%'
              params: '100*last(//ifHCOutOctetsPersecond[{#SNMPVALUE}])/last(//ifHighSpeed[{#SNMPVALUE}])'
              description: 端口带宽利用率
              tags:
                -
                  tag: Application
                  value: 端口带宽
            -
              uuid: dd6f3097c496453a8c43445f67f15f45
              name: '{#SNMPVALUE}(端口类型)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifType.{#SNMPINDEX}'
              key: 'ifType[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              description: 端口类型
              valuemap:
                name: ifType
              tags:
                -
                  tag: Application
                  value: 端口信息
          trigger_prototypes:
            -
              uuid: f5ef5d3da2c84b45b8a4f9807eb891bf
              expression: 'last(/LW_Template SNMP Network Topology x64/ifSpeedifHCOutOctetsPersecond[{#SNMPVALUE}])>90 and last(/LW_Template SNMP Network Topology x64/ifHighSpeed[{#SNMPVALUE}])>0'
              name: '[网络设备]{HOST.NAME}设备端口{#SNMPVALUE}带宽发送利用率大于90%'
              priority: WARNING
              description: |
                (状态值表示当前利用率)
                {HOST.NAME}设备端口{#SNMPVALUE}带宽发送利用率大于90%
              manual_close: 'YES'
            -
              uuid: 09fd0ea46a7549c49ed3342b0f25580d
              expression: 'last(/LW_Template SNMP Network Topology x64/ifSpeedifHCInOctetsPersecond[{#SNMPVALUE}])>90 and last(/LW_Template SNMP Network Topology x64/ifHighSpeed[{#SNMPVALUE}])>0'
              name: '[网络设备]{HOST.NAME}设备端口{#SNMPVALUE}带宽接收利用率大于90%'
              priority: WARNING
              description: |
                (状态值表示当前利用率)
                {HOST.NAME}设备端口{#SNMPVALUE}带宽接收利用率大于80%
              manual_close: 'YES'
          graph_prototypes:
            -
              uuid: d59dacaf55ae4690953e835bb286e1d1
              name: '网络端口 {#SNMPVALUE} 利用率'
              graph_items:
                -
                  color: 2774A4
                  item:
                    host: 'LW_Template SNMP Network Topology x64'
                    key: 'ifSpeedifHCOutOctetsPersecond[{#SNMPVALUE}]'
                -
                  sortorder: '1'
                  color: A54F10
                  item:
                    host: 'LW_Template SNMP Network Topology x64'
                    key: 'ifSpeedifHCInOctetsPersecond[{#SNMPVALUE}]'
            -
              uuid: 861e245902fa4ba1ab7ca91131b60750
              name: '网络端口 {#SNMPVALUE} 总流量'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 00AA00
                  item:
                    host: 'LW_Template SNMP Network Topology x64'
                    key: 'ifHCInOctets[{#SNMPVALUE}]'
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 3333FF
                  item:
                    host: 'LW_Template SNMP Network Topology x64'
                    key: 'ifHCOutOctets[{#SNMPVALUE}]'
            -
              uuid: 00f094ff5681455b9f190ad40e478ad5
              name: '网络端口 {#SNMPVALUE} 速率'
              graph_items:
                -
                  color: 2774A4
                  item:
                    host: 'LW_Template SNMP Network Topology x64'
                    key: 'ifHCInOctetsPersecond[{#SNMPVALUE}]'
                -
                  sortorder: '1'
                  color: A54F10
                  item:
                    host: 'LW_Template SNMP Network Topology x64'
                    key: 'ifHCOutOctetsPersecond[{#SNMPVALUE}]'
        -
          uuid: 20abc1915e81424e8a2a4b6f1b1d0ca5
          name: '端口表 DOWN'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE2},IF-MIB::ifName,{#SNMPOPEN},IF-MIB::ifOperStatus]'
          key: ifDescr2
          delay: '3600'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#SNMPVALUE2}'
                value: '@Network interfaces for discovery'
                formulaid: B
              -
                macro: '{#SNMPOPEN}'
                value: (2)
                formulaid: A
          lifetime: 0d
          description: 端口表
          item_prototypes:
            -
              uuid: 03614735fd2246419ddca4c5c84b0a7a
              name: '{#SNMPVALUE2} (端口启用管理状态)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifAdminStatus.{#SNMPINDEX}'
              key: 'ifAdminStatus[{#SNMPVALUE2}]'
              delay: 2m
              valuemap:
                name: 'SNMP 接口状态 (ifAdminStatus)'
              tags:
                -
                  tag: Application
                  value: 端口状态
            -
              uuid: 88bc41b74517474fb92449648104b724
              name: '{#SNMPVALUE2} (端口物理连接状态)'
              type: SNMP_AGENT
              snmp_oid: 'IF-MIB::ifOperStatus.{#SNMPINDEX}'
              key: 'ifOperStatus[{#SNMPVALUE2}]'
              delay: 2m
              valuemap:
                name: 'SNMP 接口状态 (ifOperStatus)'
              tags:
                -
                  tag: Application
                  value: 端口状态
      valuemaps:
        -
          uuid: bb18a6798f954add80d48b6ee38f994b
          name: ifType
          mappings:
            -
              value: '1'
              newvalue: other
            -
              value: '2'
              newvalue: regular1822
            -
              value: '3'
              newvalue: hdh1822
            -
              value: '4'
              newvalue: ddn-x25
            -
              value: '5'
              newvalue: rfc877-x25
            -
              value: '6'
              newvalue: ethernet-csmacd
            -
              value: '7'
              newvalue: iso88023-csmacd
            -
              value: '8'
              newvalue: iso88024-tokenBus
            -
              value: '9'
              newvalue: iso88025-tokenRing
            -
              value: '10'
              newvalue: iso88026-man
            -
              value: '11'
              newvalue: starLan
            -
              value: '12'
              newvalue: proteon-10Mbit
            -
              value: '13'
              newvalue: proteon-80Mbit
            -
              value: '14'
              newvalue: hyperchannel
            -
              value: '15'
              newvalue: fddi
            -
              value: '16'
              newvalue: lapb
            -
              value: '17'
              newvalue: sdlc
            -
              value: '18'
              newvalue: ds1
            -
              value: '19'
              newvalue: e1
            -
              value: '20'
              newvalue: basicISDN
            -
              value: '21'
              newvalue: primaryISDN
            -
              value: '22'
              newvalue: propPointToPointSerial
            -
              value: '23'
              newvalue: ppp
            -
              value: '24'
              newvalue: softwareLoopback
            -
              value: '25'
              newvalue: eon
            -
              value: '26'
              newvalue: ethernet-3Mbit
            -
              value: '27'
              newvalue: nsip
            -
              value: '28'
              newvalue: slip
            -
              value: '29'
              newvalue: ultra
            -
              value: '30'
              newvalue: ds3
            -
              value: '31'
              newvalue: sip
            -
              value: '32'
              newvalue: frame-relay
        -
          uuid: a02d3114604d42aea87967c942d50e33
          name: 'SNMP 接口状态 (ifAdminStatus)'
          mappings:
            -
              value: '1'
              newvalue: up
            -
              value: '2'
              newvalue: down
            -
              value: '3'
              newvalue: testing
        -
          uuid: d1e0736e24624b329d4da02dc642e88d
          name: 'SNMP 接口状态 (ifOperStatus)'
          mappings:
            -
              value: '1'
              newvalue: up
            -
              value: '2'
              newvalue: down
            -
              value: '3'
              newvalue: testing
            -
              value: '4'
              newvalue: unknown
            -
              value: '5'
              newvalue: dormant
            -
              value: '6'
              newvalue: notPresent
            -
              value: '7'
              newvalue: lowerLayerDown
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值