[collectd] snmp plugin: I don't know the ASN type "130"
I am trying to figure out how to gather stats from an F5 device using snmp plugin... If I try the basic example: Type "if_octets" Table true Instance "IF-MIB::ifDescr" Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" Address "10.212.5.41" Version 2 Community "public" Collect "std_traffic" Interval 10 It works fine... When I try this table: Type "f5_vs_stats" Table true Instance ".1.3.6.1.4.1.3375.2.2.10.2.3.1.1" Values ".1.3.6.1.4.1.3375.2.2.10.2.3.1.6" ".1.3.6.1.4.1.3375.2.2.10.2.3.1.8" Which type defined in /usr/share/collectd/types.db: f5_vs_stats pin:COUNTER:0:18446744073709551615, pout:COUNTER:0:18446744073709551615 I get constant errors like: Apr 4 15:33:48 tophat collectd[30581]: [daemon.warn] snmp plugin: I don't know the ASN type "130" (OID: SNMP-VIEW-BASED-ACM-MIB::vacmViewTreeFamilyStatus."viewComm10".1.1) An snmpwalk on those counters seems to work OK: ml623@tophat:~/ > snmpwalk -Os -c "public" -v 2c 10.212.5.41 .1.3.6.1.4.1.3375.2.2.10.2.3.1.6 | head enterprises.3375.2.2.10.2.3.1.6.18.47.67.111.109.109.111.110.47.116.101.115.116.95.48.49.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.19.47.67.111.109.109.111.110.47.118.100.105.95.52.49.55.50.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.20.47.67.111.109.109.111.110.47.99.108.111.117.100.112.97.116.104.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.20.47.67.111.109.109.111.110.47.103.100.111.99.95.104.116.116.112.95.118.115 = Counter64: 1057 enterprises.3375.2.2.10.2.3.1.6.20.47.67.111.109.109.111.110.47.113.97.45.115.115.98.95.56.48.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.20.47.67.111.109.109.111.110.47.119.101.98.48.49.45.112.117.98.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.20.47.67.111.109.109.111.110.47.119.101.98.48.50.45.112.117.98.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.20.47.67.111.109.109.111.110.47.119.101.98.48.51.45.112.117.98.95.118.115 = Counter64: 0 enterprises.3375.2.2.10.2.3.1.6.21.47.67.111.109.109.111.110.47.103.100.111.99.95.104.116.116.112.115.95.118.115 = Counter64: 58436 enterprises.3375.2.2.10.2.3.1.6.21.47.67.111.109.109.111.110.47.113.97.45.115.115.98.95.52.52.51.95.118.115 = Counter64: 80 ml623@tophat:~/ > snmpwalk -Os -c "public" -v 2c 10.212.5.41 .1.3.6.1.4.1.3375.2.2.10.2.3.1.1 | head enterprises.3375.2.2.10.2.3.1.1.18.47.67.111.109.109.111.110.47.116.101.115.116.95.48.49.95.118.115 = STRING: "/Common/test_01_vs" enterprises.3375.2.2.10.2.3.1.1.19.47.67.111.109.109.111.110.47.118.100.105.95.52.49.55.50.95.118.115 = STRING: "/Common/vdi_4172_vs" enterprises.3375.2.2.10.2.3.1.1.20.47.67.111.109.109.111.110.47.99.108.111.117.100.112.97.116.104.95.118.115 = STRING: "/Common/cloudpath_vs" enterprises.3375.2.2.10.2.3.1.1.20.47.67.111.109.109.111.110.47.103.100.111.99.95.104.116.116.112.95.118.115 = STRING: "/Common/gdoc_http_vs" enterprises.3375.2.2.10.2.3.1.1.20.47.67.111.109.109.111.110.47.113.97.45.115.115.98.95.56.48.95.118.115 = STRING: "/Common/qa-ssb_80_vs" enterprises.3375.2.2.10.2.3.1.1.20.47.67.111.109.109.111.110.47.119.101.98.48.49.45.112.117.98.95.118.115 = STRING: "/Common/web01-pub_vs" enterprises.3375.2.2.10.2.3.1.1.20.47.67.111.109.109.111.110.47.119.101.98.48.50.45.112.117.98.95.118.115 = STRING: "/Common/web02-pub_vs" enterprises.3375.2.2.10.2.3.1.1.20.47.67.111.109.109.111.110.47.119.101.98.48.51.45.112.117.98.95.118.115 = STRING: "/Common/web03-pub_vs" enterprises.3375.2.2.10.2.3.1.1.21.47.67.111.109.109.111.110.47.103.100.111.99.95.104.116.116.112.115.95.118.115 = STRING: "/Common/gdoc_https_vs" enterprises.3375.2.2.10.2.3.1.1.21.47.67.111.109.109.111.110.47.113.97.45.115.115.98.95.52.52.51.95.118.115 = STRING: "/Common/qa-ssb_443_vs" Any idea what might be wrong? Thanks a lot, Mohamed. ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Collectd complex perl plugin question ...
Hi, On Wed, Apr 04, 2012 at 12:53:18PM +, Sebastien Cramatte wrote: > Thanks a lot for snippet. > I've still have an issue :( > > "Found a configuration for the "Mine" plugin, but the plugin isn't loaded > or didn't register a configuration callback." > > In my plugin source I've got this line ... > > plugin_register (TYPE_CONFIG, "mine", "mine_config"); > > > > Any Idea of what occurs ? Yes I scratched my head quite a bit on that one :-) The BaseName/LoadPlugin directive will select the right perl Module. The directive refers to the plugin_register() callback's plugin name. If your __PACKAGE__ is Collectd::Plugins::Mine, and is calling plugin_register ([...], "mine") you need something like: -- Globals true BaseName "Collectd::Plugins" LoadPlugin "Mine" [... this will look for PERL5LIB(s).../Collectd/Plugins/Mine.pm ...] [... this will register with the plugin called "mine" ...] Interval300 [...] ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Collectd complex perl plugin question ...
Thanks a lot for snippet. I've still have an issue :( "Found a configuration for the "Mine" plugin, but the plugin isn't loaded or didn't register a configuration callback." In my plugin source I've got this line ... plugin_register (TYPE_CONFIG, "mine", "mine_config"); Any Idea of what occurs ? Thank you for your help El 04/04/12 13:50, "Fabien Wernli" escribió: >Hi, > >On Wed, Apr 04, 2012 at 10:58:07AM +0200, Sebastian Harl wrote: >> However, you could simple skip a couple of intervals in the read >> callback function. I.e., use a global variable (for each instance of the >> callback) to count down the number of intervals to be skipped. Make sure >> to return 0 in case you skip the current interval. Then, manually set >> the interval appropriately when dispatching values. > >Here's my two cents of what I have in all my perl plugins to handle the >"Interval" config option: > >-- >package Collectd::Plugins::Mine; > >use Collectd qw( :all ); > >my $interval = $interval_g; >my $hostname = $hostname_g; >my $last_ts = time(); > >[...] > >sub my_config { > for my $child (@{$_[0] -> {children}}) { >if ($child -> {key} eq "Interval") { > $interval = $child -> {values} -> [0]; >[...] > >sub my_get { > my $ts = time; > return 1 if ($ts < $interval + $last_ts); >[...] > plugin_dispatch_values(...); >[...] > $last_ts = $ts; > return 1; >} > >-- > >Cheers > > >___ >collectd mailing list >collectd@verplant.org >http://mailman.verplant.org/listinfo/collectd ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Collectd complex perl plugin question ...
Hi, On Wed, Apr 04, 2012 at 10:58:07AM +0200, Sebastian Harl wrote: > However, you could simple skip a couple of intervals in the read > callback function. I.e., use a global variable (for each instance of the > callback) to count down the number of intervals to be skipped. Make sure > to return 0 in case you skip the current interval. Then, manually set > the interval appropriately when dispatching values. Here's my two cents of what I have in all my perl plugins to handle the "Interval" config option: -- package Collectd::Plugins::Mine; use Collectd qw( :all ); my $interval = $interval_g; my $hostname = $hostname_g; my $last_ts = time(); [...] sub my_config { for my $child (@{$_[0] -> {children}}) { if ($child -> {key} eq "Interval") { $interval = $child -> {values} -> [0]; [...] sub my_get { my $ts = time; return 1 if ($ts < $interval + $last_ts); [...] plugin_dispatch_values(...); [...] $last_ts = $ts; return 1; } -- Cheers ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Collectd 4.10.1 "Interval per plugin" patch available
On Wed, Apr 04, 2012 at 10:16:27AM +0200, colle...@faxm0dem.org wrote: > On Tue, Apr 03, 2012 at 11:48:27PM +, Sebastien Cramatte wrote: > > Does it available somewhere "interval per plugin" patch for Collectd 4.10.1 > > There's the following but I guess it will only apply to the 5.x branches > https://github.com/collectd/collectd/pull/46 Well, this *might* apply on 4.x as well as the changes are limited to the core only. However, this is not finished yet and meant as an RFC ;-) HTH, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin signature.asc Description: Digital signature ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Collectd complex perl plugin question ...
Hi, On Tue, Apr 03, 2012 at 07:24:08PM +, Sebastien Cramatte wrote: > We have created a complex perl plugin that scan over 1000 SNMP > equipments using multi threads. It's works except that I don't how > to handle properly interval execution. When I restart collectd > daemon, read method Is called every 10 o 20 seconds …. > > We need that this plugin read method be executed every 300 s (5mn). > How can I achieve this ? Right now, this is not possible using any built-in mechanisms. (See the per plugin interval feature mentioned in another thread though, which is available as an RFC on Github.) However, you could simple skip a couple of intervals in the read callback function. I.e., use a global variable (for each instance of the callback) to count down the number of intervals to be skipped. Make sure to return 0 in case you skip the current interval. Then, manually set the interval appropriately when dispatching values. HTH, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin signature.asc Description: Digital signature ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Collectd 4.10.1 "Interval per plugin" patch available
Hi, On Tue, Apr 03, 2012 at 11:48:27PM +, Sebastien Cramatte wrote: > Does it available somewhere "interval per plugin" patch for Collectd 4.10.1 There's the following but I guess it will only apply to the 5.x branches https://github.com/collectd/collectd/pull/46 ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd