This is a discussion on Running agent without snmpd.conf within the SNMP Users forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --===============0781506618== Content-class: urn:content-classes:message Content-Type: multipart/alternative; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--===============0781506618== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C84EFE.3BC6D83F" This is a multi-part message in MIME format. ------_=_NextPart_001_01C84EFE.3BC6D83F Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I have added some new MIBs to the agent and it is working fine, but I have some issues in using the conf file. I want to give users of my application, the flexibility to configure the agent listen port and "rwcommunity". We are already using an XML file with all the configurable items for our application and I want the users to just change one XML and not touch the snmpd.conf.=20 =20 I noticed that we can configure the agent not to use the conf file using the NETSNMP_DS_LIB_DISABLE_CONFIG_LOAD option. But I don't know how to set the community string.=20 I was hoping there will be some netsnmp_ds_set_string() methods to support this. But I did not find any. =20 So effectively my algorithm in my agent startup code will be 1) Configure the agent not to use conf file netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DISABLE_CONFIG_LOAD, 1); =20 2) Get the agent listen port from XML and configure the agent to use it. netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_PORTS, AGENT_LISTEN_PORT); =20 3) Get the community string from the XML file and configure the agent to use it. I AM NOT sure what function I have to call for this. =20 Appreciate any help here! =20 Thanks Sathish =20 ------_=_NextPart_001_01C84EFE.3BC6D83F Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <meta name=3DGenerator content=3D"Microsoft Word 11 (filtered)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 {font-family:Arial; color:windowtext;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} /* List Definitions */ ol {margin-bottom:0in;} ul {margin-bottom:0in;} --> </style> </head> <body lang=3DEN-US link=3Dblue vlink=3Dpurple> <div class=3DSection1> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Hi,</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I have added some new MIBs to the agent and it is = working fine, but I have some issues in using the conf file. I want to give = users of my application, the flexibility to configure the agent listen port and = “rwcommunity”. We are already using an XML file with all the configurable items for our = application and I want the users to just change one XML and not touch the = snmpd.conf. </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I noticed that we can configure the agent not to use = the conf file using the </span></font><font size=3D2 face=3D"Courier = New"><span style=3D'font-size:10.0pt;font-family:"Courier = New"'>NETSNMP_DS_LIB_DISABLE_CONFIG_LOAD</span></font><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt;font-family:Arial'> option. But I don’t know how to set the community string. </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I was hoping there will be some = netsnmp_ds_set_string() methods to support this. But I did not find any.</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>So effectively my algorithm in my agent startup code = will be</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.5in;text-indent:-.25in'><font = size=3D2 face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>1)<font = size=3D1 face=3D"Times New Roman"><span style=3D'font:7.0pt "Times New = Roman"'> </span></font></span></font><font size=3D2 face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial'>Configure the agent not to use conf = file</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.75in'><font size=3D2 = face=3D"Courier New"><span style=3D'font-size:10.0pt;font-family:"Courier = New"'>netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID , NETSNMP_DS_LIB_DISABLE_CONFIG_LOAD, 1);</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.75in'><font size=3D2 = face=3D"Courier New"><span style=3D'font-size:10.0pt;font-family:"Courier = New"'> </span></font></p> <p class=3DMsoNormal style=3D'margin-left:.5in;text-indent:-.25in'><font = size=3D2 face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>2)<font = size=3D1 face=3D"Times New Roman"><span style=3D'font:7.0pt "Times New = Roman"'> </span></font></span></font><font size=3D2 face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial'>Get the agent listen port from XML and = configure the agent to use it.</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.75in'><font size=3D2 = face=3D"Courier New"><span style=3D'font-size:10.0pt;font-family:"Courier = New"'>netsnmp_ds_set_string(NETSNMP_DS_APPLICATION _ID, NETSNMP_DS_AGENT_PORTS, AGENT_LISTEN_PORT);</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.75in'><font size=3D2 = face=3D"Courier New"><span style=3D'font-size:10.0pt;font-family:"Courier = New"'> </span></font></p> <p class=3DMsoNormal style=3D'margin-left:.5in;text-indent:-.25in'><font = size=3D2 face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>3)<font = size=3D1 face=3D"Times New Roman"><span style=3D'font:7.0pt "Times New = Roman"'> </span></font></span></font><font size=3D2 face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial'>Get the community string from the XML file and = configure the agent to use it.</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.75in'><font size=3D2 = face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>I AM NOT sure what function = I have to call for this.</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.75in'><font size=3D2 = face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Appreciate any help here!</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Thanks</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Sathish</span></font></p> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span = style=3D'font-size: 12.0pt'> </span></font></p> </div> </body> </html> ------_=_NextPart_001_01C84EFE.3BC6D83F-- --===============0781506618== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============0781506618== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users --===============0781506618==-- |