LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-09-2012, 06:32 AM   #1
ahmad.zuhd
LQ Newbie
 
Registered: Mar 2010
Posts: 9

Rep: Reputation: 0
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 versions:
net-snmp-5.5-27.el6.x86_64
net-snmp-libs-5.5-27.el6.x86_64
net-snmp-utils-5.5-27.el6.x86_64
net-snmp-perl-5.5-27.el6.x86_64


Trap definition from the MIB:

EVENT fredFault .1.3.6.1.4.1.1383.1008.0.50 "Status Events"
This trap is sent if a device is not reachable using IP ping
Variables:
1: alarmId
Syntax="OCTETSTR"
Descr="OMC unique alarm id"
2: deviceName
Syntax="OCTETSTR"
Descr="Name of device"
3: deviceType
Syntax="INTEGER"
Descr="Type of device such as WEB, VAD, etc."
4: severity
Syntax="INTEGER"
Descr="severity of trap"
5: timeStamp
Syntax="OCTETSTR"
Descr="time that the trap was sent. YYYYMMDDHHMMSS"
6: description
Syntax="OCTETSTR"
Descr="short description of trap."
7: text
Syntax="OCTETSTR"
Descr="full description of trap."




Below is the log from syslog file

##HOSTNAME## Hostname of the device sending the alarm
##IP## IP address of the device sending the alarm

May 6 03:13:12 nms snmptrapd[26523]: 2012-05-06 03:13:12 ##HOSTNAME## [##IP##] (via UDP: [##IP##]:45364->[10.102.4.10]) TRAP, SNMP v1, community public#012#011.1.3.6.1.4.1.1383.1008 Enterprise Specific Trap (50) Uptime: 205 days, 11:48:19.09#012#011.1.3.6.1.4.1.1383.1008.1.7.0 = STRING: "567349"#011.1.3.6.1.4.1.1383.1008.1.1.0 = STRING: "sgf.domain"#011.1.3.6.1.4.1.1383.1008.1.2.0 = STRING: "ASU"#011.1.3.6.1.4.1.1383.1008.1.3.0 = INTEGER: 4#011.1.3.6.1.4.1.1383.1008.1.4.0 = STRING: "20120426132231"#011.1.3.6.1.4.1.1383.1008.1.5.0 = STRING: "ASU EVENT: Alarm already raised For App ID 4 and Event ID 110 (Confusion message received for CIC:"#011.1.3.6.1.4.1.1383.1008.1.6.0 = STRING: "No Alarm is present in the Alarm Table for the given AlarmID - ID=5 SEVERITY=INFO STATUS=ALARM_ACTIVE No Alarm is present in the Alarm Table for the given AlarmID - ID=5 SEVERITY=INFO STATUS=ALARM_ACTIVE No Alarm is present in the Alarm Table for the given AlarmID - ID=5 SEVERITY=INFO STATUS=ALARM_"


Problem

the variable 6: description seems to be truncated, as follows:

- values that supposed to appear is

ASU EVENT: Alarm already raised For App ID 4 and Event ID 110 (Confusion message received for CIC: 29, DPC: 6-0-2)

- the value truncated and appeared at the log file

ASU EVENT: Alarm already raised For App ID 4 and Event ID 110 (Confusion message received for CIC
 
Old 05-09-2012, 08:56 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Read this carefully
Code:
6: description
Syntax="OCTETSTR"
Descr="short description of trap."
7: text
Syntax="OCTETSTR"
Descr="full description of trap."
(In other words, its supposed to be 'short'; use field 7 for 'full')
 
Old 05-10-2012, 12:57 AM   #3
ahmad.zuhd
LQ Newbie
 
Registered: Mar 2010
Posts: 9

Original Poster
Rep: Reputation: 0
forget to mention that the traps i'm recieving are forwarded from another server.

what i have posted the value that supposed to appear in the main server who is initially receiving the traps.

the truncated message appears at the server that the traps are forwarded to. and it seems that the truncation occurs at the forwarder server.
 
Old 05-22-2012, 12:59 AM   #4
ahmad.zuhd
LQ Newbie
 
Registered: Mar 2010
Posts: 9

Original Poster
Rep: Reputation: 0
#solved#
 
Old 05-22-2012, 07:06 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Please tell us how so that others may learn ...
 
Old 05-23-2012, 01:09 AM   #6
ahmad.zuhd
LQ Newbie
 
Registered: Mar 2010
Posts: 9

Original Poster
Rep: Reputation: 0
It is not accually solved, there is no issue at all since i get the message already truncated from the forwarding snmptrap server.

so there is no problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SNMPTRAPD to SYSLOG-NG Linux_Kidd Linux - Software 6 04-06-2012 01:17 PM
how to send snmp trap & recieve trap in C program minil Programming 3 07-10-2010 09:22 AM
snmptrapd.conf is gone?!?! lipos Linux - Networking 1 07-16-2008 04:39 AM
Nagios with snmptrapd nagiosnmp Linux - Networking 0 03-05-2008 09:18 AM
Kernel trap (Fatal trap 12) m!k@EL *BSD 4 09-05-2007 11:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration