Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

snmp_trap_api(3) [redhat man page]

SNMP_TRAP_API(3)						     Net-SNMP							  SNMP_TRAP_API(3)

NAME
send_easy_trap, send_trap_vars, send_v2trap - send TRAPs or INFORMs from a Net-SNMP MIB module SYNOPSIS
#include <net-snmp/agent/agent_trap.h> void send_easy_trap(int trap, int specific); void send_trap_vars(int trap, int specific, struct variable_list *vars); void send_v2trap(struct variable_list *vars); DESCRIPTION
These three routines may be used to send traps from a MIB module within the Net-SNMP agent (including an AgentX subagent). send_easy_trap() sends an SNMPv1 trap (or the SNMPv2 equivalent) to the list of configured trap destinations (or "sinks"), using the pro- vided values for the generic trap type, and specific trap value. send_trap_vars() is similar, but appends the supplied list of variable bindings to the traps that are sent. send_v2trap() uses the supplied list of variable bindings to form an SNMPv2 trap, which is sent to SNMPv2-capable sinks on the configured list. An equivalent INFORM is sent to the configuredq list of inform sinks. Sinks that can only handle SNMPv1 traps are skipped. WARNINGS
These routines are used to send the traps immediately they are called. Invoking them at the appropriate time is left to the MIB module programmer. SEE ALSO
snmpd.conf(5), snmptrapd(8) 4.2 Berkeley Distribution 7 Mar 2002 SNMP_TRAP_API(3)

Check Out this Related Man Page

SNMP_TRAP_API(3)						     Net-SNMP							  SNMP_TRAP_API(3)

NAME
send_easy_trap, send_trap_vars, send_v2trap - send TRAPs or INFORMs from a Net-SNMP MIB module SYNOPSIS
#include <net-snmp/agent/agent_trap.h> void send_easy_trap(int trap, int specific); void send_trap_vars(int trap, int specific, struct variable_list *vars); void send_v2trap(struct variable_list *vars); DESCRIPTION
These three routines may be used to send traps from a MIB module within the Net-SNMP agent (including an AgentX subagent). send_easy_trap() sends an SNMPv1 trap (or the SNMPv2 equivalent) to the list of configured trap destinations (or "sinks"), using the pro- vided values for the generic trap type, and specific trap value. send_trap_vars() is similar, but appends the supplied list of variable bindings to the traps that are sent. send_v2trap() uses the supplied list of variable bindings to form an SNMPv2 trap, which is sent to SNMPv2-capable sinks on the configured list. An equivalent INFORM is sent to the configuredq list of inform sinks. Sinks that can only handle SNMPv1 traps are skipped. The various "send_trap()" calls allow you to specify traps in different formats. And the various "trapsink" directives allow you to spec- ify destinations to receive different formats. But *all* traps are sent to *all* destinations, regardless of how they were specified. I.e. it's ___ trapsink / send_easy_trap ___ [ Trap ] ____ trap2sink ___ [ Generator ] send_v2trap / [ ] ----- informsink ____ trapsess *Not* send_easy_trap -------------------> trapsink send_v2trap -------------------> trap2sink ???? -------------------> informsink ???? -------------------> trapsess WARNINGS
These routines are used to send the traps immediately they are called. Invoking them at the appropriate time is left to the MIB module programmer. SEE ALSO
snmpd.conf(5), snmptrapd(8) 4.2 Berkeley Distribution 7 Mar 2002 SNMP_TRAP_API(3)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Sending SNMP Traps in AIX / Unix

Hi, Just wondering if anyone knows how can I send an SNMP Trap in Unix Environment(AIX) to another machine (NT/Ux) after having activated the SNMP in the AIX. Can this be done by using a single command line or do I have to write a script for it? Thanks in advance for your advices. :) (1 Reply)
Discussion started by: goliath
1 Replies

2. Filesystems, Disks and Memory

k_trap - kernel mode trap type 0x0000000E

HELP is urgently required, I run on SCO Unix 3 and this is the panic message that I get every time that I reboot 10U k_trap - kernel mode trap type 0x0000000E I have checked the swap already having the following results: #swap -l path dev swaplo blocks free... (3 Replies)
Discussion started by: alex_slb
3 Replies

3. Solaris

SNMP traps

Hello I am trying to check that SNMP traps could be sent from one server to other . I am running this command from receiving server to see it can receive it /usr/sbin/snoop udp port 162 and on the sending end I am running this commad cst051 UDP D=162 S=1480 LEN=120 but i am... (1 Reply)
Discussion started by: Ajwat
1 Replies

4. Solaris

Creating SNMP Strings To Trap ALOM Console Messages

Greetings To All! I am trying to accomplish the following: Using a public SNMP string, create a trap which will trap ALOM console messages on a Solaris Sunfire T-1000 ALOM console. The platform is Solaris 10. These newly created traps need to be configured in such a way that they will send... (0 Replies)
Discussion started by: RobSand
0 Replies

5. Solaris

List of SNMP Traps supported by Solaris 10

Hi, I want the list of SNMP traps supported by Solaris 10. DO anyone has the list prepared. Regards, Rajesh (1 Reply)
Discussion started by: grrajeish
1 Replies

6. Linux

linux snmp trap relay

(1 Reply)
Discussion started by: badoshi
1 Replies

7. Infrastructure Monitoring

SNMP Traps

Hi all, lately i managed to install SNMP agent on Solaris 9 & 10. The second objective is now to configure traps. However (since i'm totally new to the SUN world) i don't know a way of how to start. Can somebody help me with details? What is the first thing that you need to do to start trapping?... (3 Replies)
Discussion started by: Wizard_1979
3 Replies

8. Infrastructure Monitoring

Configuring SNMP in linux

I am trying to enabling SNMP access and trap forwarding for Linux(RHEL5) using following official url from IBM. http://publib.boulder.ibm.com/infocenter/eserver/v1r2/index.jsp?topic=/diricinfo/fqm0_t_enabling_snmp_access_and_trap_forwarding_for_linux.html In my system, snmp and snmplibs are... (1 Reply)
Discussion started by: SiddhV
1 Replies

9. UNIX for Dummies Questions & Answers

SNMP Traps

Hi, We are using Zyrion Traverse to monitor all the servers. I like to set the traps on all of the Linux servers to send the traps to that servers. So for on the /etc/snmp/snmp.conf file, this is what I have... ### SNMP Traps ### trap2sink x.x.x.x # Traverse server My... (4 Replies)
Discussion started by: samnyc
4 Replies

10. UNIX for Advanced & Expert Users

snmptrapd trap variable value truncated

I have configured snmptrapd to log the traps to log file. the traps received and logged ok based on the mib file definition. there is only one problem. the value of one of the variables seems to be truncated due to end of line or some special char. linux is centos 6.2 snmp software... (4 Replies)
Discussion started by: ahmad.zuhd
4 Replies

11. UNIX for Advanced & Expert Users

Snmp trap command for Solaris 5.10

I am using the following command to successfully send snmp traps on Linux but I cant get it to work on Solaris , can someone give me the syntax plz? Linux: /usr/sbin/snmptrap -v 2c -c org 10.100.10.211 \'\' 1.3.6.1.4.1.791.2.9.2 1.3.6.1.4.1.791.2.9.2 s \"$1 \" Solaris:... (5 Replies)
Discussion started by: aliyesami
5 Replies

12. UNIX for Advanced & Expert Users

Help - Infinite Loop: Error in trap function

Hi, I was working on implementing error handling in my bash scripts, and decided to use trap to send myself an email incase of any errors. But it seems that somethings has gone wrong, and I am continuously getting same emails for an old error repeatedly (even though I have stopped/killed all... (1 Reply)
Discussion started by: cool.aquarian
1 Replies

13. Solaris

Disable or remove SNMPv1/2c authentication and SNMP version-3

Hi; How can I disable or remove SNMPv1/2c authentication. I would like to use SNMP version 3 authentication. bash-3.00# uname -a SunOS SOL9229 5.10 Generic_142910-17 i86pc i386 i86pc bash-3.00# (1 Reply)
Discussion started by: gc_sw
1 Replies

14. Red Hat

Snmp [xx] Got trap from peer in Red Hat Linux

hi I get below error from console and message log in red hat linux snmp Got trap from peer on fd 13 . Any idea why there is error and how to fix it ?? Please use CODE tags as required by forum rules! (0 Replies)
Discussion started by: chuikingman
0 Replies