<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>I see. Unfortunately it looks like you can perform a discovery from an agent, but the discovery code for the manager is commented out in the sources. It doesn’t mean it’s impossible (at least I think in NETSim we had an Erlang manager that could connect to arbitrary agents), but I don’t know the details.</div><div><br></div><div>I’d suggest to turn on logging to see where do things go wrong and maybe to implement a custom user module for the agent, hopefully it will get enough data from the reply PDU to continue.</div><div><br></div><div>BR,</div><div>Daniel</div><div><div><br><div><div>On 2014 May 21, at 15:26 , Dominik Pawlak <<a href="mailto:dominik_pawlak@yahoo.co.uk">dominik_pawlak@yahoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt; position: static; z-index: auto;"><div style="" class=""><span id="misspell-0" class="">Actually</span> in that <span id="misspell-1" class="">example</span> user name and engineID are given in configuration files for both agent and manager. User name is 'simple_user' and engineID is 'agent's engine'. So there is no discovery there, the manager has engineID hard coded in his configuration. I am only developing the manager node, the agents are on third party devices.</div><div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">-- <br></div><div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">Cheers,</div><div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">Dominik<br><span style="" class=""></span></div><div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="" class=""><br style="" class=""></span></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue,
 Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 12pt;"> <div style="" class="" dir="ltr"> <font style="" class="" size="2" face="Arial"> On Wednesday, 21 May 2014, 9:40, Dániel Szoboszlay <<a href="mailto:dszoboszlay@gmail.com">dszoboszlay@gmail.com</a>> wrote:<br style="" class=""> </font> </div>  <br style="" class=""><br style="" class=""> <div style="" class=""><div style="" class="" id="yiv5857649634"><div style="" class=""><div style="" class="">Hi,</div><div style="" class=""><br style="" class="" clear="none"></div><div style="" class="">I think the agent will perform the discovery automatically, so you need to configure it with the actual security level and user name, password etc. that can be used to access the agent.</div><div style="" class=""><br style="" class="" clear="none"></div><div style="" class="">There’s a nice example here on how to set up and use a v3 agent + manager pair: <a style="" class="" rel="nofollow" shape="rect" target="_blank" href="http://erlangcentral.org/wiki/index.php?title=SNMP_Quick_Start#User_Based_Security_Model_.28USM.29">http://erlangcentral.org/wiki/index.php?title=SNMP_Quick_Start</a> The empty user name is not used anywhere explicitly, discovery happens behind the scenes.</div><div style="" class=""><br style="" class="" clear="none"></div><div style="" class="">Regards,</div><div style="" class="">Daniel</div><br style="" class="" clear="none"><div style="" class=""><div style="" class="" id="yiv5857649634yqt00199"><div style="" class="">On 2014 May 20, at 15:45 , Dominik Pawlak <<a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:dominik_pawlak@yahoo.co.uk" target="_blank" href="mailto:dominik_pawlak@yahoo.co.uk">dominik_pawlak@yahoo.co.uk</a>> wrote:</div><br style="" class="" clear="none"><blockquote style="" class="" type="cite"><div style="" class=""><div style="background-color:rgb(255, 255,
 255);font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:12pt;"><div class="" style="">I'm trying to find a way to perform a snmpEngineID discovery process
    as defined in RFC3414 chapter 4 in a manager.<br class="" style="" clear="none">
    <br class="" style="" clear="none">
    The process is pretty simple: you send a v3, usm Request message
    with security level: noAuthNoPriv, empty user name, endineID and
    varbinds. The agent then sends a report containing his engineID.<br class="" style="" clear="none">
    <br class="" style="" clear="none">
    I tried registering agent with empty or no security name defined,
    but when I try to send the Request message I get:<br class="" style="" clear="none">
    <tt class="" style="">snmpm:register_agent("u", "a",
[{engine_id,[]},{address,[x,x,x,x]},{version,v3},{sec_model,usm},{sec_name,""},{sec_level,noAuthNoPriv}]).</tt><font class="" style="" face="sans-serif"><tt class="" style=""><br class="" style="" clear="none">
      </tt></font><tt class="" style="">snmpm:sync_get("u", "a", "auth", [], 1000).<br class="" style="" clear="none">
      <br class="" style="" clear="none">
    </tt><tt class="" style="">{error,{send_failed,1440625960,unknownSecurityName}}</tt><tt class="" style="">
    </tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">=ERROR REPORT==== 20-May-2014::11:12:57 ===</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">[ snmp : manager : snmpm_mpd : <0.55.0> ] </tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">MPD: CONFIG ERROR: unknownSecurityName (message:
      {message,'version-3',</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                                                 
      {v3_hdr,996332938,484,</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                                                   [4],</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                                                  
      3,undefined,undefined},</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                                                 
      [48,24,4,0,4,4,97,117,116,</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                                                  
      104,160,14,2,4,85,222,53,</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                                                  
      40,2,1,0,2,1,0,48,0]})</tt><br class="" style="" clear="none">
    <br class="" style="" clear="none">
    I also tried registering a usm user with an empty (one space) name:<br class="" style="" clear="none">
    <tt class="" style="">snmpm:register_usm_user(" ", " ", [{sec_name, "initial"}]).</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">snmpm:register_agent("u", "a", [{engine_id, "
"},{address,[x,x,x,x]},{version,v3},{sec_model,usm},{sec_name,"initial"},{sec_level,noAuthNoPriv}]).</tt><br class="" style="" clear="none">
    <br class="" style="" clear="none">
    This time the message is sent, and the agent does respond with a
    message containing his engineID, but this information is not
    provided to the snmpm_user module:<br class="" style="" clear="none">
    <br class="" style="" clear="none">
    <tt class="" style="">=INFO REPORT==== 20-May-2014::12:21:45 ===</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">SNMPM default user callback received handle_error:</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">   ReqId:    -1</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">   Reason:   {failed_processing_message,</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">                 {securityError,usmStatsUnknownEngineIDs}}</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">   UserData: undefined</tt><tt class="" style=""><br class="" style="" clear="none">
    </tt><tt class="" style="">{error,{timeout,1440625963}}</tt><br class="" style="" clear="none">
    <br class="" style="" clear="none">
    What is the proper way of doing this?<br class="" style="" clear="none">
    </div><pre class="" style="">-- 
Cheers,
Dominik Pawlak</pre></div></div>_______________________________________________<br style="" class="" clear="none">erlang-questions mailing list<br style="" class="" clear="none"><a style="" class="" rel="nofollow" shape="rect" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br style="" class="" clear="none"><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br style="" class="" clear="none"></blockquote></div></div><br style="" class="" clear="none"></div></div><br style="" class=""><div style="" class="" id="yqt48629">_______________________________________________<br style="" class="" clear="none">erlang-questions mailing list<br style="" class="" clear="none"><a style="" class="" shape="rect" ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br style="" class="" clear="none"><a style="" class="" shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br style="" class="" clear="none"></div><br style="" class=""><br style="" class=""></div>  </div> </div>  </div> </div></blockquote></div><br></div></div></body></html>