Sponsored Content
Full Discussion: SNMP Trap on Solaris...HELP!
Special Forums UNIX and Linux Applications Infrastructure Monitoring SNMP Trap on Solaris...HELP! Post 302389830 by Wizard_1979 on Tuesday 26th of January 2010 04:25:02 AM
Old 01-26-2010
SNMP Trap on Solaris...HELP!

Hi all,

I am currently doing a project regarding traps and would like to help me in this issue. I am knew to the trap world SmilieSmilie and thought that by posting this thread helps me move forward in this project.

First of all I will begin exactly from the very beginning, i.e. the net-snmp installation for monitoring.

Before setting up traps, I started in installing the SNMP agent on the machines I wanted to monitor. The machines consisted mainly of Solaris 9 and 10 machines. The installation was performed successfully and I managed to be able to monitor these machines via the cacti software (http://www.cacti.net/).

The configuration file for this daemon is the snmpd.conf file (attached). For traps the configuration file snmptrapd.conf was modified as per attached.

Now from here the headache starts…

I was able to know that traps were being sent since I was generating them (example, bring up the size of a harddisk, as set in the snmpd.conf) and viewing the traps in a WireShark trace. For your perusal I have also attached a trace when a trap was sent, after the size of the harddisk exceeded the size sent in the configuration file.

What I would like to understand is the amount of OID shown in the trace (HDD full.txt)

This leads me to the problem I have at the moment, I need that the trap receiver machine senses the trap received and sends an email. In the attached file, snmptrapd.conf I did the traphandle command that it is suppose to handle the selected OID, but if I put the above OID (1.3.6.1.4.1.2021.9.101.1 – HDD size) the trap does not work. It only worked as per below:
Code:
traphandle DISMAN-EVENT-MIB::mteTriggerFired /usr/local/bin/traptoemail -s "SMTP Server" -f name@domain.com

Do you have any ideas of how I can set up these default traps to be able to be sent to the trap receiver machine?
Is there any other way to configure the trap receiver daemon (snmptrapd.conf).

I thank you in advance,

Matthew
 

10 More Discussions You Might Find Interesting

1. IP Networking

snmp trap generator

Hi, I am writing a program in java to simulate a trap being sent from a device. I came to know that rawsocket cant be opened in java. Is there a provision to do in java? My requirement is: I am writing the java program in the machine 1.1.1.1 I want to simulate the trap being sent from a... (0 Replies)
Discussion started by: kkrish7
0 Replies

2. 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

3. IP Networking

Send A Snmp Trap

Hi, do you know the syntax to send a snmp trap to a server ? Many htanks. (2 Replies)
Discussion started by: big123456
2 Replies

4. Shell Programming and Scripting

Cntl+z Trap is not detecting ??? Help required to add a trap detection ???

Hi folks, I have tried to add some trap detection in the below script....this script is used to monitor database activities...in a rather awkward way :rolleyes:.... The idea behind adding trap is that....this script creates lots of temporary files in the running folder to store the count... (1 Reply)
Discussion started by: frozensmilz
1 Replies

5. Infrastructure Monitoring

linux snmp trap relay

Hi all, I'm after a linux utility that can relay all incoming traffic on a certain port to another server. Can anyone recommend a good program? I've taken a look at snmptrapd, but it's not obvious how this can be configured for my requirements. Many thanks. (1 Reply)
Discussion started by: badoshi
1 Replies

6. Infrastructure Monitoring

Allow specific hosts for snmp trap

I want to receive snmp traps only from specifis ip's or host. I tried to get help from VACM , but it's complicated. Can any one please suggest me simple way to do it (0 Replies)
Discussion started by: nrbhole
0 Replies

7. Solaris

snmp trap for passwd file deltas in solaris

Hello I am trying to monitor when a user account gets added to my solaris server. Does anyone know how I can set up an snmptrap for changes in the /etc/passwd file ? (4 Replies)
Discussion started by: prince2010
4 Replies

8. UNIX for Dummies Questions & Answers

Need to transfer all kernel logs (var/log/messages) to the snmp listener as snmp trap

i am working with embedded system -Dell DCS management sub system. my question is as below: currently we are using linux kernel 2.6.30 build and we have a kernel logs stored to the /var/log/messages path. now we have to transfer all this logs to the specified SNMP target as a part of SNMP... (4 Replies)
Discussion started by: vipul_prajapati
4 Replies

9. 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

10. 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
NETSNMP_TRAP_API(3)						     Net-SNMP						       NETSNMP_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) V5.6.2.1 13 Aug 2010 NETSNMP_TRAP_API(3)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy