Questions tagged [snmp]
Simple Network Management Protocol (SNMP) is an Internet-standard protocol for managing devices on IP networks and consists of operations for data retrieval, modification and notification. SNMP generally operates over UDP.
snmp
2,402
questions
53
votes
5
answers
103k
views
Why is SNMP usually run over UDP and not TCP/IP?
This morning, there were big problems at work because an SNMP trap didn't "go through" because SNMP is run over UDP. I remember from the networking class in college that UDP isn't guaranteed delivery ...
35
votes
4
answers
49k
views
Easy to use SNMP client library for c++? [closed]
What's an easy to use SNMP client library for c++?
20
votes
3
answers
3k
views
Basic questions about SNMP
I'm learning about SNMP, and writing some applications using it. I have some basic questions about the protocol:
Do the agents store its state on the device itself?
If there is a trap set on an ...
20
votes
2
answers
56k
views
What is the best open source SNMP monitoring tool? [closed]
I am currently working on software that must emit SNMP traps for SNMP versions 1 & 2 and possibly v3 in the future. I have downloaded several and found them to be either too complex or too ...
18
votes
2
answers
28k
views
Why is Math.floor() used instead of integer division in BER Codec
I am looking at the SNMPBEECodec which can be seen at this location
In particular I am looking at the function encodeLength()
A snippet I am interested in
int numBytes = 0;
int ...
17
votes
9
answers
35k
views
PHP SNMP - Cannot find module
I've enabled the SNMP module was trying to the functions in the module. I have set the MIBDIRS environment variable to where I have my mibs but I'm still getting these "Cannot find module" warnings:
...
17
votes
1
answer
95k
views
How to get data from SNMP with python?
How to get value mac and vlan from fdb table uses python?
In bash snmpwalk work fine:
snmpwalk -v2c -c pub 192.168.0.100 1.3.6.1.2.1.17.7.1.2.2.1.2
pysnmp:
import os, sys
import socket
import ...
17
votes
2
answers
12k
views
How can I write an SNMP agent or SNMP extension agent DLL in C#
I need to write an SNMP agent for my application.
I read the CodeProject article on how to write an SNMP extension agent DLL using win32, but would like to know if it is possible to do it with ...
17
votes
0
answers
44k
views
How to use SNMP with Java? [duplicate]
I'm writing an application that accesses a network printer. As a part of that application, I need to know the "status" of the printer. The only way the printer advertises its status is through SNMP. ...
16
votes
2
answers
45k
views
Definition of SNMP Gauge32 vs Counter32
Can someone point me to a good definition of Gauge32 vs Counter32? I understand that Counter32 can wrap, but Gauge32 can't.
I'm trying to understand their semantics. For example, I've heard you ...
16
votes
4
answers
74k
views
How to get OIDs from a MIB file?
I want to read all the objects from the MIB file that a manager has.
I developed one tool to get some data from a SNMP enabled agent. I want to enhance that tool by showing all the OIDs form the ...
16
votes
1
answer
15k
views
SNMP: ASN.1 MIB Definitions. Referencing a table within a table
Its's been a while since I've written ASN.1 so..
Our data model is comprised of several table definitions within a table. This is not workable in SNMP, so we need to flatten the definitions. The ...
16
votes
3
answers
33k
views
Getting started with SNMP4J
I need to make an agent in SNMP4J, but the documentation on how to get started is pretty poor. Does anyone have any experience with SNMP4J and could give me an idea on how to get started? Thanks.
16
votes
2
answers
8k
views
SNMP MIB SMIv2 Conformance Group Issue
I have a MIB that I started working on but smilint complains about a missing conformance group. How do I add this conformance group to my file?
BLEH-PRODUCT-MIB DEFINITIONS ::= BEGIN
-- Objects in ...
15
votes
4
answers
10k
views
What SNMP library for .NET makes traps, sets or gets simple? [closed]
What are the best SNMP libraries to use with .NET? Specifically for listening for traps or sending set or get requests.
14
votes
4
answers
51k
views
What does "No more variables left in this MIB View" mean (Linux)?
On Ubuntu 12.04 I am tring to get the subtree of management values with the following command:
snmpwalk -v 2c -c public localhost
with the last line of the output being
iso.3.6.1.2.1.25.1.7.0 = ...
12
votes
1
answer
16k
views
SNMP Library for Java
I need to make a feasibility study on various SNMP libraries. Currently I am using SNMP4J. My requirement is to compare various libraries with their features. I wasn't able to locate any useful ...
12
votes
3
answers
8k
views
Experimental/private branch for OID numbers in LDAP Schemas?
Attributes or object classes in LDAP schemas are identified through a unique number called OID. Moreover OIDs are also used in the SNMP protocol. Everyone can apply for an enterprise number by the ...
12
votes
2
answers
50k
views
SNMP v1,v2c and v3 trap difference
Explain the difference between v1, v2c and v3 Traps PDU/format.
11
votes
3
answers
19k
views
SNMP for Local printer?
I am searching for a way to Get Information from a local printer. Maybe with the SNMP Protocol?
The printer is connected with USB or PPI (parallel port). All printers have a internal TotalPagesCount ...
11
votes
2
answers
31k
views
Is there a good mib browser for linux? [closed]
I am looking for a good open source mib browser for linux. ireasoning has a limit on the number of mib files it can load in the free version.
I dont need it to do mib queries I just need to see the ...
10
votes
3
answers
11k
views
What is a good way to show a floating point number via SNMP?
I am coding an SNMP Agent. I need to send values that have a decimal point to an SNMP Manager.
I have a couple options:
Truncate the number.
Multiply by a constant.
Ask Stackoverflow.
If I ...
10
votes
2
answers
44k
views
Reason: (noSuchName) There is no such variable name in this MIB
I am using centos Operating System.
i am trying to get the memory statistics of localhost through snmpget command, i am getting this error.
snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.4.6
...
10
votes
1
answer
14k
views
How to measure a Website Bandwidth (Upload+Download) in MB using C#/VB.Net programmatically?
Hope that everybody is fine here.
I am writing a windows service in C#/VB.Net that aims at measuring bandwidth consumption for all WebSites on localhost and store their statistics for upload , ...
10
votes
3
answers
5k
views
How can i get a printer's make and model in Java?
I'm actually working on a Java application that shares printers to a server, and I need this application to get the make and model of the printers it shares.
I know this question has been asked three ...
10
votes
0
answers
2k
views
UDP port forwarding not working with Docker on Windows 10
I am running a Docker container for snmptrapd.
It runs fine on a Linux host (Ubuntu 18.04), but not on Windows (10 Pro).
Dockerfile:
FROM alpine:3.8
RUN apk --no-cache add net-snmp
COPY mibs/ /usr/...
9
votes
3
answers
7k
views
SNMP: OID to use when writing custom MIBs
If you are writing your own MIB for a bespoke application, is there a 'best practice' for which branch you should use. I'm thinking of something analogous to private IP addresses, that can be used ...
9
votes
6
answers
3k
views
Introduction to SNMP monitoring [closed]
I've been tasked with writing a monitoring program for my company's server software that integrates with zenoss via snmp.
To be brief, I can't get anything up off the ground. I think my first goal ...
9
votes
2
answers
11k
views
Test URLs for SNMP Agents
I am trying to find a list of URLs for SNMP agents which I could make use of for testing purposes.
Up till now I have made use of the NET-SNMP test url - > test.net-snmp.org. I've also made use of ...
9
votes
1
answer
4k
views
SNMP purpose of OBJECT-GROUP, MODULE-COMPLIANCE with regards to OBJECT-TYPES
I am implementing my own MIB and also use smilint to check to validate the MIB. I am getting a lot of node xxx must be contained in at least one conformance group warnings.
I am having trouble ...
9
votes
5
answers
8k
views
SNMP MIB development tool [closed]
Does anybody know a good tool to assist in the development of an SNMP MIB with correct formatting and syntax?
If possible, it should be free and run under Linux.
8
votes
3
answers
24k
views
Convert snmp octet string to human readable date format
Using the pysnmp framework i get some values doing a snmp walk. Unfortunately for the oid
1.3.6.1.21.69.1.5.8.1.2 (DOCS-CABLE-DEVICE-MIB)
i get a weird result which i cant correctly print here ...
8
votes
1
answer
19k
views
Looking for example code to implement a SNMP table using AgentX
I've written an AgentX app (Linux, gcc, g++) which works well at sending back scalers. Here is what I'm doing now:
init_agent( "blah" );
netsnmp_register_read_only_scalar( ...
8
votes
2
answers
6k
views
Delphi: Get MAC of Router
I am using Delphi and I want to determinate the physical MAC address of a network device in my network, in this case the Router itself.
My code:
var
idsnmp: tidsnmp;
val:string;
begin
idsnmp :=...
8
votes
2
answers
16k
views
SNMP OUTPUT OPTIONS - How do I get the OID response value only?
I have to go through and collect a few OIDs from some SNMP enabled network printers with a BASH script I have been working on.
My Request:
snmpget -v2c -c public 192.168.0.77
.1.3.6.1.2.1.1.1
.1.3....
8
votes
9
answers
11k
views
Managing Cisco programmatically; Telnet vs SNMP? [closed]
I was recently approached by a network-engineer, co-worker who would like to offload his minor network admin duties to a junior-level helpdesk tech. The specific location in need of management acts ...
8
votes
5
answers
59k
views
How to get MAC or IP Addresses of devices connected to a switch using SNMP?
Using SNMP, how do I get the MAC address of the device connected to each port on the switch? We're using HP ProCurve Switches.
I tried using the OID dot1dTpFdbPort but that seems to be giving me the ...
8
votes
3
answers
5k
views
Make a PHP site send SNMP information to a network management app
I'm trying to make a PHP website send information through SNMP. I've been reading allot about SNMP, but I'm still a bit clueless about where to start.
I believe I need to create an MIB with all the ...
8
votes
1
answer
2k
views
net-snmp perl subagent not being triggered by snmpget
I've been working on a custom SNMP Mib and I've come up against a wall while trying to get an agent to return the proper data.
MIB (validated by running smilint -l 6):
IDB-MIB DEFINITIONS ::= BEGIN
...
8
votes
1
answer
2k
views
Using Perl to get list of IP addresses from Cisco Call Manager
I need to retrieve a list of IP addresses of phones from Cisco Unified Call Manager, and I'd like to be able to do it using Perl and standard modules as much as possible.
I can get the addresses ...
7
votes
7
answers
23k
views
Free SNMP simulator tools? [closed]
Lately I have gotten into SNMP agent development and have been using the 30 day free trial of ireasoning's snmpd simulator. The tool has proven immensely handy, it can act as an snmpd service ...
7
votes
7
answers
40k
views
What is a SNMP ping?
I know what SNMP is and I know what ping is. What is meant by a 'SNMP ping'? SNMP can be used to see if devices on a network are still alive.. what does it use to do this? I wouldn't have thought ...
7
votes
1
answer
47k
views
Send a notification trap SNMP with snmptrap command Linux
For test purpose, i'm trying to use the snmptrap command to produce a .1.3.6.1.2.1.43.18.2.0.1 trap (printer alert trap).
I'm not in my two feet with the syntax of the snmptrap command, so can ...
7
votes
4
answers
3k
views
Network auto-discovery using SNMP and .NET
Are there any libraries, (third party is fine) that can help do network auto-discovery using SNMP and .NET?
If not, have you ever rolled your own?
7
votes
3
answers
8k
views
How can I parse a raw SNMP trap in Perl?
A few weeks ago I wrote an SNMP relayer for our ops group. They have some dumb devices that can only send traps to a single IP, and we have a monitoring system that listens on multiple IPs for ...
7
votes
2
answers
34k
views
Figure out memory usage using SNMP on Windows
Currently i use the following to figure it out:
For total memory:
.1.3.6.1.2.1.25.2.2.0
For used memory i walk the following oid (gives me usage of each process):
.1.3.6.1.2.1.25.5.1.1.2
and ...
7
votes
2
answers
13k
views
SNMP: Create custom OID
I need custom OIDs for monitoring some of my software states.
But I just can't understand: how can I create custom OID (like .1.3.6.1.4.1.30891.100.103) in Windows XP system?
I need few of them to ...
7
votes
6
answers
12k
views
Define MIB and send SNMP trap under .net
I have developed a special application for a company under .net in C# and it is used for years. Now it is developed on, one of the main new features I have to implement is to integrate it with another ...
7
votes
2
answers
16k
views
Toner levels using SNMP
I'm trying to get the toner levels from a Brother MCF-9465CDN using SNMP, in order to ultimately plot them in a graph using Munin. I'm not getting ink levels though.
Although I'm a bit new to SNMP, I ...
7
votes
1
answer
8k
views
sysuptime in snmp
I am trying to send trap messages via SNMP.
The examples on the net mention the setting of 'sysUpTime' value, but they lack in explanations. Which is the role of sysUpTime in this context?
Thank you!...