Re: questions about snmpd.conf
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2008/5/21 <[email protected]>: > I have a question about snmpd.conf. You know we can use "view" to > configurate which > row we can access with "MASK", but how to configurate which column to > access? Only we > can do is adding the OID of the table's column to view one by one? That's basically it - yes. > for example: > In table "ifTable", I only want to access several columns such as ifIndex, > ifMtu, and ifSpeed ... If you only want to allow access to a few columns in the table, then yes - build up the view by adding them individually: view ifview include ifIndex # (though this is Not Needed) view ifview include ifMut view ifview include ifSpeed If you want to grant access to *most* of the table, but not all, then try something like: view ifview include ifTable view ifview exclude ifAdminStatus view ifview exclude ifOperStatus > now we must add following lines in snmpd.conf: > > view sysview include ifIndex > view sysview include ifMtu > view sysview include ifSpeed > ...... Can I suggest that you use a slightly less misleading name for the view :-) > Is there any more effective way to configure like using "MASK" to access > rows of table? No - the mask controls which subidentifiers to look at when checking for OID matches. But it's a simple binary - yes or no. It doesn't handle ranges. It's typically used for granting access to a particular row of the table: view ifRowView include ifEntry.0.5 0xfa0 (matching any OID of the form 1.3.6.1.2.1.2.2.1.x.5 i.e any column instance in row 5 of the table). Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users