[collectd] struggling with oid that returns four values
hi, i am struggling getting this to index cleanly into whisper files, and i'm not quite sure why. i'm noticing this error in log: Nov 1 23:12:20 test-app-1 collectd[11197]: snmp plugin: csnmp_instance_list_add failed. Nov 1 23:13:20 test-app-1 collectd[11197]: snmp plugin: csnmp_instance_list_add failed. when polling my test switch for queue drops, i use this mib::oid pair: JUNIPER-COS-MIB::jnxCosIfqTailDropPktRate snmpwalk will return four values for the default switch port queues: JUNIPER-COS-MIB::jnxCosIfqTailDropPktRate.650."best-effort" = Counter64: 0 JUNIPER-COS-MIB::jnxCosIfqTailDropPktRate.650."network-control" = Counter64: 0 JUNIPER-COS-MIB::jnxCosIfqTailDropPktRate.650."assured-forwarding" = Counter64: 0 JUNIPER-COS-MIB::jnxCosIfqTailDropPktRate.650."expedited-forwarding" = Counter64: 0 with the following in my types.db.custom: ex_q_drop drops:COUNTER:0:U and this in my collectd.conf: Type "ex_q_drop" Table true Instance "IF-MIB::ifName" Values "JUNIPER-COS-MIB::jnxCosIfqTailDropPkts" i had though maybe i could index them against the ifName or ifDesc value much like std_traffic, but this seems to generate the error. when i comment out the instance, the query works but generates an awful lot of whisper buckets (as would be expected): root@test-app-1 etc # ls /opt/graphite/storage/whisper/fsaa-rs1/snmp/ Display all 267 possibilities? (y or n) ex_q_drop-504_20_101_120_112_101_100_105_116_101_100_45_102_111_114_119_/ ex_q_drop-506_11_98_101_115_116_45_101_102_102_111_114_116/ ex_q_drop-510_18_97_115_115_117_114_101_100_45_102_111_114_119_97_114_100/ ex_q_drop-520_18_97_115_115_117_114_101_100_45_102_111_114_119_97_114_100/ ex_q_drop-522_11_98_101_115_116_45_101_102_102_111_114_116/ ex_q_drop-522_15_110_101_116_119_111_114_107_45_99_111_110_116_114_111_/ ex_q_drop-524_20_101_120_112_101_100_105_116_101_100_45_102_111_114_119_/ ex_q_drop-530_18_97_115_115_117_114_101_100_45_102_111_114_119_97_114 wondering if anyone could clue me on what i'm doing wrong, or how to work around this. could i potentially add this oid to the std_traffic data block and add an extra value to std_traffic in types.db? (i'll probably try this next for fun, anyhow). thanks! ryan ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] [PATCH] Ceph plugin
On Tue, 16 Oct 2012, Yves Mettier wrote: > Hello, > > I'm new with git. Not sure to understand what it means. > I don't mind you do it, and I will learn what it means then :) It just means that my patch needs to apply on top of yours to reuse the json detection. Should I wait until your patch hits collectd.git and resend based on that? sage > > Regards, > Yves > > Le 16.10.2012 17:41, Sage Weil a ?crit : > > On Tue, 16 Oct 2012, Yves Mettier wrote: > >> Hello, > >> > >> If you are talking about https://github.com/json-c/json-c/wiki, I > >> already did it for my jsonrpc plugin (very recent). > >> > >> Have a look here : > >> https://github.com/ymettier/collectd/blob/ym/jsonrpc/configure.in > >> > >> Don't forget to update your src/Makefile.am (see > >> https://github.com/ymettier/collectd/blob/ym/jsonrpc/src/Makefile.am > >> and > >> the JSONRPC block) > >> > >> I have done it for jsonrpc, but it can probably be more generic if > >> you > >> also need it. Tell me. > > > > Great, that looks like it will work. Should I rebase this patch on > > top of > > yours? > > > > sage > > > >> > >> For your information, I would like to check the libjson version > >> (0.10 > >> needed because of a bug in 0.9). This is not done yet. > >> > >> Regards, > >> Yves > >> > >> Le 16.10.2012 02:46, Sage Weil a ?crit : > >> > Hi, > >> > > >> > We've had this code sitting around for ages and keep porting it > >> when > >> > debian updates their packages. I finally spent some time to make > >> it > >> > work > >> > with the current git master. > >> > > >> > The only thing missing here that I know of is some configure.in > >> magic > >> > to > >> > check for libjson. I'm not sure what the "right" way to detect a > >> > library > >> > that is only need for a single plugin is... any help there would > >> be > >> > appreciated! > >> > > >> > Thanks- > >> > sage > >> > > >> > > >> > > >> > From 4cc5bfe8e696e9740b691d623c064200ea4530fb Mon Sep 17 00:00:00 > >> > 2001 > >> > From: Sage Weil > >> > Date: Mon, 15 Oct 2012 17:44:48 -0700 > >> > Subject: [PATCH] Add ceph plugin > >> > > >> > This plugin will read from the socket associated with a Ceph > >> daemon > >> > and > >> > gather the performance metrics exposed there. It will first issue > >> a > >> > 'get schema' command to discover what metrics are available, and > >> will > >> > then > >> > slurp them up at regular intervals. > >> > > >> > Most of the original code was written by Colin Patrick McCabe > >> > , and then modified by . > >> > > >> > Signed-off-by: Sage Weil > >> > --- > >> > configure.in |4 + > >> > src/Makefile.am |9 + > >> > src/ceph.c | 810 > >> > ++ > >> > src/collectd.conf.in |1 + > >> > 4 files changed, 824 insertions(+), 0 deletions(-) > >> > create mode 100644 src/ceph.c > >> > > >> > diff --git a/configure.in b/configure.in > >> > index 2a187b2..1745d37 100644 > >> > --- a/configure.in > >> > +++ b/configure.in > >> > @@ -4544,6 +4544,7 @@ dependency_error="no" > >> > plugin_ascent="no" > >> > plugin_battery="no" > >> > plugin_bind="no" > >> > +plugin_ceph="no" > >> > plugin_conntrack="no" > >> > plugin_contextswitch="no" > >> > plugin_cpu="no" > >> > @@ -4585,6 +4586,7 @@ plugin_zfs_arc="no" > >> > if test "x$ac_system" = "xLinux" > >> > then > >> > plugin_battery="yes" > >> > +plugin_ceph="yes" > >> > plugin_conntrack="yes" > >> > plugin_contextswitch="yes" > >> > plugin_cpu="yes" > >> > @@ -4860,6 +4862,7 @@ AC_PLUGIN([apple_sensors], [$with_libiokit], > >> > [Apple's hardware sensors]) > >> > AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player > >> > statistics]) > >> > AC_PLUGIN([battery], [$plugin_battery],[Battery > >> statistics]) > >> > AC_PLUGIN([bind],[$plugin_bind], [ISC Bind > >> nameserver > >> > statistics]) > >> > +AC_PLUGIN([ceph],[$plugin_ceph], [Ceph daemon > >> > statistics]) > >> > AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack > >> > statistics]) > >> > AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context > >> switch > >> > statistics]) > >> > AC_PLUGIN([cpufreq], [$plugin_cpufreq],[CPU frequency > >> > statistics]) > >> > @@ -5192,6 +5195,7 @@ Configuration: > >> > ascent . . . . . . . $enable_ascent > >> > battery . . . . . . . $enable_battery > >> > bind . . . . . . . . $enable_bind > >> > +ceph . . . . . . . . $enable_ceph > >> > conntrack . . . . . . $enable_conntrack > >> > contextswitch . . . . $enable_contextswitch > >> > cpu . . . . . . . . . $enable_cpu > >> > diff --git a/src/Makefile.am b/src/Makefile.am > >> > index 5bfe930..82972c1 100644 > >> > --- a/src/Makefile.am > >> > +++ b/src/Makefile.am > >> > @@ -201,6 +201,15 @@ collectd_LDADD += "-dlopen" bind.la > >> > collectd_DEPENDENCIES += bind.la > >> > endif > >> > > >> > +if B
Re: [collectd] [PATCH] Ceph plugin
On Tue, 16 Oct 2012, Yves Mettier wrote: > Hello, > > If you are talking about https://github.com/json-c/json-c/wiki, I > already did it for my jsonrpc plugin (very recent). > > Have a look here : > https://github.com/ymettier/collectd/blob/ym/jsonrpc/configure.in > > Don't forget to update your src/Makefile.am (see > https://github.com/ymettier/collectd/blob/ym/jsonrpc/src/Makefile.am and > the JSONRPC block) > > I have done it for jsonrpc, but it can probably be more generic if you > also need it. Tell me. Great, that looks like it will work. Should I rebase this patch on top of yours? sage > > For your information, I would like to check the libjson version (0.10 > needed because of a bug in 0.9). This is not done yet. > > Regards, > Yves > > Le 16.10.2012 02:46, Sage Weil a ?crit : > > Hi, > > > > We've had this code sitting around for ages and keep porting it when > > debian updates their packages. I finally spent some time to make it > > work > > with the current git master. > > > > The only thing missing here that I know of is some configure.in magic > > to > > check for libjson. I'm not sure what the "right" way to detect a > > library > > that is only need for a single plugin is... any help there would be > > appreciated! > > > > Thanks- > > sage > > > > > > > > From 4cc5bfe8e696e9740b691d623c064200ea4530fb Mon Sep 17 00:00:00 > > 2001 > > From: Sage Weil > > Date: Mon, 15 Oct 2012 17:44:48 -0700 > > Subject: [PATCH] Add ceph plugin > > > > This plugin will read from the socket associated with a Ceph daemon > > and > > gather the performance metrics exposed there. It will first issue a > > 'get schema' command to discover what metrics are available, and will > > then > > slurp them up at regular intervals. > > > > Most of the original code was written by Colin Patrick McCabe > > , and then modified by . > > > > Signed-off-by: Sage Weil > > --- > > configure.in |4 + > > src/Makefile.am |9 + > > src/ceph.c | 810 > > ++ > > src/collectd.conf.in |1 + > > 4 files changed, 824 insertions(+), 0 deletions(-) > > create mode 100644 src/ceph.c > > > > diff --git a/configure.in b/configure.in > > index 2a187b2..1745d37 100644 > > --- a/configure.in > > +++ b/configure.in > > @@ -4544,6 +4544,7 @@ dependency_error="no" > > plugin_ascent="no" > > plugin_battery="no" > > plugin_bind="no" > > +plugin_ceph="no" > > plugin_conntrack="no" > > plugin_contextswitch="no" > > plugin_cpu="no" > > @@ -4585,6 +4586,7 @@ plugin_zfs_arc="no" > > if test "x$ac_system" = "xLinux" > > then > > plugin_battery="yes" > > + plugin_ceph="yes" > > plugin_conntrack="yes" > > plugin_contextswitch="yes" > > plugin_cpu="yes" > > @@ -4860,6 +4862,7 @@ AC_PLUGIN([apple_sensors], [$with_libiokit], > > [Apple's hardware sensors]) > > AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player > > statistics]) > > AC_PLUGIN([battery], [$plugin_battery],[Battery statistics]) > > AC_PLUGIN([bind],[$plugin_bind], [ISC Bind nameserver > > statistics]) > > +AC_PLUGIN([ceph],[$plugin_ceph], [Ceph daemon > > statistics]) > > AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack > > statistics]) > > AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch > > statistics]) > > AC_PLUGIN([cpufreq], [$plugin_cpufreq],[CPU frequency > > statistics]) > > @@ -5192,6 +5195,7 @@ Configuration: > > ascent . . . . . . . $enable_ascent > > battery . . . . . . . $enable_battery > > bind . . . . . . . . $enable_bind > > +ceph . . . . . . . . $enable_ceph > > conntrack . . . . . . $enable_conntrack > > contextswitch . . . . $enable_contextswitch > > cpu . . . . . . . . . $enable_cpu > > diff --git a/src/Makefile.am b/src/Makefile.am > > index 5bfe930..82972c1 100644 > > --- a/src/Makefile.am > > +++ b/src/Makefile.am > > @@ -201,6 +201,15 @@ collectd_LDADD += "-dlopen" bind.la > > collectd_DEPENDENCIES += bind.la > > endif > > > > +if BUILD_PLUGIN_CEPH > > +pkglib_LTLIBRARIES += ceph.la > > +ceph_la_SOURCES = ceph.c > > +ceph_la_LDFLAGS = -module -avoid-version > > +ceph_la_LIBADD = -ljson > > +collectd_LDADD += "-dlopen" ceph.la > > +collectd_DEPENDENCIES += ceph.la > > +endif > > + > > if BUILD_PLUGIN_CONNTRACK > > pkglib_LTLIBRARIES += conntrack.la > > conntrack_la_SOURCES = conntrack.c > > diff --git a/src/ceph.c b/src/ceph.c > > new file mode 100644 > > index 000..59d9f12 > > --- /dev/null > > +++ b/src/ceph.c > > @@ -0,0 +1,810 @@ > > +/** > > + * collectd - src/ceph.c > > + * Copyright (C) 2011 New Dream Network > > + * > > + * This program is free software; you can redistribute it and/or > > modify it > > + * under the terms of the GNU General Public License as published by > > the > > + * Free Software Foundation; only version 2 of the License is > > applicable. > > + * > > + * This p
[collectd] Several patches combined together
Greetings, As part of some work I've been doing, I've needed to get some further statistical information, some of this could be gotten via exec/perl/etc but I thought it would be more efficient to write a module for it, as such gstat.c (found in the mailing list, and applied and necessary bits for compilation taken care of) - courtesy of Phil Kulin netstat.c - only work for FreeBSD right now, the Linux netstat stuff gave me a headache, maybe someone else wants to take a swing at it and/or expand it configure.in, Makefile.am - updated for the above types.db - updated for the above collectd-gstat-netstat-bsd.patch.gz Description: GNU Zip compressed data ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd