Page MenuHomeVyOS Platform

Add ability to get hardware manufacturer and serial number via SNMP
Open, WishlistPublicFEATURE REQUEST

Description

Summary

Add the ability to get hardware/manufacturer and serial number via SNMP

Use case

Get specific vendor statistics via SNMP

It could be part of the https://github.com/vyos/vyos-1x/blob/current/data/templates/snmp/etc.snmpd.conf.j2 or/and vendor specific MIBs

required info we can get from:

sudo dmidecode -s system-manufacturer
sudo dmidecode -s system-product-name
sudo dmidecode -s system-serial-number

Or customer MIB/Vendor file, for example:

MY-HARDWARE-MIB DEFINITIONS ::= BEGIN

IMPORTS
    OBJECT-TYPE
        FROM SNMPv2-SMI;

myHardwareMIB MODULE-IDENTITY
    LAST-UPDATED "202501210000Z"
    ORGANIZATION "My Organization"
    CONTACT-INFO "email@example.com"
    DESCRIPTION "Custom MIB for hardware information"
    ::= { enterprises 99999 }

manufacturer OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Hardware Manufacturer"
    ::= { myHardwareMIB 1 }

hardware OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Hardware Model"
    ::= { myHardwareMIB 2 }

serial OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Hardware Serial Number"
    ::= { myHardwareMIB 3 }

END

Example snmpd conf

pass .1.3.6.1.4.1.99999 /usr/local/bin/hardware_info.sh

And get the data:

snmpget -v2c -c public localhost MY-HARDWARE-MIB::manufacturer

One or another way.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)
Story points
5

Event Timeline

Viacheslav triaged this task as Wishlist priority.