Bootstrap

Zabbix6.4网络设备模板

1、网络端口通用模板

zabbix_export:
  version: '6.4'
  template_groups:
    -
      uuid: 9397477ac4614c8da379ea37c1c5b0e0
      name: 监控模板
  templates:
    -
      uuid: a7e5e31b514644ea990eb5527163aabb
      template: 'LW_Template SNMP Network Topology x64'
      name: 网络端口通用模板64位_V2
      groups:
        -
          name: 监控模板
      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、网络设备通用模板(CPU、内存)

zabbix_export:
  version: '6.4'
  template_groups:
    -
      uuid: 989d6a022aab491b8a20c2ee4be9c738
      name: 网络设备模板
  templates:
    -
      uuid: e971c0237a7045558cb15fc34c047b59
      template: 'Template SNMP  Network General x64'
      name: 网络设备通用模板x64
      description: 启明星辰、山石、中兴、龙维等
      groups:
        -
          name: 网络设备模板
      items:
        -
          uuid: b806fc18199146d8861d02685b812336
          name: 'CPU Idle(CPU空闲率)'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.2021.11.11.0
          key: CPUIdle
          units: '%'
          description: .iso.org.dod.internet.private.enterprises.ucdavis.systemStats.ssCpuIdle.0
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: 2517775c36e345bcaddb40c4b1d0f1bb
          name: CPUUsage(CPU总使用率)
          type: CALCULATED
          key: CPUUsage
          units: '%'
          params: 100-(last(//CPUIdle))
          tags:
            -
              tag: Application
              value: 性能
          triggers:
            -
              uuid: be5825585d024e90a65f76201a3496df
              expression: 'avg(/Template SNMP  Network General x64/CPUUsage,180s)>80'
              name: '[网络设备]{HOST.NAME}设备CPU使用率持续3分钟高于80%'
              priority: WARNING
              description: |
                (状态值表示当前使用率)
                设备CPU使用率平均3分钟高于80%
              manual_close: 'YES'
              dependencies:
                -
                  name: '[网络设备]{HOST.NAME}设备CPU使用率持续3分钟高于95%'
                  expression: 'avg(/Template SNMP  Network General x64/CPUUsage,180s)>95'
            -
              uuid: 4e5924b9ffcb4ff095b57bc28b54e175
              expression: 'avg(/Template SNMP  Network General x64/CPUUsage,180s)>95'
              name: '[网络设备]{HOST.NAME}设备CPU使用率持续3分钟高于95%'
              priority: HIGH
              description: |
                (状态值表示当前使用率)
                设备CPU使用率平均3分钟高于95%
              manual_close: 'YES'
            -
              uuid: a9c7985ddef649cbbb42627d2281bceb
              expression: 'forecast(/Template SNMP  Network General x64/CPUUsage,10m,30m)>=100'
              name: '[网络设备]{HOST.NAME}设备CPU使用率根据前10分钟的趋势预测再过30分钟左右达到100%'
              priority: AVERAGE
              description: (状态值表示当前使用率)
              dependencies:
                -
                  name: '[网络设备]{HOST.NAME}设备CPU使用率持续3分钟高于95%'
                  expression: 'avg(/Template SNMP  Network General x64/CPUUsage,180s)>95'
        -
          uuid: 5ee238d9a94643feb7b7f00be549a50c
          name: 内存总剩余大小
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.2021.4.11.0
          key: MemoryFree
          units: B
          description: .iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalFree.0
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '1024'
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: d09fa9715da04a1081431768463010a4
          name: 'MemoryTotal 总内存'
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.2021.4.5.0
          key: MemoryTotal
          units: B
          description: 'snmptranslate -IR -On .iso.org.dod.internet.private.enterprises.ucdavis.memory.memTotalReal.0'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '1024'
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: 4850565508aa4475917939aca50f3cd1
          name: 内存使用率
          type: CALCULATED
          key: MemoryUsage
          units: '%'
          params: '100*(1-(last(//MemoryFree)/last(//MemoryTotal)))'
          description: 'Memory Usage'
          tags:
            -
              tag: Application
              value: 性能
          triggers:
            -
              uuid: e5a9141a52174342b944b041dc1db1e5
              expression: 'avg(/Template SNMP  Network General x64/MemoryUsage,180s)>80'
              name: '[网络设备]{HOST.NAME}设备内存使用率持续3分钟高于80%'
              priority: WARNING
              description: |
                (状态值表示当前使用率)
                设备内存使用率平均3分钟高于80%
              manual_close: 'YES'
              dependencies:
                -
                  name: '[网络设备]{HOST.NAME}设备内存使用率持续3分钟高于95%'
                  expression: 'avg(/Template SNMP  Network General x64/MemoryUsage,180s)>95'
            -
              uuid: 24af0b686c884a6caf4251d78658fec4
              expression: 'avg(/Template SNMP  Network General x64/MemoryUsage,180s)>95'
              name: '[网络设备]{HOST.NAME}设备内存使用率持续3分钟高于95%'
              priority: HIGH
              description: |
                (状态值表示当前使用率)
                设备内存使用率平均3分钟高于99%
              manual_close: 'YES'
            -
              uuid: 3a0b9712a19f4930ae554abf3d6de98c
              expression: 'forecast(/Template SNMP  Network General x64/MemoryUsage,10m,30m)>=100'
              name: '[网络设备]{HOST.NAME}设备内存使用率根据前10分钟的趋势预测再过30分钟左右达到100%'
              priority: AVERAGE
              manual_close: 'YES'
              dependencies:
                -
                  name: '[网络设备]{HOST.NAME}设备内存使用率持续3分钟高于95%'
                  expression: 'avg(/Template SNMP  Network General x64/MemoryUsage,180s)>95'

3、锐捷网络网络设备通用模板

zabbix_export:
  version: '6.4'
  template_groups:
    -
      uuid: 9397477ac4614c8da379ea37c1c5b0e0
      name: 监控模板
    -
      uuid: 989d6a022aab491b8a20c2ee4be9c738
      name: 网络设备模板
  templates:
    -
      uuid: 8638ddead0a0416297455d72ecdcd076
      template: 'Template of Snmp RuiJie General'
      name: '锐捷网络设备通用模板[4881]'
      groups:
        -
          name: 监控模板
        -
          name: 网络设备模板
      items:
        -
          uuid: 063d2bb3edd64113a95d0215fdceaf0c
          name: CPU使用率(1min内)
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.36.1.1.2.0
          key: 'CPUUsage[last1min]'
          units: '%'
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: 700666feb3ef43feb68523ca55640fbb
          name: CPU使用率(5min内)
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.36.1.1.3.0
          key: CPUUsage_last5min
          units: '%'
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: 341e2cb7372d4cf49b2afd5a045739cb
          name: CPU使用率(5s内)
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.36.1.1.1.0
          key: CPUUsage_last5sec
          units: '%'
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: 236a8292058745269e3b166c0c7b696b
          name: 序列号
          type: SNMP_AGENT
          snmp_oid: enterprises.4881.1.1.10.2.1.1.24.0
          key: dev.serial
          delay: 1d
          history: 7d
          trends: '0'
          value_type: CHAR
          tags:
            -
              tag: Application
              value: 常规
        -
          uuid: 2e07dbe2cbb349a3b1ac3d4bb6b0ebb3
          name: 软件版本
          type: SNMP_AGENT
          snmp_oid: enterprises.4881.1.1.10.2.1.1.2.0
          key: dev.software.version
          delay: 1d
          history: 7d
          trends: '0'
          value_type: CHAR
          tags:
            -
              tag: Application
              value: 常规
        -
          uuid: f4309682963647a39f32fc2b7a3a8aca
          name: 固件版本
          type: SNMP_AGENT
          snmp_oid: enterprises.4881.1.1.10.2.1.1.3.0
          key: dev.version
          delay: 1d
          history: 7d
          trends: '0'
          value_type: CHAR
          tags:
            -
              tag: Application
              value: 常规
        -
          uuid: 635e552e732e41ffaa803f1a8757f5c0
          name: 空闲内存(KB/B)
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.35.1.1.1.8.1
          key: MemoryFree
          units: B
          description: 不同型号锐捷返回内存单位可能为B/KB,请根据具体情况对进程的倍率调整
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: ed93bc3565aa4b56b3a07828feea8c8e
          name: 内存大小(KB/B)
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.35.1.1.1.6.1
          key: MemorySize
          units: B
          description: 不同型号锐捷返回内存单位可能为B/KB,请根据具体情况对进程的倍率调整
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: 5a03424f10484a058cb8ddf3535027c0
          name: 内存使用率
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.35.1.1.1.3.1
          key: MemoryUsage
          units: '%'
          tags:
            -
              tag: Application
              value: 性能
        -
          uuid: d22fa0e0d02b4619957f25410854f9b5
          name: 已用内存(KB/B)
          type: SNMP_AGENT
          snmp_oid: .1.3.6.1.4.1.4881.1.1.10.2.35.1.1.1.7.1
          key: MemoryUsed
          units: B
          description: 不同型号锐捷返回内存单位可能为B/KB,请根据具体情况对进程的倍率调整
          tags:
            -
              tag: Application
              value: 性能
      discovery_rules:
        -
          uuid: 8dd330fed0fb4b6da2d3977aa18bd6f7
          name: 设备信息
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},enterprises.4881.1.1.10.2.1.1.25.1.1]'
          key: dev.info
          delay: 1h
          lifetime: 10d
          description: 索引号
          item_prototypes:
            -
              uuid: 3c6fdbdf0c7949a3b5a54335e28d4f97
              name: '设备 {#SNMPVALUE} 描述'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.25.1.2.{#SNMPINDEX}'
              key: 'dev.descr[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: 设备信息
            -
              uuid: b79ca4c03653448b8451ced5259b65d1
              name: '设备 {#SNMPVALUE} 固件版本'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.25.1.3.{#SNMPINDEX}'
              key: 'dev.firmware[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: 设备信息
            -
              uuid: 7032ad545a494d0999c7d96957528e09
              name: '设备 {#SNMPVALUE} 序列号'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.25.1.7.{#SNMPINDEX}'
              key: 'dev.serial[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: 设备信息
            -
              uuid: fc460bc7750849f8bd3618e84afee954
              name: '设备 {#SNMPVALUE}系统版本'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.25.1.5.{#SNMPINDEX}'
              key: 'dev.version[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: 设备信息
        -
          uuid: 149595da01db4a5a8fa64c0be30ed2c8
          name: 风扇
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},enterprises.4881.1.1.10.2.1.1.21.1.3]'
          key: fan
          delay: 1h
          lifetime: 10d
          item_prototypes:
            -
              uuid: 490b3576efee4bcea4d8ad7d37da7919
              name: '风扇{#SNMPVALUE} 状态'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.21.1.2.{#SNMPINDEX}'
              key: 'fan.status[FAN{#SNMPVALUE}]'
              delay: 60s
              history: 7d
              valuemap:
                name: '锐捷S6220 设备状态'
              tags:
                -
                  tag: Application
                  value: 风扇
              trigger_prototypes:
                -
                  uuid: 9d445c1b997f429aa207d7c9d0951c06
                  expression: 'last(/Template of Snmp RuiJie General/fan.status[FAN{#SNMPVALUE}])=1'
                  name: '设备 {HOST.NAME} 风扇 {#SNMPINDEX} 状态不正常'
                  priority: HIGH
                  description: |
                    4 - 正常
                    1 - 缺失
                  manual_close: 'YES'
        -
          uuid: 18f97fdf24d74c1d89ed59622329eadf
          name: 电源
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},enterprises.4881.1.1.10.2.1.1.18.1.3]'
          key: power
          delay: 1h
          lifetime: 10d
          item_prototypes:
            -
              uuid: 1497baabf4434998a385dbce6e93afda
              name: '电源 {#SNMPVALUE} 状态'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.18.1.2.{#SNMPINDEX}'
              key: 'power.status[{#SNMPVALUE}]'
              delay: 60s
              history: 7d
              valuemap:
                name: '锐捷S6220 设备状态'
              tags:
                -
                  tag: Application
                  value: 电源
              trigger_prototypes:
                -
                  uuid: 6c1aa6fe933942f78404740f9d9cd0fc
                  expression: 'last(/Template of Snmp RuiJie General/power.status[{#SNMPVALUE}])=1'
                  name: '设备 {HOST.NAME} 电源 {#SNMPINDEX} 状态不正常'
                  priority: HIGH
                  description: |
                    4 - 正常
                    1 - 缺失
                  manual_close: 'YES'
        -
          uuid: 99540e0902ec4f8cbf8a0e8080e68da0
          name: 风扇模块
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},enterprises.4881.1.1.10.2.1.1.42.1.1.1]'
          key: switch1.fan
          delay: 1h
          lifetime: 1d
          description: 模块名称
          item_prototypes:
            -
              uuid: 3b76d284ef7a464caa588c0771605895
              name: '风扇 {#SNMPINDEX} 序列号'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.42.1.9.1.{#SNMPINDEX}'
              key: 'switch1.fan.serial[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: '交换机1 风扇模块'
            -
              uuid: e4a657565f69494b959adfb1ecfdcd22
              name: '风扇 {#SNMPINDEX} 当前转速'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.43.1.5.1.{#SNMPINDEX}.1'
              key: 'switch1.fan.speed[{#SNMPINDEX}]'
              delay: 60s
              history: 7d
              tags:
                -
                  tag: Application
                  value: '交换机1 风扇模块'
            -
              uuid: e92c07f09df74be09df755e54a872ecb
              name: '风扇 {#SNMPINDEX} 状态'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.42.1.3.1.{#SNMPINDEX}'
              key: 'switch1.fan.status[{#SNMPINDEX}]'
              delay: 60s
              history: 7d
              valuemap:
                name: '锐捷S6220 设备状态'
              tags:
                -
                  tag: Application
                  value: '交换机1 风扇模块'
              trigger_prototypes:
                -
                  uuid: 60b6169cea874578ac5d08e85b800a53
                  expression: 'last(/Template of Snmp RuiJie General/switch1.fan.status[{#SNMPINDEX}])=1'
                  name: '设备 {HOST.NAME} 风扇 {#SNMPINDEX} 状态不正常'
                  priority: HIGH
                  description: |
                    4 - 正常
                    1 - 缺失
                  manual_close: 'YES'
            -
              uuid: 9833551865284d498a9e7ef35b43a582
              name: '风扇 {#SNMPINDEX} 转速上限'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.43.1.6.1.{#SNMPINDEX}.1'
              key: 'swith1.fan.upper[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              value_type: FLOAT
              tags:
                -
                  tag: Application
                  value: '交换机1 风扇模块'
            -
              uuid: 13fb8a5bc3f74663b6219911732b6a15
              name: '风扇 {#SNMPINDEX} 版本'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.42.1.8.1.{#SNMPINDEX}'
              key: 'swithc1.fan.version[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: '交换机1 风扇模块'
        -
          uuid: ebc3b1034caf4bc296ee7cf0c8e2148f
          name: 电源适配器模块
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},enterprises.4881.1.1.10.2.1.1.41.1.1.1]'
          key: switch1.module
          delay: 1h
          lifetime: 1d
          description: 模板名称
          item_prototypes:
            -
              uuid: abc04c479e12499187b08eda01d1a219
              name: '电源模块 {#SNMPVALUE} 额定电流'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.13.1.{#SNMPINDEX}'
              key: 'switch1.power.amp[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              units: A
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
            -
              uuid: 925a248f536642abb784ea7f05a294e4
              name: '电源模块 {#SNMPVALUE} 序列号'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.8.1.{#SNMPINDEX}'
              key: 'switch1.power.serial[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
            -
              uuid: c323de25d40b4deea20027d6c64ed455
              name: '电源模块 {#SNMPVALUE} 状态'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.3.1.{#SNMPINDEX}'
              key: 'switch1.power.status[{#SNMPINDEX}]'
              delay: 60s
              history: 7d
              valuemap:
                name: '锐捷S6220 设备状态'
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
              trigger_prototypes:
                -
                  uuid: 680873cd89e748c08ce74c397a3a2996
                  expression: 'last(/Template of Snmp RuiJie General/switch1.power.status[{#SNMPINDEX}])=1'
                  name: '设备 {HOST.NAME} 风扇 {#SNMPINDEX} 状态不正常'
                  priority: HIGH
                  manual_close: 'YES'
            -
              uuid: 00bf5f1b113a4583bb435184cadd5527
              name: '电源模块 {#SNMPVALUE} 额定功率'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.10.1.{#SNMPINDEX}'
              key: 'switch1.power.upper[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              units: W
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
            -
              uuid: 1c7dbc0b7b744cf094cb097158a7fc65
              name: '电源模块 {#SNMPVALUE} 当前功率'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.11.1.{#SNMPINDEX}'
              key: 'switch1.power.value[{#SNMPINDEX}]'
              delay: 60s
              history: 7d
              units: W
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
            -
              uuid: c32d85f4cedb4c9d95e41cebbb63a0fb
              name: '电源模块 {#SNMPVALUE} 版本'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.7.1.{#SNMPINDEX}'
              key: 'switch1.power.version[{#SNMPINDEX}]'
              delay: 1d
              history: 7d
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
            -
              uuid: 2421ccd9dfa9406ea400323513ecbef9
              name: '电源模块 {#SNMPVALUE} 当前电压'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.41.1.16.1.{#SNMPINDEX}'
              key: 'switch1.power.voltage[{#SNMPINDEX}]'
              delay: 60s
              history: 7d
              value_type: FLOAT
              units: V
              tags:
                -
                  tag: Application
                  value: '交换机1 电源模块'
        -
          uuid: 452526d75ef64bd6b057051ae1f315e0
          name: 其他模块
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},enterprises.4881.1.1.10.2.1.1.44.1.4.1.0]'
          key: switch1.other
          delay: 1h
          lifetime: 1d
          description: 模块名称
          item_prototypes:
            -
              uuid: 2c195795d44946a98c96446afe60beee
              name: '模块 {#SNMPVALUE} 温度上限值'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.44.1.7.1.0.{#SNMPINDEX}'
              key: 'switch1.temp.upper[{#SNMPVALUE}]'
              delay: 1d
              history: 7d
              units: ℃
              tags:
                -
                  tag: Application
                  value: '交换机1 其他模块'
            -
              uuid: 7d02885a606d42fb88da3ec2ca1cd2fe
              name: '模块 {#SNMPVALUE} 当前温度'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.44.1.6.1.0.{#SNMPINDEX}'
              key: 'switch1.temp.value[{#SNMPVALUE}]'
              delay: 60s
              history: 7d
              units: ℃
              tags:
                -
                  tag: Application
                  value: '交换机1 其他模块'
              trigger_prototypes:
                -
                  uuid: 3d1208a765c641749e80c97e160a1e66
                  expression: 'sum(/Template of Snmp RuiJie General/switch1.temp.value[{#SNMPVALUE}],300s)>80'
                  name: '设备 {HOST.NAME} 模块 {#SNMPVALUE} 温度持续5分钟大于80℃'
                  priority: HIGH
                  manual_close: 'YES'
            -
              uuid: 865318980c7d4fed9aa20a913b6b151b
              name: '模块 {#SNMPVALUE} 当前电压'
              type: SNMP_AGENT
              snmp_oid: 'enterprises.4881.1.1.10.2.1.1.44.1.5.1.0.{#SNMPINDEX}'
              key: 'switch1.voltage[{#SNMPVALUE}]'
              delay: 60s
              history: 7d
              units: V
              tags:
                -
                  tag: Application
                  value: '交换机1 其他模块'
      valuemaps:
        -
          uuid: 2851250bd54e4c98b0bda1c53c55fefa
          name: '锐捷S6220 设备状态'
          mappings:
            -
              value: '1'
              newvalue: 缺失
            -
              value: '4'
              newvalue: 正常

;