1.0.4 • Published 8 months ago

snmp-sysobjectid v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

SNMP sysObjectID

snmp-sysObjectID is a Node.js module that allows you to retrieve the device vendor, category, and model from a given SNMP sysObjectID. It also provides organization name for the given private enterprise number.

The Private Enterprise Number (PEN) is a unique identifier assigned to each enterprise by the Internet Assigned Numbers Authority (IANA). By using the PEN, you can determine the vendor of any SNMP-enabled device and the sources of NetFlow data generated by the device.

SNMP (Simple Network Management Protocol) sysObjectID is an object identifier (OID) that is used to identify the type of device or system being managed. The sysObjectID is part of the SNMP system group and is a unique identifier that is assigned by the vendor or manufacturer of the device or system. It provides valuable information for network management systems to identify and monitor network devices and their capabilities.

The OID (Object Identifier) to get sysObjectID is ".1.3.6.1.2.1.1.2". This is part of the SNMP MIB-II system group and is used to retrieve the OID of the device's sysObjectID. The value of sysObjectID uniquely identifies the type of device and the vendor that manufactured it.

npm downloads GitHub issues License

Installation

npm install snmp-sysobjectid --save

Usage

const { getOrg } = require('snmp-sysobjectid');

const org = getOrg(674);
console.log(org); // Output: Dell Inc.
import {getDeviceInfo} from 'snmp-sysobjectid';

const device = getDeviceInfo("1.3.6.1.4.1.11.2.14.11.7.1");
console.log(device.vendor); // Hewlett-Packard
console.log(device.category); // Router
console.log(device.model); // Hewlett-Packard ProCurve 7000

Functions

getDeviceInfo(oid: string, default_value?: string): SysInfo

This function retrieves the device vendor, category, and model from the given SNMP sysObjectID. If the device information is not available, it returns default value for each field.

  • oid (required) - The SNMP sysObjectID of the device.
  • default_value (optional) - The default value to be returned for category and model if the device information is not available.

Returns an object containing the vendor, category, and model of the device.

getOrg(Id: number | string): string

This function retrieves the name of the organization that owns the given enterprise number.

  • Id (required) - The enterprise number of the organization or the SNMP sysObjectID of the device. Returns the name of the organization as a string.

Data Source

Please note that collecting this information requires significant effort and is an ongoing process as new devices and vendors are introduced.

License

This project is licensed under the MIT License - see the LICENSE file for details.