Skip to content

Collect OID values from a series of SNMP-enabled servers in a flash!

License

Notifications You must be signed in to change notification settings

cityssm/snmp-oid-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNMP OID Collector

GitHub release (latest by date including pre-releases) DeepSource Code Climate maintainability codecov

The main purpose of this project is to quickly collect counters from printers at City facilities. It can however be used to poll other devices for other types of counters as well.

Getting Started

Download a release or clone this repository.

If not already installed, install Node.js version 16 or better.

Install the dependencies.

npm install

Create a config.js file like the one below. Note that descriptive server names can be included after the | character.

export const config = {
  ips: [
    '192.168.20.100',
    '192.168.21.100 | Legal Printer',
    '192.168.22.100 | Payroll Printer',
    '192.168.23.100 | HR Printer'
  ],
  communityString: 'public',
  oids: [
    '1.3.6.1.4.1.1602.1.11.1.3.1.4.101',
    '1.3.6.1.4.1.1602.1.11.1.3.1.4.108'
  ]
}
export default config

Run the application.

npm start

View the output on screen or in output.csv.

┌──────────────────────────────────┬───────────────┬───────────────────────────────┐
│              (index)             │ 101 : Total 1 │ 108 : Total (Black & White 1) │
├──────────────────────────────────┼───────────────┼───────────────────────────────┤
│ 192.168.20.100                   │               │                               │
│ 192.168.21.100 | Legal Printer   │     8468      │             7290              │
│ 192.168.22.100 | Payroll Printer │     34474     │             16620             │
│ 192.168.23.100 | HR Printer      │     10908     │             9144              │
└──────────────────────────────────┴───────────────┴───────────────────────────────┘