Questions tagged [snmp-trap]

A trap is an SNMP message used by an Agent to notify its Manager that an event has occurred, either an error or a normal occurrence. Use this tag for SNMP related questions that concern Trap messages.

A trap is an SNMP message used by an Agent to notify its Manager that an event has occurred, either an error or a normal occurrence. Traps are often used by network management systems to detect faults or deviations in the monitored devices.

Traps are sent without expecting acknowledgement, in contrast to Inform messages. A Manager that receives an Inform message should send a reply to the Agent.

Like other SNMP messages, a trap may carry one or several Variable Bindings. The value and meaning of each variable binding is implementation specific.

A MIB document is usually available which describes both the Trap and the varbinds.

161 questions
7
votes
6 answers

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 software by sending SNMP traps to it in some…
Tom
  • 3,899
  • 22
  • 78
  • 137
7
votes
1 answer

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 someone explain me how to correctly use this command,…
Nicolas Frbezar
  • 497
  • 1
  • 5
  • 24
6
votes
1 answer

net-snmp sample code to parse MIB file and extract trap related information from it

I am using the net-snmp C library on Windows. I want to parse trap-related information from the MIB files. I need some sample code to do this. I didn't find anything useful on http://www.net-snmp.org/
Rahul
  • 1,401
  • 4
  • 17
  • 33
6
votes
5 answers

Send trap v2 in Java

How can I send snmpv2 traps from Java application. I tried to do example on snmp4j, but it didn't work.
EK.
  • 2,890
  • 9
  • 36
  • 49
5
votes
4 answers

Generate SNMP traps with PHP

I'm desperately searching for a way to generate SNMP traps from PHP. I know the build in methods to use snmpget but I was not able to figure out how to send SNMP traps. Does anybody know a class / code snippet for it? Searching the web did not bring…
glutorange
  • 993
  • 1
  • 10
  • 17
4
votes
2 answers

Custom SNMP Trap Implementation in .NET

I need to create a monitoring mechanism using SNMP (in .NET). I think we'll be using an nsoftware component to handle most of the work. It appears we must use 'traps' to communicate from the agent to the server. We'll have a number of different…
MattH
  • 1,975
  • 6
  • 24
  • 31
3
votes
2 answers

SNMP Trap, Required OIDs: sysuptime and id

I'm trying to understand the format of SNMP traps. I'm porting a piece of code from windows to linux that sends SNMP traps. The windows code uses a built in library ( some functions include SnmpStartup, SnmpSetRetransmitMode. Might be called WinSNMP…
Brian Schlenker
  • 4,966
  • 6
  • 31
  • 44
3
votes
1 answer

snmptrap SNMPv3 with selected client ip address

I would like to send trap and specify clientaddress As I search there is two ways: edit /etc/snmp/snmp.conf and set: clientaddr [IP_OF_DEVICE] specify IP as parameter: --clientAddr="[IP_OF_DEVICE]" When i try to issue command: snmptrap -v 3 -l…
smolarek999
  • 509
  • 1
  • 5
  • 21
3
votes
1 answer

Handle snmp traps and informs on localhost using node js

I am trying to listen for snmp traps on the standard UDP 162 port and then parse and output them. I have looked at snmpjs and snmp-native plugins for node and they both seem to major on the generation of agents. What I would like to do is listen…
2
votes
1 answer

How to configure engine ID to send SNMP trap V3 using SNMP4J?

I'm using snmp4j 2.8.4 and Java 1.8 It works when I use the command line to send traps.for example snmptrapd.conf authCommunity log,execute,net public createUser -e 0x8000000001020304 myuser MD5 mypassword DES mypassword1 authUser log,execute,net…
sun
  • 21
  • 1
2
votes
1 answer

How to send snmptrap with net-snmp in C?

I am developing an application for an embedded device. I want to send traps when some situation occurred. I found some examples but not really helped to me. There is a function called send_v2trap() in net-snmp. Can someone help me? Is there need to…
lazkopat
  • 21
  • 1
  • 3
2
votes
2 answers

SNMP TRAPS sending to other file, than /var/log/messages

I have configuration snmptrapd.conf like below: disableAuthorization yes authCommunity log,execute,net public I wanted to redirect all messages for other file, ex. /var/log/snmp.log, not for /var/log/messages. I tried also reconfigure rsyslog.conf…
Grzegorz
  • 33
  • 1
  • 4
2
votes
1 answer

Python SNMP Trap Receiver

I received an SNMP trap message in Python3, and I got a hexadecimal number. How do I convert it to a String so I can see it? Received…
강동인
  • 33
  • 1
  • 1
  • 7
2
votes
2 answers

How to excute script when receiving a SNMP trap?

I found the parameter traphandle in the snmptrapd.conf file. I found that I can set it like this traphandle default /usr/sbin/snmptt to ad the info of the trap to a log file in /var/log/snmptt directory, but I want to make my own bash script to be…
Adrián Juárez
  • 183
  • 5
  • 14
2
votes
1 answer

SNMP Traphandle not working

This is my first time working with SNMP, but after reading the SNMP pages I'm still having trouble getting a simple shell script to run when receiving a trap. My /etc/snmp/snmptrapd.conf file looks like this: # Example configuration file for…
user3507499
  • 65
  • 1
  • 9
1
2 3
10 11