zabbix 锐捷交换机模板
时间: 2023-07-07 09:08:07 浏览: 812
zabbix_交换机模板
4星 · 用户满意度95%
要监控锐捷交换机,需要使用Zabbix的SNMP监控功能。以下是一个基本的锐捷交换机模板,可以在Zabbix中导入使用:
```
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export version="5.4" date="2022-06-01T10:00:00Z">
<templates>
<template name="Template_Ruijie_Switch" version="1.0">
<description>Template to monitor Ruijie switches using SNMP</description>
<groups>
<group name="Switches"/>
</groups>
<applications>
<application name="System Info"/>
<application name="Interface"/>
<application name="CPU & Memory"/>
<application name="Power"/>
</applications>
<items>
<!-- System Info -->
<item type="SNMPv2" key="system.sysName" name="Hostname" value_type="TEXT" delay="300s">
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.1.5.0</snmp_oid>
</item>
<item type="SNMPv2" key="system.sysLocation" name="Location" value_type="TEXT" delay="300s">
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.1.6.0</snmp_oid>
</item>
<!-- Interface -->
<item type="SNMPv2" key="ifDescr[{#SNMPINDEX}]" name="Interface Name: {#IFNAME}" value_type="TEXT" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.31.1.1.1.1.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="ifOperStatus[{#SNMPINDEX}]" name="Interface Status: {#IFNAME}" value_type="INTEGER" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}</snmp_oid>
<allowed_hosts>192.168.0.1,192.168.0.2</allowed_hosts>
</item>
<item type="SNMPv2" key="ifInOctets[{#SNMPINDEX}]" name="Interface Inbound Traffic: {#IFNAME}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="ifOutOctets[{#SNMPINDEX}]" name="Interface Outbound Traffic: {#IFNAME}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.2.2.1.16.{#SNMPINDEX}</snmp_oid>
</item>
<!-- CPU & Memory -->
<item type="SNMPv2" key="hrProcessorLoad[{#SNMPINDEX}]" name="CPU Load: {#CPUDESC}" value_type="FLOAT" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.3.3.1.2.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="hrStorageUsed[{#SNMPINDEX}]" name="Memory Used: {#MEMDESC}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.6.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="hrStorageSize[{#SNMPINDEX}]" name="Memory Total: {#MEMDESC}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.5.{#SNMPINDEX}</snmp_oid>
</item>
<!-- Power -->
<item type="SNMPv2" key="ruijiePowerStatus[{#SNMPINDEX}]" name="Power Status: {#PWRDESC}" value_type="INTEGER" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.4.1.4881.1.1.10.1.1.{#SNMPINDEX}</snmp_oid>
</item>
</items>
<discovery_rules>
<discovery_rule item_key="ifDescr" name="Interface Discovery" delay="300s">
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.31.1.1.1.1</snmp_oid>
<filter>
<macros>
<macro name="{#IFNAME}" value="^(Vlan|Loop|Null|MEth)\d+$"/>
</macros>
</filter>
<prototype>
<item type="SNMPv2" key="ifDescr[{#SNMPINDEX}]" name="Interface Name: {#IFNAME}" value_type="TEXT" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.31.1.1.1.1.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="ifOperStatus[{#SNMPINDEX}]" name="Interface Status: {#IFNAME}" value_type="INTEGER" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}</snmp_oid>
<allowed_hosts>192.168.0.1,192.168.0.2</allowed_hosts>
</item>
<item type="SNMPv2" key="ifInOctets[{#SNMPINDEX}]" name="Interface Inbound Traffic: {#IFNAME}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="ifOutOctets[{#SNMPINDEX}]" name="Interface Outbound Traffic: {#IFNAME}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.2.2.1.16.{#SNMPINDEX}</snmp_oid>
</item>
</prototype>
</discovery_rule>
<discovery_rule item_key="hrProcessorLoad" name="CPU Discovery" delay="300s">
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.3.3.1.2</snmp_oid>
<filter>
<macros>
<macro name="{#CPUDESC}" value="^CPU \d+$"/>
</macros>
</filter>
<prototype>
<item type="SNMPv2" key="hrProcessorLoad[{#SNMPINDEX}]" name="CPU Load: {#CPUDESC}" value_type="FLOAT" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.3.3.1.2.{#SNMPINDEX}</snmp_oid>
</item>
</prototype>
</discovery_rule>
<discovery_rule item_key="hrStorageUsed" name="Memory Discovery" delay="300s">
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.6</snmp_oid>
<filter>
<macros>
<macro name="{#MEMDESC}" value="^(\w+ )?Memory$"/>
</macros>
</filter>
<prototype>
<item type="SNMPv2" key="hrStorageUsed[{#SNMPINDEX}]" name="Memory Used: {#MEMDESC}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.6.{#SNMPINDEX}</snmp_oid>
</item>
<item type="SNMPv2" key="hrStorageSize[{#SNMPINDEX}]" name="Memory Total: {#MEMDESC}" value_type="UNSIGNED" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.2.1.25.2.3.1.5.{#SNMPINDEX}</snmp_oid>
</item>
</prototype>
</discovery_rule>
<discovery_rule item_key="ruijiePowerStatus" name="Power Supply Discovery" delay="300s">
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.4.1.4881.1.1.10.1.1</snmp_oid>
<filter>
<macros>
<macro name="{#PWRDESC}" value="^Power Supply \d+$"/>
</macros>
</filter>
<prototype>
<item type="SNMPv2" key="ruijiePowerStatus[{#SNMPINDEX}]" name="Power Status: {#PWRDESC}" value_type="INTEGER" delay="300s" >
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.4.1.4881.1.1.10.1.1.{#SNMPINDEX}</snmp_oid>
</item>
</prototype>
</discovery_rule>
</discovery_rules>
</template>
</templates>
</zabbix_export>
```
请注意,此模板中使用的SNMP OID(.1.3.6.1.2.1.xxx)可能需要根据您的设备进行调整。另外,如果您的锐捷交换机使用不同的SNMP社区字符串,请在模板中使用正确的字符串进行替换。
阅读全文