自定义通用物联网网关的MIB结构的参考

文章目录

说明

参考代码

bash 复制代码
--
-- IOTGATEWAY-MIB.my
-- MIB generated by MG-SOFT Visual MIB Builder Version 6.0  Build 88
-- Tuesday, December 19, 2023 at 20:04:38
--

	IOTGATEWAY-MIB DEFINITIONS ::= BEGIN
 
		IMPORTS
			OBJECT-GROUP, NOTIFICATION-GROUP			
				FROM SNMPv2-CONF			
			enterprises, TimeTicks, IpAddress, Integer32, Gauge32, 
			Counter32, OBJECT-TYPE, MODULE-IDENTITY, OBJECT-IDENTITY, NOTIFICATION-TYPE			
				FROM SNMPv2-SMI;
	
	
		-- 1.3.6.1.4.1.99999.1.1
		iotGateway MODULE-IDENTITY 
			LAST-UPDATED "202312061422Z"		-- December 06, 2023 at 14:22 GMT
			ORGANIZATION 
				"yangzhou"
			CONTACT-INFO 
				"Contact Information"
			DESCRIPTION 
				"MIB for managing IoT Gateway devices."
			REVISION "202312061425Z"		-- December 06, 2023 at 14:25 GMT
			DESCRIPTION 
				"Initial version."
			::= { iotGatewayMIB 1 }

		
	
--
-- Node definitions
--
	
		-- 1.3.6.1.4.1.99999
		yangzhouzhang OBJECT IDENTIFIER ::= { enterprises 99999 }

		
		-- 1.3.6.1.4.1.99999.1
		iotGatewayMIB OBJECT IDENTIFIER ::= { yangzhouzhang 1 }

		
		-- 1.3.6.1.4.1.99999.1.3
		deviceInfoGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 3 }

		
		-- 1.3.6.1.4.1.99999.1.3.1
		deviceModel OBJECT-TYPE
			SYNTAX OCTET STRING
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The model identifier for the IoT Gateway."
			::= { deviceInfoGroup 1 }

		
		-- 1.3.6.1.4.1.99999.1.3.2
		deviceName OBJECT-TYPE
			SYNTAX OCTET STRING (SIZE (0..255))
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"Name of the gateway device"
			::= { deviceInfoGroup 2 }

		
		-- 1.3.6.1.4.1.99999.1.3.4
		serialNumber OBJECT-TYPE
			SYNTAX OCTET STRING
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The serial number of the IoT Gateway."
			::= { deviceInfoGroup 4 }

		
		-- 1.3.6.1.4.1.99999.1.3.5
		firmwareVersion OBJECT-TYPE
			SYNTAX OCTET STRING
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Description."
			::= { deviceInfoGroup 5 }

		
		-- 1.3.6.1.4.1.99999.1.3.6
		uptime OBJECT-TYPE
			SYNTAX TimeTicks
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"The time since the IoT Gateway last restarted."
			::= { deviceInfoGroup 6 }

		
		-- 1.3.6.1.4.1.99999.1.3.7
		devInfoGroup OBJECT-GROUP
			OBJECTS { deviceModel, deviceName, serialNumber, firmwareVersion, uptime
				 }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { deviceInfoGroup 7 }

		
		-- 1.3.6.1.4.1.99999.1.5
		networkConfigGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 5 }

		
		-- 1.3.6.1.4.1.99999.1.5.1
		ipAddress OBJECT-TYPE
			SYNTAX IpAddress
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"IP address of the gateway"
			::= { networkConfigGroup 1 }

		
		-- 1.3.6.1.4.1.99999.1.5.2
		subnetMask OBJECT-TYPE
			SYNTAX IpAddress
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"Subnet mask of the gateway"
			::= { networkConfigGroup 2 }

		
		-- 1.3.6.1.4.1.99999.1.5.3
		defaultGateway OBJECT-TYPE
			SYNTAX IpAddress
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"Default gateway IP address"
			::= { networkConfigGroup 3 }

		
		-- 1.3.6.1.4.1.99999.1.5.4
		dnsServers OBJECT-TYPE
			SYNTAX OCTET STRING (SIZE (0..255))
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"List of DNS server IP addresses"
			::= { networkConfigGroup 4 }

		
		-- 1.3.6.1.4.1.99999.1.5.5
		ntpServer OBJECT-TYPE
			SYNTAX IpAddress
			MAX-ACCESS read-write
			STATUS current
			DESCRIPTION
				"NTP server IP address"
			::= { networkConfigGroup 5 }

		
		-- 1.3.6.1.4.1.99999.1.5.6
		netConfigGroup OBJECT-GROUP
			OBJECTS { ipAddress, subnetMask, defaultGateway, dnsServers, ntpServer
				 }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { networkConfigGroup 6 }

		
		-- 1.3.6.1.4.1.99999.1.8
		devicePerformanceGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 8 }

		
		-- 1.3.6.1.4.1.99999.1.8.1
		dataThroughput OBJECT-TYPE
			SYNTAX Integer32
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Data throughput in bytes per second"
			::= { devicePerformanceGroup 1 }

		
		-- 1.3.6.1.4.1.99999.1.8.2
		packetLossRate OBJECT-TYPE
			SYNTAX Integer32 (0..100)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Packet loss rate in percentage"
			::= { devicePerformanceGroup 2 }

		
		-- 1.3.6.1.4.1.99999.1.8.3
		responseTime OBJECT-TYPE
			SYNTAX Integer32
			UNITS "milliseconds"
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Response time in milliseconds"
			::= { devicePerformanceGroup 3 }

		
		-- 1.3.6.1.4.1.99999.1.8.4
		deviceTemperature OBJECT-TYPE
			SYNTAX Integer32 (-50..100)
			UNITS "degrees Celsiu"
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Device temperature in degrees Celsius"
			::= { devicePerformanceGroup 4 }

		
		-- 1.3.6.1.4.1.99999.1.8.5
		devPerformanceGroup OBJECT-GROUP
			OBJECTS { dataThroughput, packetLossRate, responseTime, deviceTemperature }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { devicePerformanceGroup 5 }

		
		-- 1.3.6.1.4.1.99999.1.11
		eventsAndAlarmsGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 11 }

		
		-- 1.3.6.1.4.1.99999.1.11.2
		currentActiveAlarms OBJECT-TYPE
			SYNTAX Gauge32
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Number of current active alarms"
			::= { eventsAndAlarmsGroup 2 }

		
		-- 1.3.6.1.4.1.99999.1.11.3
		historicalAlarmsRecord OBJECT-TYPE
			SYNTAX OCTET STRING
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Historical alarms record"
			::= { eventsAndAlarmsGroup 3 }

		
		-- 1.3.6.1.4.1.99999.1.11.4
		eventLog OBJECT-TYPE
			SYNTAX OCTET STRING
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Event log"
			::= { eventsAndAlarmsGroup 4 }

		
		-- 1.3.6.1.4.1.99999.1.11.5
		evAndAlaGroup OBJECT-GROUP
			OBJECTS { eventLog, historicalAlarmsRecord, currentActiveAlarms }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { eventsAndAlarmsGroup 5 }

		
		-- 1.3.6.1.4.1.99999.1.12
		connectedDevicesGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 12 }

		
		-- 1.3.6.1.4.1.99999.1.12.1
		connectedDevicesTable OBJECT-TYPE
			SYNTAX SEQUENCE OF ConnectedDevicesEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
				"Table of connected devices information"
			::= { connectedDevicesGroup 1 }

		
		-- 1.3.6.1.4.1.99999.1.12.1.1
		connectedDevicesEntry OBJECT-TYPE
			SYNTAX ConnectedDevicesEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
				"Connected device entry"
			INDEX { deviceId }
			::= { connectedDevicesTable 1 }

		
		ConnectedDevicesEntry ::=
			SEQUENCE { 
				connectedDevicesCount
					Counter32,
				deviceId
					Integer32,
				deviceStatus
					OCTET STRING,
				networkStats
					OCTET STRING
			 }

		-- 1.3.6.1.4.1.99999.1.12.1.1.1
		connectedDevicesCount OBJECT-TYPE
			SYNTAX Counter32
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Description."
			::= { connectedDevicesEntry 1 }

		
		-- 1.3.6.1.4.1.99999.1.12.1.1.2
		deviceId OBJECT-TYPE
			SYNTAX Integer32 (1..25535)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Device ID"
			::= { connectedDevicesEntry 2 }

		
		-- 1.3.6.1.4.1.99999.1.12.1.1.3
		deviceStatus OBJECT-TYPE
			SYNTAX OCTET STRING (SIZE (0..255))
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Device status information"
			::= { connectedDevicesEntry 3 }

		
		-- 1.3.6.1.4.1.99999.1.12.1.1.4
		networkStats OBJECT-TYPE
			SYNTAX OCTET STRING
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Description."
			::= { connectedDevicesEntry 4 }

		
		-- 1.3.6.1.4.1.99999.1.12.2
		connDevicesGrouup OBJECT-GROUP
			OBJECTS { connectedDevicesCount, deviceId, deviceStatus, networkStats }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { connectedDevicesGroup 2 }

		
		-- 1.3.6.1.4.1.99999.1.13
		deviceStatusGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 13 }

		
		-- 1.3.6.1.4.1.99999.1.13.1
		deviceStatusTable OBJECT-TYPE
			SYNTAX SEQUENCE OF DeviceStatusEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
				"Table of device status information"
			::= { deviceStatusGroup 1 }

		
		-- 1.3.6.1.4.1.99999.1.13.1.1
		deviceStatusEntry OBJECT-TYPE
			SYNTAX DeviceStatusEntry
			MAX-ACCESS not-accessible
			STATUS current
			DESCRIPTION
				"Device status entry"
			INDEX { deviceStatusIndex }
			::= { deviceStatusTable 1 }

		
		DeviceStatusEntry ::=
			SEQUENCE { 
				deviceStatusIndex
					Integer32,
				cpuUtilization
					Integer32,
				memoryUtilization
					Integer32,
				storageUtilization
					Integer32,
				statusDescription
					OCTET STRING
			 }

		-- 1.3.6.1.4.1.99999.1.13.1.1.1
		deviceStatusIndex OBJECT-TYPE
			SYNTAX Integer32 (1..100)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Index for device status entry"
			::= { deviceStatusEntry 1 }

		
		-- 1.3.6.1.4.1.99999.1.13.1.1.2
		cpuUtilization OBJECT-TYPE
			SYNTAX Integer32 (0..100)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"CPU utilization percentage"
			::= { deviceStatusEntry 2 }

		
		-- 1.3.6.1.4.1.99999.1.13.1.1.3
		memoryUtilization OBJECT-TYPE
			SYNTAX Integer32 (0..100)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Memory utilization percentage"
			::= { deviceStatusEntry 3 }

		
		-- 1.3.6.1.4.1.99999.1.13.1.1.4
		storageUtilization OBJECT-TYPE
			SYNTAX Integer32 (0..100)
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Storage utilization percentage"
			::= { deviceStatusEntry 4 }

		
		-- 1.3.6.1.4.1.99999.1.13.1.1.6
		statusDescription OBJECT-TYPE
			SYNTAX OCTET STRING (SIZE (0..255))
			MAX-ACCESS read-only
			STATUS current
			DESCRIPTION
				"Description of the device status"
			::= { deviceStatusEntry 6 }

		
		-- 1.3.6.1.4.1.99999.1.13.2
		devStatusGroup OBJECT-GROUP
			OBJECTS { cpuUtilization, memoryUtilization, storageUtilization, statusDescription, deviceStatusIndex
				 }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { deviceStatusGroup 2 }

		
		-- 1.3.6.1.4.1.99999.1.14
		iotGatewayTrapGroup OBJECT IDENTIFIER ::= { iotGatewayMIB 14 }

		
		-- 1.3.6.1.4.1.99999.1.14.1
		iotGatewayTraps OBJECT-IDENTITY
			STATUS current
			DESCRIPTION 
				"Description."
			::= { iotGatewayTrapGroup 1 }

		
		-- 1.3.6.1.4.1.99999.1.14.1.1
		iotGatewayHighCpuUsage NOTIFICATION-TYPE
			OBJECTS { cpuUtilization }
			STATUS current
			DESCRIPTION 
				"This trap is sent when the CPU usage exceeds a predefined threshold."
			::= { iotGatewayTraps 1 }

		
		-- 1.3.6.1.4.1.99999.1.14.3
		iotTrapGroup NOTIFICATION-GROUP
			NOTIFICATIONS { iotGatewayHighCpuUsage }
			STATUS current
			DESCRIPTION 
				"Description."
			::= { iotGatewayTrapGroup 3 }

		
	
	END

--
-- IOTGATEWAY-MIB.my
--

开源项目地址

相关推荐
EterNity_TiMe_2 小时前
【论文复现】STM32设计的物联网智能鱼缸
stm32·单片机·嵌入式硬件·物联网·学习·性能优化
Amarantine、沐风倩✨3 小时前
研发工程师---物联网+AI方向
人工智能·物联网
7yewh6 小时前
嵌入式硬件杂谈(一)-推挽 开漏 高阻态 上拉电阻
驱动开发·stm32·嵌入式硬件·mcu·物联网·硬件架构·pcb工艺
7yewh15 小时前
嵌入式硬件电子电路设计(五)MOS管详解(NMOS、PMOS、三极管跟mos管的区别)
stm32·嵌入式硬件·mcu·物联网·硬件架构·硬件工程·pcb工艺
小刘同学-很乖17 小时前
MQTT从入门到精通之 MQTT 客户端编程
spring boot·stm32·物联网·iot
树莓集团1 天前
以数字产业园区规划为笔,绘智慧城市新篇章
大数据·人工智能·科技·物联网·智慧城市·媒体
极客小张1 天前
基于STM32的智能宠物自动喂食器设计思路:TCP\HTTP、Node.js技术
stm32·单片机·物联网·tcp/ip·node.js·毕业设计·宠物
AI服务老曹2 天前
建立更及时、更有效的安全生产优化提升策略的智慧油站开源了
大数据·人工智能·物联网·开源·音视频
明达技术2 天前
LVDS高速背板总线:打造分布式I/O高效数据传输新境界
分布式·物联网·自动化·lvds
BY-组态3 天前
组态软件基础知识
物联网·web组态·组态·scada·组态软件