Sudhanshu Rajvaidya | 30 Jul 2012 22:55
Picon

building mini agent

I am trying to build a mini agent with basic mibII/system_mib support. However, I see even after specifying --enable-mini-agent to configure it builds all the modules such as host, at, snmp, etc. Following is what my configure looks like:

 ./configure --prefix=/snmp --exec-prefix=/snmp --disable-embedded-perl --with-defaults --disable-manuals --disable-set-support --without-rpm --without-elf --disable-scripts --with-default-snmp-version=2 --enable-mini-agent --without-perl-modules

version: 5.6.1.1
Please let me know if I am doing it wrong. I also tried specifying --with-out-mib-modules="mibII/ip mibII/tcp mibII/udp mibII/icmp" which seems to have no effect either. I want to disable all of the mibII support but system subtree.

Any help will be appreciated.

Thanks,
Sudhanshu

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 31 Jul 2012 11:11
Picon
Favicon

Re: building mini agent

On 30 July 2012 21:55, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> I am trying to build a mini agent with basic mibII/system_mib support.
> However, I see even after specifying --enable-mini-agent to configure it
> builds all the modules such as host, at, snmp, etc. Following is what my
> configure looks like:
>
>  ./configure --prefix=/snmp --exec-prefix=/snmp --disable-embedded-perl
> --with-defaults --disable-manuals --disable-set-support --without-rpm
> --without-elf --disable-scripts --with-default-snmp-version=2
> --enable-mini-agent --without-perl-modules

What was the summary at the end of this configure run?

I get the following - is yours similar?

---------------------------------------------------------
            Net-SNMP configuration summary:
---------------------------------------------------------

  SNMP Versions Supported:    1 2c 3
  Building for:               linux
  Net-SNMP Version:           5.6.2
  Network transport support:  Callback Unix Alias TCP UDP IPv4Base
SocketBase TCPBase UDPIPv4Base UDPBase
  SNMPv3 Security Modules:     usm
  Agent MIB code:             default_modules =>  snmpv3mibs
mibII/snmp_mib mibII/system_mib mibII/sysORTable mibII/vacm_vars
mibII/vacm_conf util_funcs/Exit util_funcs/restart
  MYSQL Trap Logging:         unavailable
  Embedded Perl support:      disabled
  SNMP Perl modules:          disabled
  SNMP Python modules:        disabled
  Crypto support from:        crypto
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES

---------------------------------------------------------

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Sudhanshu Rajvaidya | 31 Jul 2012 19:18
Picon

Re: building mini agent

Thanks Dave for taking a look.

Yes, I get similar summary at the end of configure. In particular, default modules are exactly same. However, when I run this mini agent my snmpwalk returns pretty much similar response as I would get from full agent. In particular, I am was hoping not to see host, tcp etc. subtrees under mibII. Please let me know if it is expected to see these subtrees in snmpwalk response from mini agent.

Thanks,
Sudhanshu

On Tue, Jul 31, 2012 at 2:11 AM, Dave Shield <D.T.Shield <at> liverpool.ac.uk> wrote:
On 30 July 2012 21:55, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> I am trying to build a mini agent with basic mibII/system_mib support.
> However, I see even after specifying --enable-mini-agent to configure it
> builds all the modules such as host, at, snmp, etc. Following is what my
> configure looks like:
>
>  ./configure --prefix=/snmp --exec-prefix=/snmp --disable-embedded-perl
> --with-defaults --disable-manuals --disable-set-support --without-rpm
> --without-elf --disable-scripts --with-default-snmp-version=2
> --enable-mini-agent --without-perl-modules

What was the summary at the end of this configure run?

I get the following - is yours similar?

---------------------------------------------------------
            Net-SNMP configuration summary:
---------------------------------------------------------

  SNMP Versions Supported:    1 2c 3
  Building for:               linux
  Net-SNMP Version:           5.6.2
  Network transport support:  Callback Unix Alias TCP UDP IPv4Base
SocketBase TCPBase UDPIPv4Base UDPBase
  SNMPv3 Security Modules:     usm
  Agent MIB code:             default_modules =>  snmpv3mibs
mibII/snmp_mib mibII/system_mib mibII/sysORTable mibII/vacm_vars
mibII/vacm_conf util_funcs/Exit util_funcs/restart
  MYSQL Trap Logging:         unavailable
  Embedded Perl support:      disabled
  SNMP Perl modules:          disabled
  SNMP Python modules:        disabled
  Crypto support from:        crypto
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES

---------------------------------------------------------


Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 31 Jul 2012 20:10
Picon
Favicon

Re: building mini agent

On 31 July 2012 18:18, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> Yes, I get similar summary at the end of configure. In particular, default
> modules are exactly same. However, when I run this mini agent my snmpwalk
> returns pretty much similar response as I would get from full agent. In
> particular, I am was hoping not to see host, tcp etc. subtrees under mibII.
> Please let me know if it is expected to see these subtrees in snmpwalk
> response from mini agent.

No - if your agent has been compiled with the configuration shown,
it should *not* be returning information from the host or tcp subtrees.

My immediate suspicion is that you may be querying a vendor-supplied
(full) agent rather than your newly-compiled mini agent.
   How are you starting the agent?

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Sudhanshu Rajvaidya | 1 Aug 2012 04:04
Picon

Re: building mini agent

>> My immediate suspicion is that you may be querying a vendor-supplied
>> (full) agent rather than your newly-compiled mini agent
>>    How are you starting the agent?

Let me double check with a clean setup. I built mini agent and scped the snmpd binary to the machine I am monitoring. I had similar doubt and double checked md5sum and also tried copying snmpd to a different location on the machine. I am starting it as follows: "/tmp/snmpd -f -c /etc/snmp/snmpd.conf -M /share/snmp/mibs/". Could it be that the other snmp (old) libs sitting on the machine are causing this? Perhaps, I should try with a fresh setup.

Thanks,
Sudhanshu

On Tue, Jul 31, 2012 at 11:10 AM, Dave Shield <D.T.Shield <at> liverpool.ac.uk> wrote:
On 31 July 2012 18:18, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> Yes, I get similar summary at the end of configure. In particular, default
> modules are exactly same. However, when I run this mini agent my snmpwalk
> returns pretty much similar response as I would get from full agent. In
> particular, I am was hoping not to see host, tcp etc. subtrees under mibII.
> Please let me know if it is expected to see these subtrees in snmpwalk
> response from mini agent.


No - if your agent has been compiled with the configuration shown,
it should *not* be returning information from the host or tcp subtrees.

.


Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 1 Aug 2012 09:56
Picon
Favicon

Re: building mini agent

On 1 August 2012 03:04, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> Let me double check with a clean setup. I built mini agent and scped the
> snmpd binary to the machine I am monitoring.

Just the binary?
Not the libraries as well?

> Could it be that the other snmp (old) libs sitting on
> the machine are causing this?

That sounds very very likely.

What I would suggest is that you start by using
   "make install"
         to set the agent up on the machine that you compiled it on,
and make sure it is working correctly there.  *Then* look at
moving it across to the second machine.
    "make install" will also provide a list of everything that needs
to be copied across.

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Sudhanshu Rajvaidya | 2 Aug 2012 06:53
Picon

Re: building mini agent

Thanks Dave for the help. That was indeed the issue. I am now able to get expected response from mini agent.

One last question here. I had to compile with --with-mib-modules=ucd_snmp/dlmod to have my mini agent load a shared object. However this adds dlmod table in snmpwalk response. Is there way to get rid of UCD-DLMOD-MIB in snmpwalk response?

Regards,
Sudhanshu

On Wed, Aug 1, 2012 at 12:56 AM, Dave Shield <D.T.Shield <at> liverpool.ac.uk> wrote:
On 1 August 2012 03:04, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> Let me double check with a clean setup. I built mini agent and scped the
> snmpd binary to the machine I am monitoring.

Just the binary?
Not the libraries as well?


> Could it be that the other snmp (old) libs sitting on
> the machine are causing this?

That sounds very very likely.


What I would suggest is that you start by using
   "make install"
         to set the agent up on the machine that you compiled it on,
and make sure it is working correctly there.  *Then* look at
moving it across to the second machine.
    "make install" will also provide a list of everything that needs
to be copied across.

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 2 Aug 2012 09:54
Picon
Favicon

Re: building mini agent

On 2 August 2012 05:53, Sudhanshu Rajvaidya <sudhanshur <at> gmail.com> wrote:
> One last question here. I had to compile with
> --with-mib-modules=ucd_snmp/dlmod to have my mini agent load a shared
> object. However this adds dlmod table in snmpwalk response. Is there way to
> get rid of UCD-DLMOD-MIB in snmpwalk response?

Probably the simplest way would be to define a 'view' that included the
elements that you wish reported, but excluding the dlModTable.   Then
configure the access control to use this view.

The alternative would be to tweak the code of  ucd-snmp/dlmod.c to not
register this table at all - i.e. comment out the first line of 'init_dlmod'

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Gmane