<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Preformattato HTML Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Testo fumetto Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.PreformattatoHTMLCarattere
        {mso-style-name:"Preformattato HTML Carattere";
        mso-style-priority:99;
        mso-style-link:"Preformattato HTML";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.TestofumettoCarattere
        {mso-style-name:"Testo fumetto Carattere";
        mso-style-priority:99;
        mso-style-link:"Testo fumetto";
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
p.HTMLPreformatted, li.HTMLPreformatted, div.HTMLPreformatted
        {mso-style-name:"HTML Preformatted";
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.StileMessaggioDiPostaElettronica24
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.StileMessaggioDiPostaElettronica25
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.StileMessaggioDiPostaElettronica26
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
p.BalloonText, li.BalloonText, div.BalloonText
        {mso-style-name:"Balloon Text";
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.StileMessaggioDiPostaElettronica29
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:497112813;
        mso-list-type:hybrid;
        mso-list-template-ids:1719183348 68157457 68157465 68157467 68157455 68157465 68157467 68157455 68157465 68157467;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:1188525320;
        mso-list-type:hybrid;
        mso-list-template-ids:2098758504 68157457 68157465 68157467 68157455 68157465 68157467 68157455 68157465 68157467;}
@list l1:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2
        {mso-list-id:1534729447;
        mso-list-type:hybrid;
        mso-list-template-ids:1237612390 -1925010084 68157443 68157445 68157441 68157443 68157445 68157441 68157443 68157445;}
@list l2:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=IT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Yes, I supposed this could be the problem.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo5'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>I am sending trap from a client as:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>snmptrap -v 1 -c public <Nagios_IP>  1.2.3.4 <Client hostname as it is configured on Nagios> 3 0 ''<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo5'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>Snmptrapd on Nagios receive the trap:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>2012-09-12 11:08:23 <REAL CLIENT hostname fully qualified> [CLIENT IP] (via UDP: [CLIENT IP]:52203->[NAGIOS IP]) TRAP, SNMP v1, community public  iso.2.3.4 Link Up Trap (0) Uptime: 36 days, 19:43:55.96<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo5'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>A script like “submit_trap” pass it to Nagios<o:p></o:p></span></p><p class=MsoListParagraph><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo5'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>4)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>Nagios log file:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>[1347440926] Warning:  Passive check result was received for service 'TRAP_service' on host <REAL CLIENT HOSTNAME>, but the host could not be found!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>In my configuration is not a “simple” problem of uppercase/lowercase, but I need to pass exactly the hostnames I need … Before sending the trap or change them as soon as the trap arrived??<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Any idea?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Marco<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:windowtext;mso-fareast-language:IT'>Da:</span></b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:windowtext;mso-fareast-language:IT'> Hölzel, Arnold [mailto:arnold.holzel@kpn.com] <br><b>Inviato:</b> martedì 11 settembre 2012 17:35<br><b>A:</b> Nagios Users List<br><b>Oggetto:</b> Re: [Nagios-users] R: configure receiving snmp traps<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hello Marco,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>What is the case (uppercase or lowercase) of the system names in Nagios? I had the same problem and that was caused by the fact that all our systems in Nagios are in uppercase and snmptt sends them in lowercase to Nagios. Because Nagios is case sensitive there is a mismatch and you will not see anything in Nagios. I had to manually change something in the script to make everything uppercase (I did not wanted to reconfigure every host in Nagios). <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I am not able to look up and send the exact things I changed right now but if needed I can look it up tomorrow.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=NL style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D;mso-fareast-language:NL'>Met vriendelijke groet/with kind regards,</span></b><span lang=NL style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D;mso-fareast-language:NL'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D;mso-fareast-language:NL'>Arnold Hölzel</span><span lang=NL style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D;mso-fareast-language:NL'><o:p></o:p></span></p></div><p class=MsoNormal><span lang=NL style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:NL'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:NL'> Marco Borsani <a href="mailto:[mailto:m.borsani@it.net]">[mailto:m.borsani@it.net]</a> <br><b>Sent:</b> dinsdag 11 september 2012 17:01<br><b>To:</b> 'Nagios Users List'<br><b>Subject:</b> [Nagios-users] R: configure receiving snmp traps<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=NL><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Hi Mike<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Actually , I have :<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l2 level1 lfo2'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'> installed snmptt (in daemon mode)<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l2 level1 lfo2'><![if !supportLists]><span style='color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span style='color:#1F497D'>Configured a generic passive service in nagios<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l2 level1 lfo2'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>Run a snmptrap command from a client to test the configuration<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>What’s happen ?<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>The TRAP has be sent from the client (HOST B)<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>The TRAP has be received from Nagios server (HOST A)<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span lang=EN-GB style='color:#1F497D'><span style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span lang=EN-GB style='color:#1F497D'>Nothing arrived on Nagios <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>When I run manually submit_trap command,  Nagios show me the message on the web gui<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>I loose something between the TRAP received and Nagios service….what could be ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Moreover in the syslog a read many and messages like:  snmptt-sys[501]: Unable to delete trap file #snmptt-trap-1347373658632581 from spool dir<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Marco<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:windowtext;mso-fareast-language:IT'>Da:</span></b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:windowtext;mso-fareast-language:IT'> Mike Lindsey <a href="mailto:[mailto:mike-nagios@5dninja.net]">[mailto:mike-nagios@5dninja.net]</a> <br><b>Inviato:</b> venerdì 7 settembre 2012 22:41<br><b>A:</b> Nagios Users List<br><b>Oggetto:</b> Re: [Nagios-users] configure receiving snmp traps<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:IT'><br>You'll need to ensure that snmptrapd is enabled on your Nagios poller, and the typical route from there to get snmp traps submitted into Nagios is to install SNMPTT.<br><br></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:IT'><a href="http://snmptt.sourceforge.net/"><span lang=EN-GB>http://snmptt.sourceforge.net/</span></a></span><span lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:IT'><br><br>I recommend reading the docs for these, but, a very basic snmptrapd.conf would be:<br>###### snmptrapd.conf<br>snmpTrapdAddr </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:IT'><a href="udp:localhost,udp:YOUR_IP_HERE,tcp:YOUR_IP_HERE"><span lang=EN-GB>udp:localhost,udp:YOUR_IP_HERE,tcp:YOUR_IP_HERE</span></a></span><span lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:IT'><br><br>authCommunity log,execute public<br>logOption f/var/log/snmptrapd.log<br>traphandle default /usr/sbin/snmptt -i /usr/local/share/snmp/snmptt.ini<br>######<br><br>And then in the TrapFiles section of snmptt.ini you might have:<br>######<br>[TrapFiles]<br>snmptt_conf_files = <<END<br>/usr/local/share/snmp/snmptt/asyncos.conf<br>END<br>######<br><br>In the included config file you map trap oids to script executions, like so:<br>###### asyncos.conf<br># snmptt.conf file for AsyncOS traps.<br></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:IT'># <br># All of these are stateless so the handler script needs to set and clear the service.<br># The service entry must have 0 retries set and be volatile.<br># <br># .1.3.6.1.4.1.15497<br>#<br><br># powerSupplyStatusChange<br># Status: .1.3.6.1.4.1.15497.1.1.1.8.1.2<br>EVENT powerSupplyStatusChange .1.3.6.1.4.1.15497.1.1.2.0.2 "asyncos" Critical<br>FORMAT $N trap from $r<br>EXEC /usr/local/nagios/customplugins/submit_trap $r AsyncOS-Trap_Alert $s 0 "$N: $*"<br>#<br>#####<br><br>Your submit_trap script takes that, and hands it off to Nagios.  You can submit through NSCA, or you can create a result file in the checkresult directory, or you can submit through the external command pipe.<br><br>I do it through NSCA:<br>##### submit_trap<br>#!/usr/local/bin/bash<br><br>PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/nagios/customplugins:/usr/local/nagios/bin<br>CONFIG=/usr/local/nagios/etc/send_nsca.cfg<br>NSCA=`hostname`<br><br>HOST=$1<br>SERVICE=$2<br>STATUS=$3<br>STATEFUL=$4<br>MESSAGE=$5<br>case $STATUS in<br>"Critical")<br>    CODE=2<br>    ;;<br>"Warning")<br>    CODE=1<br>    ;;<br>"Normal")<br>    CODE=0<br>    ;;<br>*)<br>    CODE=3<br>    ;;<br>esac<br><br>printf "%s\t%s\t%s\t%s\n" "$HOST" "$SERVICE" $CODE "$MESSAGE" | send_nsca -H $NSCA -c $CONFIG<br>if [[ "$STATEFUL" == "0" ]] && [[ "$STATUS" != "0" ]]<br>then<br>    # Clear Nagios via delayed at now that the volatile ticket's gone through.<br>    echo "/usr/local/nagios/customplugins/clear.sh $HOST \"$SERVICE\" \"$MESSAGE\"" | at now + 15 minutes<br><br>fi<br>#####<br><br>...  and clear.sh for clearing stateless alerts.<br><br>#####<br>#!/usr/local/bin/bash<br><br>PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/nagios/bin:/usr/local/ironport/nagios/bin<br>HOST=$1<br>SVC=$2<br>OUT=$3<br><br>if [[ "$HOST" == "" ]] || [[ "$SVC" == "" ]]<br>then<br>    echo "Need host, service, optional message."<br>    exit 3<br>fi<br><br># Clear it<br>printf "%b" "$HOST\t$SVC\t0\tWas:$OUT\n" | send_nsca -H `hostname` -c /usr/local/nagios/etc/send_nsca.cfg<br><br>fi<br>#####<br><br>If you're using the auto-clear bits, your Nagios user will need to be able to add items to the at queue, you'll need to look at your distribution's documentation on how that's managed.  This is just one way of getting snmp traps working.  Unfortunately none of them that I know of overly straightforward.<br><br>Even if this doesn't work for you, it should give enough of an insight so that you've got a better idea on what to google for.  Good luck.<o:p></o:p></span></p><pre><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:IT'>-- <o:p></o:p></span></pre><pre><span style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:IT'>Mike Lindsey<o:p></o:p></span></pre></div></body></html>