Questions tagged [net-snmp]

Common set of SNMP tools for *nix and Windows environments.

SNMP-NET

Widely used set of SNMP CLI tools, GUI and snmpd (for traps). Great docs and books written about this tool set. If you're walking down the SNMP road, this is the place to start!

616 questions
16
votes
1 answer

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 random from struct import pack, unpack from datetime…
uralbash
  • 2,267
  • 3
  • 21
  • 45
13
votes
4 answers

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 manager's MIB file. I am using the NET-SNMP…
pradipta
  • 1,672
  • 2
  • 13
  • 21
8
votes
1 answer

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 deciphering the purpose of the OBJECT-GROUP and where it…
gavenant
  • 393
  • 3
  • 21
8
votes
1 answer

Python 2 Bindings Net-SNMP Error - undefined symbol: netsnmp-memdup

I successfully compiled net-snmp-5.7.3 on Ubuntu. :D This is the specific version of Ubuntu: Linux loserBox 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux I seemed to have successfully installed the…
user_loser
  • 802
  • 1
  • 12
  • 25
7
votes
1 answer

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( netsnmp_create_handler_registration( "foo1", handle_foo1, oid, oid.size(),…
Stéphane
  • 17,613
  • 22
  • 82
  • 117
6
votes
1 answer

snmpget returns "No Such Object available on this agent at this OID"

I am trying to configure SNMP agent as per the below link. http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mib_module/ I have placed .c and .h file in the agent/mibgroup folder then ./configure…
Naseeb Panghal
  • 149
  • 1
  • 10
6
votes
1 answer

what is the correct snmptrap command format?

Which of the following is the correct format for snmptrap (net-snmp) command? snmptrap -v 2c -c public host "" NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification \ netSnmpExampleHeartbeatRate i 123456 or snmptrap -v 2c -c public host…
Kiran Mohan
  • 2,165
  • 5
  • 28
  • 52
5
votes
5 answers

add new mib master agent

I was following instructions on the net-snmp website to add my own MIB support to the master agent. Here is what I did: I created my support .c and .h file in net-snmp/agent/mibgroup/ folder. I copied my MIB file to /usr/local/share/snmp/mibs/…
user195678
  • 495
  • 3
  • 11
  • 26
5
votes
1 answer

snmpset Object not writable. Why?

I have been trying to understand how to create a MIB : here what I did so far : I created a MIB, and tried to allocate values to new OID => fail Here is the MIB : TEST-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-COMPLIANCE, OBJECT-GROUP FROM…
Ant
  • 1,714
  • 5
  • 21
  • 38
5
votes
2 answers

mib name printing from mib values in perl

This is the code that I used to walk through the table in net:snmp using perl: #! /usr/local/bin/perl use strict; use warnings; use Net::SNMP qw(:snmp); my $OID_hrSystem = '1.3.6.1.2.1.25.1'; my…
Cherry Chakri
  • 51
  • 1
  • 2
5
votes
2 answers

sendto: Operation not permitted: netsnmp

I get an error from the net-snmp library doing an snmp get that says Operation not permitted error from sendto. I am wondering what could make the sendto(2) system call fail with this error. Note, this is an intermittent error so I didn't think it…
Ivan Novick
  • 695
  • 2
  • 8
  • 11
5
votes
2 answers

Get OID's type (syntax) from MIB using Net-SNMP API

How can I get the syntax type and read/write access for an OID using NET-SNMP API? I am writing an SNMP tool that reads and sets values on a remote machine using SNMP protocol. Before setting the value, I need to check its type and access…
Ser
  • 51
  • 1
  • 2
5
votes
1 answer

How to pass variables for a script via SNMP by using snmpget?

I have one simple bash script calls test_snmp, let's say: #!/bin/bash echo $1 I have snmpd.conf set as following: rwcommunity public 127.0.0.1 extend .1.3.6.1.4.1.2021.53 /bin/bash /tmp/test_snmp What I'd like to do is to run a snmpwalk command,…
Severin Simko
  • 73
  • 2
  • 8
5
votes
0 answers

How can i check if session is created before i send snmp trap?

I am sending trap messages to specific host OID before I do that can I make sure if the session is created successfully so I can send trap messages. main.js var snmp = require("net-snmp"); var msg = require('./event.js'); var dns =…
hussain
  • 4,747
  • 12
  • 51
  • 120
5
votes
1 answer

How to add row in a MIB table with snmpset?

I changed recently my custom MIB file to include tables and not only scalars, it validates, I can create sub-agent etc. but if I try to read it, it says no entries: snmptable -v1 -c public hostname:10161 myMibName::myTable myMibName::myTable: No…
lzdt
  • 479
  • 1
  • 6
  • 15
1
2 3
41 42