snmptrapd trap variable value truncated


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users snmptrapd trap variable value truncated
# 1  
Old 05-09-2012
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.

Code:
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:

Code:
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

Code:
##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

Code:
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

Code:
ASU EVENT: Alarm already raised For App ID  4 and Event ID  110 (Confusion message received for CIC




Code:
AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBulgarianCatalanChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDetect languageDutchEnglishEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishThaiTurkishUkrainianUrduVietnameseWelshYiddishAfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBulgarianCatalanChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishThaiTurkishUkrainianUrduVietnameseWelshYiddish[LEFT]Detect language » Arabic


Last edited by ahmad.zuhd; 05-09-2012 at 09:03 AM..
# 2  
Old 05-21-2012
#RESOLVED#
# 3  
Old 05-21-2012
And how? Many thanks for nothing.

It might be that the stony silence your first post was met with has to do with other people doing the same you do right now: having a solution for your problem but not bothering to share it with others.

Think about it - and i really do hope that helps.

bakunin
# 4  
Old 05-22-2012
there is no problem at all, i get the message already truncated. so i didn't post any comment.

Actually the issue occurs because i got the trap forwarded from another snmp trap agent. so, it was truncated there.
# 5  
Old 05-22-2012
Ahh - good to know. See, *this* is an explanation others might be able to make use of when they have the same or similar problem: check, if there isn't another snmp-agent which truncates the message already.

This makes all the difference between having the opportunity to learn something and wasting our collective time.

Thank you - this is meant in earnest.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Snmptrapd configuration on rhel 8

I need to configure snmptrap on rhel 8 server and send trap to nimsoft for file system , memory and cpu load and network diconnection status. please help me, if any one configured. (1 Reply)
Discussion started by: yash_message
1 Replies

2. Homework & Coursework Questions

VM trap may work differently than a pure install trap.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: That is the last reply I received from my instructor, and I'm looking for some alternatives. When using... (2 Replies)
Discussion started by: newuser45
2 Replies

3. UNIX for Advanced & Expert Users

logOption warning in snmptrapd.conf

Hi, trying to get snmp traps logged in /var/log/messages. I put this option in snmptrapd.conf: logOption Ls d then restarting the snmptrad daemon I got this warning: Unknown token: logoption. and server is not logging traps. Starting snmptrapd manually works, traps are logged.... (0 Replies)
Discussion started by: neutrino
0 Replies

4. Shell Programming and Scripting

trying to trap a variable

Hello, I need a hand please to do with trapping a variable. Basically I hold todays date in $lDate in form YYYYMMDD (e.g. 20120323) and I do: if test -f $impdata/DE${lDate}.ftp then DO STUFF! which works correctly. However the provider is now giving my an offset date (e.g.... (3 Replies)
Discussion started by: chas
3 Replies

5. UNIX for Advanced & Expert Users

snmptrapd

Hi everybody, I'm trying to run a SNMP supervisor on Debian Lenny to supervise Uninteruptible Power Systems which support SNMP. I've installed snmp and snmpd debian packages for NET-SNMP 5.4.1 et i've configured /etc/snmp file with the snmpconf perl script : file /etc/snmp/snmp.conf #... (0 Replies)
Discussion started by: dedibox
0 Replies

6. UNIX for Dummies Questions & Answers

snmptrapd uses all the CPU and 4 Go memory

Hello all, Below what I saw on my solaris 10 box : $ prstat PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 683 root 4082M 91M run 10 0 41:45:39 96% snmptrapd/1 syslog gives a lot of : snmptrapd: illegal data attempted to be added to table nlmLogVariableTable... (0 Replies)
Discussion started by: Gino_75
0 Replies

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

8. UNIX for Dummies Questions & Answers

snmptrapd.conf

i tried this to get snmptrapd.conf bt unable... # snmpconf The following installed configuration files were found: 1: /etc/snmp/snmp.conf 2: /etc/snmp/snmpd.conf 3: /usr/share/snmp/snmp.conf 4: /usr/share/snmp/snmpd.conf Would you like me to read them in? Their... (0 Replies)
Discussion started by: jeenat
0 Replies

9. UNIX for Dummies Questions & Answers

snmptrapd.conf

Hi All Can anybody tell me how to configure snmptrapd.conf ? Thanx (0 Replies)
Discussion started by: jeenat
0 Replies

10. Solaris

how to activate snmptrapd deamon in solaris machine

hi i am able to see the snmpd service running in my machine. i would like to get activate snmptrapd deamon services in my solaris box, could any one suggest me in getting activate the snmptrapd service (0 Replies)
Discussion started by: praveen.yenegal
0 Replies
Login or Register to Ask a Question