简介
适用于盛科使用CentecOS系列的交换机,如E580/E530/E680等。
1、自动扫描电源,并监测状态。
2、自动扫描风扇,并监测状态。
3、自动扫描温度传感器,并监测状态,自动匹配最高和最低温度告警,
4、监测CPU、内存等状态。
5、获取开机时间、序列号、交换机系统版本。
6、自动扫描光模块,并记录其收光状态。(无告警)
下载地址:https://songxwn.com/file/Centec_CentecOS_Hardware_by_SNMP2024.zip
zabbix_export:
version: '6.0'
templates:
- uuid: c339082388084346bef5abf6797868f9
template: 'Centec CentecOS Hardware by SNMP 2024'
name: 'Centec CentecOS Hardware by SNMP 2024'
description: |
适用于盛科使用CentecOS系列的交换机,如E580/E530/E680等。
1、自动扫描电源,并监测状态。
2、自动扫描风扇,并监测状态。
3、自动扫描温度传感器,并监测状态,自动匹配最高和最低温度告警,
4、监测CPU、内存等状态。
5、获取开机时间、序列号、交换机系统版本。
6、自动扫描光模块,并记录其收光状态。
来源: songxwn.com
groups:
- name: 'Templates/Network devices'
items:
- uuid: 3787d0f7c3d649098cbd804e464d0ea0
name: '交换机CPU 一分钟平均负载'
type: SNMP_AGENT
snmp_oid: 1.3.6.1.4.1.27975.1.9.2.0
key: system.cpu.five.minute.avgload
history: 7d
trends: 30d
value_type: FLOAT
units: '%'
description: 获取百分比字符串,去掉%,转换为浮点数
preprocessing:
- type: STR_REPLACE
parameters:
- '%'
- ''
triggers:
- uuid: 4900b1c71a2444c68858f9ffcee50af2
expression: 'last(/Centec CentecOS Hardware by SNMP 2024/system.cpu.five.minute.avgload)>85'
name: '交换机CPU 1分钟平均负载过高(大于85%)'
priority: HIGH
- uuid: b6324253042a475eaf79784018d034ea
name: 交换机开机时间
type: SNMP_AGENT
snmp_oid: 1.3.6.1.6.3.10.2.1.3.0
key: system.cpu.uptime.64
delay: 10m
history: 7d
trends: '0'
units: s
description: 注意:此为SNMP的启动时间,若SNMP进程重启,也会导致时间重置。
triggers:
- uuid: 0375de178c58439f97548bfec28321b7
expression: 'last(/Centec CentecOS Hardware by SNMP 2024/system.cpu.uptime.64)<=1500'
name: 交换机开机时间小于15分钟
event_name: 交换机开机时间小于15分钟
priority: DISASTER
manual_close: 'YES'
- uuid: a97b5b36d52d49d2853e1ee38a0618c1
name: 交换机内存总大小
type: SNMP_AGENT
snmp_oid: 1.3.6.1.4.1.27975.1.1.5.0
key: system.mem.all
delay: 15m
history: 7d
trends: 30d
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
- uuid: 8b10d8419cb24087a889bdf8d56be99b
name: 交换机内存占用
type: SNMP_AGENT
snmp_oid: 1.3.6.1.4.1.27975.1.1.12.0
key: system.mem.used
delay: 15m
history: 7d
trends: 30d
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
- uuid: fe32c67377aa47da95c4b3508cc851aa
name: 交换机内存占用比
type: CALCULATED
key: system.mem.useds
history: 5d
trends: '0'
value_type: FLOAT
units: '%'
params: '100*last(//system.mem.used)/last(//system.mem.all)'
triggers:
- uuid: f0a75a63b2e84fc187f5dd5ecc7c1d90
expression: 'last(/Centec CentecOS Hardware by SNMP 2024/system.mem.useds)>80'
name: 交换机内存占用过高(大于80%)
priority: HIGH
- uuid: 562bc47adc924656aabd173da2e007a8
name: 交换机序列号
type: SNMP_AGENT
snmp_oid: 1.3.6.1.2.1.47.1.1.1.1.11.1
key: system.sn11
delay: 24h
history: 7d
trends: '0'
value_type: CHAR
- uuid: 52bd0535083446b3aa9d6fba1c522fb3
name: 交换机版本
type: SNMP_AGENT
snmp_oid: 1.3.6.1.2.1.47.1.1.1.1.10.1
key: system.version1
delay: 1h
history: 7d
trends: '0'
value_type: CHAR
inventory_link: OS
triggers:
- uuid: eb8315afb5ec4b07a7cda00222d5b7b4
expression: 'change(/Centec CentecOS Hardware by SNMP 2024/system.version1)=1'
name: 交换机系统版本更改
priority: INFO
manual_close: 'YES'
discovery_rules:
- uuid: 17fbf06f17ca4935baec6888b361c2b9
name: 交换机风扇自动发现
type: SNMP_AGENT
snmp_oid: 'discovery[{#SNMPVALUE},.1.3.6.1.4.1.27975.37.1.1.1.1.3,{#FANGUID},.1.3.6.1.4.1.27975.37.1.1.1.1.2]'
key: devMFanStatusTable.discovery.fans
delay: 2h
item_prototypes:
- uuid: f63cb030f0384c57be73fdfaeca50c72
name: '{#FANGUID}-{#SNMPVALUE}: 风扇状态'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.4.1.27975.37.1.1.1.1.4.{#SNMPINDEX}'
key: 'sensor.fan.status[devMFanStatus.{#SNMPINDEX}]'
delay: 3m
history: 14d
trends: '0'
description: 'FanStatus :active (1), deactive (2) not installed (3) and unsupported (4).'
valuemap:
name: 'CentecOS-MIB::devMFanStatus'
tags:
- tag: component
value: fan
trigger_prototypes:
- uuid: df2dc6dc27e24c19b99775462baaf667
expression: 'last(/Centec CentecOS Hardware by SNMP 2024/sensor.fan.status[devMFanStatus.{#SNMPINDEX}])>1'
name: '{#FANGUID}-{#SNMPVALUE}: 风扇状态不正常'
opdata: 'Current state: {ITEM.LASTVALUE1}'
priority: AVERAGE
description: 请检查风扇模块
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
- uuid: 3ff3e90803144ee98f4711feec0b8395
name: 交换机电源自动发现
type: SNMP_AGENT
snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.27975.37.1.2.1.3]'
key: devMPowerStatusTable.discovery.psu
delay: 2h
description: 扫描电源模块
item_prototypes:
- uuid: d1a129e1a163466c89d68b2d8043b0aa
name: '{#SNMPINDEX}号电源状态'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.4.1.27975.37.1.2.1.3.{#SNMPINDEX}'
key: 'sensor.psu.status[devMPowerWorkStatus.{#SNMPINDEX}]'
delay: 3m
history: 7d
trends: '0'
description: 'Power status:active (1), deactive (2) not installed (3) and unsupported (4).'
valuemap:
name: 'CentecOS-MIB::devMFanStatus'
tags:
- tag: component
value: power
trigger_prototypes:
- uuid: 75a8392e60d14216b16c3bc3068e6f9f
expression: 'last(/Centec CentecOS Hardware by SNMP 2024/sensor.psu.status[devMPowerWorkStatus.{#SNMPINDEX}])>1'
name: '{#SNMPINDEX} 号电源状态不正常'
opdata: 'Current state: {ITEM.LASTVALUE1}'
priority: HIGH
description: 请检查电源是否有正常
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
- uuid: bb1f67f4c50342bfa8bff8160ef174ee
name: 交换机温度传感器自动发现
type: SNMP_AGENT
snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.27975.37.1.3.1.4,{#SENSOR_UPLM},1.3.6.1.4.1.27975.37.1.3.1.6,{#SENSOR_LOWLM},1.3.6.1.4.1.27975.37.1.3.1.7]'
key: devMSlotEnvironmentTable.discovery.temp
delay: 2h
filter:
conditions:
- macro: '{#SNMPVALUE}'
value: '[^0]+'
formulaid: A
description: devMSlotEnvironmentTable
item_prototypes:
- uuid: 7f0810b7fb4a46bfb325adf833e73224
name: '{#SNMPINDEX}号温度传感器'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.4.1.27975.37.1.3.1.4.{#SNMPINDEX}'
key: 'sensor.temp.value[devMSlotEnvironmentValue.{#SNMPINDEX}]'
delay: 3m
history: 7d
value_type: FLOAT
units: °C
description: 温度获取
tags:
- tag: component
value: temperature
trigger_prototypes:
- uuid: d604a35a75524a6e8aef18027632eb67
expression: 'avg(/Centec CentecOS Hardware by SNMP 2024/sensor.temp.value[devMSlotEnvironmentValue.{#SNMPINDEX}],3m)<{#SENSOR_LOWLM}'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: 'max(/Centec CentecOS Hardware by SNMP 2024/sensor.temp.value[devMSlotEnvironmentValue.{#SNMPINDEX}],3m)>{#SENSOR_LOWLM}'
name: '{#SNMPINDEX}号传感器温度过低'
event_name: '{#SNMPINDEX}号传感器温度过低: <{#SENSOR_LOWLM}'
opdata: 'Current value: {ITEM.LASTVALUE1}'
priority: HIGH
description: 此触发器使用温度传感器值以及温度传感器状态(如果可用)
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
- uuid: 9899a32a1cf6480998c6ebba6b4dce1c
expression: 'avg(/Centec CentecOS Hardware by SNMP 2024/sensor.temp.value[devMSlotEnvironmentValue.{#SNMPINDEX}],3m)>{#SENSOR_UPLM}'
recovery_mode: RECOVERY_EXPRESSION
recovery_expression: 'max(/Centec CentecOS Hardware by SNMP 2024/sensor.temp.value[devMSlotEnvironmentValue.{#SNMPINDEX}],3m)<{#SENSOR_UPLM}'
name: '{#SNMPINDEX}号传感器温度过高'
event_name: '{#SNMPINDEX}号传感器温度过高: >{#SENSOR_UPLM}'
opdata: 'Current value: {ITEM.LASTVALUE1}'
priority: HIGH
description: 此触发器使用温度传感器值以及温度传感器状态(如果可用)
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: performance
graph_prototypes:
- uuid: 9b079d8e7dfc4ac5b69de17dad270885
name: '{#SNMPINDEX}号温度传感器'
graph_items:
- color: 199C0D
calc_fnc: ALL
item:
host: 'Centec CentecOS Hardware by SNMP 2024'
key: 'sensor.temp.value[devMSlotEnvironmentValue.{#SNMPINDEX}]'
- uuid: 08cb4a7d8b74490f8ac47f8b1b723bf1
name: 交换机光模块收光自动发现
type: SNMP_AGENT
snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.27975.37.1.10.6.1.5]'
key: transReceivePowerTable.discovery.trans
delay: 2h
description: 扫描光模块
item_prototypes:
- uuid: bba92d6b757748a39d61b1d58698bc76
name: 'ETH-0-{#SNMPINDEX}接口光模块收光监测'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.4.1.27975.37.1.10.6.1.5.{#SNMPINDEX}'
key: 'receivepowerCurrent[transreStatus.{#SNMPINDEX}]'
delay: 10m
trends: '0'
value_type: TEXT
tags:
- tag: component
value: transinformation
tags:
- tag: class
value: network
- tag: target
value: centec
macros:
- macro: '{$CPU.UTIL.CRIT}'
value: '90'
- macro: '{$FAN_CRIT_STATUS}'
value: '6'
- macro: '{$HEALTH_CRIT_STATUS}'
value: '3'
- macro: '{$ICMP_LOSS_WARN}'
value: '20'
- macro: '{$ICMP_RESPONSE_TIME_WARN}'
value: '0.15'
- macro: '{$IF.ERRORS.WARN}'
value: '2'
- macro: '{$IF.UTIL.MAX}'
value: '90'
- macro: '{$IFCONTROL}'
value: '1'
- macro: '{$MEMORY.UTIL.MAX}'
value: '90'
- macro: '{$NET.IF.IFADMINSTATUS.MATCHES}'
value: '^.*'
description: 'Ignore notPresent(6)'
- macro: '{$NET.IF.IFADMINSTATUS.NOT_MATCHES}'
value: ^2$
description: 'Ignore down(2) administrative status'
- macro: '{$NET.IF.IFALIAS.MATCHES}'
value: '.*'
- macro: '{$NET.IF.IFALIAS.NOT_MATCHES}'
value: CHANGE_IF_NEEDED
- macro: '{$NET.IF.IFDESCR.MATCHES}'
value: '.*'
- macro: '{$NET.IF.IFDESCR.NOT_MATCHES}'
value: CHANGE_IF_NEEDED
- macro: '{$NET.IF.IFNAME.MATCHES}'
value: '^.*$'
- macro: '{$NET.IF.IFOPERSTATUS.MATCHES}'
value: '^.*$'
- macro: '{$NET.IF.IFOPERSTATUS.NOT_MATCHES}'
value: ^6$
description: 'Ignore notPresent(6)'
- macro: '{$NET.IF.IFTYPE.MATCHES}'
value: '.*'
- macro: '{$NET.IF.IFTYPE.NOT_MATCHES}'
value: CHANGE_IF_NEEDED
- macro: '{$PSU_CRIT_STATUS}'
value: '6'
- macro: '{$SNMP.TIMEOUT}'
value: 5m
- macro: '{$TEMP_CRIT}'
value: '60'
- macro: '{$TEMP_CRIT_LOW}'
value: '5'
- macro: '{$TEMP_WARN}'
value: '50'
valuemaps:
- uuid: c32d20e2c9fb4dfeb7251bc8d7d7cd75
name: 'CentecOS-MIB::devMFanStatus'
mappings:
- value: '1'
newvalue: active
- value: '2'
newvalue: deactive
- value: '3'
newvalue: 'not installed'
- value: '4'
newvalue: 'and unsupported'
- uuid: e47753d1820147e38b2882f87dfc57cd
name: 'Service state'
mappings:
- value: '0'
newvalue: Down
- value: '1'
newvalue: Up
- uuid: 1a1bcd54292446b69aa70233a40abf4e
name: zabbix.host.available
mappings:
- value: '0'
newvalue: 'not available'
- value: '1'
newvalue: available
- value: '2'
newvalue: unknown
graphs:
- uuid: f918b1a0313f4eb0aa923247d2ca9aa1
name: 交换机CPU一分钟平均负载
type: STACKED
ymin_type_1: FIXED
ymax_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'Centec CentecOS Hardware by SNMP 2024'
key: system.cpu.five.minute.avgload
- uuid: 8895b7837c514be4b1a341a4294abc94
name: 交换机内存占比
show_work_period: 'NO'
show_triggers: 'NO'
type: STACKED
ymax_type_1: FIXED
graph_items:
- color: 199C0D
item:
host: 'Centec CentecOS Hardware by SNMP 2024'
key: system.mem.useds
- uuid: 952d20e5e87345079f4676c019d1cd7e
name: 交换机开机时间
graph_items:
- color: 199C0D
calc_fnc: ALL
item:
host: 'Centec CentecOS Hardware by SNMP 2024'
key: system.cpu.uptime.64
PS:适用于Zabbix 6.0+