Re: how to report stats for a fake network interface in Linux?
Ted Zlatanov <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Organization | Теодор Златанов @ Cienfuegos |
| Message-ID | <[email protected]> |
On Fri, 24 Sep 2010 13:32:13 -0500 Ted Zlatanov <[email protected]> wrote: TZ> I have some rapidly changing stats I want to report via SNMP. It would TZ> be terrific if I could do that in the IF-MIB interface table, but it's TZ> pretty hard to plug in my Perl subagent in just the right places. TZ> I investigated creating a fake network device module but that seems too TZ> invasive for reporting stats. I can't use a 'dummy' network device TZ> because Linux doesn't allow me to set the net_device_stats data directly TZ> from userspace. So is there a way to lie to SNMP about the number of TZ> network interfaces and provide an extra one (with some stats) to it? After looking further into it, agent/mibgroup/mibII/interfaces.c and agent/mibgroup/if-mib/data_access/interface*.c seem like the happening place for all this. I'd like to override agent/mibgroup/if-mib/data_access/interface_linux.c:_parse_stats() for a custom 'dummy' device we only have on Linux machines. The stats will come from a secondary interface, not /proc as usual. Does that seem like a good plan or should I hook into a higher level of the if-mib parsing hierarchy? Thanks again Ted ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ 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