npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

snmp-sysobjectid

v1.0.4

Published

A 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.

Downloads

28

Readme

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

  • IANA OID Registry: https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
  • SNMP MIBs: https://www.oidview.com/mibs/0/SNMPv2-MIB.html
  • Cisco MIBs: https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/9108-15.html

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.